# Factor Backtest

> Combine a factor library into a composite signal and quintile-backtest it under transaction costs — long-short return, monotonicity, turnover, and tearsheets. Use for the portfolio-level view that single-factor IC does not give. Triggers on "backtest", "composite signal", "combine factors", "long-short return", "portfolio", "quintile", "tearsheet", "transaction costs".

- **Type:** Skill
- **Install:** `agentstack add skill-minihellboy-factorminer-factor-backtest`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [minihellboy](https://agentstack.voostack.com/s/minihellboy)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [minihellboy](https://github.com/minihellboy)
- **Source:** https://github.com/minihellboy/factorminer/tree/main/plugins/agent-plugins/factor-researcher/skills/factor-backtest

## Install

```sh
agentstack add skill-minihellboy-factorminer-factor-backtest
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Factor Backtest

A library of individually-decent factors is not a strategy. This skill combines them into one composite signal and backtests the portfolio that signal implies — the level at which transaction costs and capacity actually bite.

## Workflow

### 1. Combine and backtest

```bash
factorminer combine output/run1/factor_library.json \
  --data path/to/market_data.csv \
  --method all --fit-period train --eval-period test
```

- `--method` — `equal-weight`, `ic-weighted`, `orthogonal`, or `all` to compare every method.
- `--fit-period` — split used to fit weights / run selection (use `train`).
- `--eval-period` — split used to score the composite (use `test`).
- `--selection` — optional pre-filter: `lasso`, `stepwise`, `xgboost`, or `none`.
- `--top-k` — keep only the top-K factors before combining.

The report gives composite `IC Mean`, `ICIR`, `Long-Short` return, `Monotonicity`, and `Avg Turnover`.

### 2. Generate tearsheets

For the visual portfolio view — quintile returns, IC time series, correlation heatmap:

```bash
factorminer -o output/run1 visualize output/run1/factor_library.json \
  --data market_data.csv --period test --tearsheet --quintile --correlation
```

## What to look for

- **Monotonicity** — quintile returns should step up Q1→Q5. A non-monotone composite is fragile regardless of headline IC.
- **Long-short return net of turnover** — high `Avg Turnover` means the gross return is optimistic; FactorMiner's transaction-cost model is what makes the net number honest.
- **Method spread** — if `orthogonal` and `equal-weight` disagree sharply, the library has redundant or unstable factors; revisit `factor-evaluation`.

## Guardrails

- Fit weights on `train`, score on `test` — never fit and score on the same split.
- The backtest estimates historical behavior; it is not a forward return promise. Present it as a research artifact for review.
- Report net-of-cost numbers as the headline; gross numbers only as context.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [minihellboy](https://github.com/minihellboy)
- **Source:** [minihellboy/factorminer](https://github.com/minihellboy/factorminer)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-minihellboy-factorminer-factor-backtest
- Seller: https://agentstack.voostack.com/s/minihellboy
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
