Runs quantitative factor analysis: performance metrics, drawdowns, IC statistics, grouped returns, horizon/lag IC surfaces, factor correlation, preflight checks, evaluation, overfitting tests, and stationarity checks via `uv run qs analyze`.
Ships in quantspace. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use the uv run qs analyze commands below; research tasks do not require
reading skills/analyze/ source. Each command prints one JSON envelope on
stdout (ok, data, artifacts, warnings, or error with a hint).
Exact options: uv run qs analyze <command> --help or
uv run qs schema analyze.<command>. Plotting and parallel analysis need
uv sync --extra analyze.
Strategy execution and portfolio construction belong to the backtest Skill.
uv run qs analyze perf --returns out/run/result.parquet
uv run qs analyze drawdowns --returns out/run/result.parquet --top-n 5
uv run qs analyze factor-ic --panel out/panel.parquet --factor out/roc10_long.parquet \
--horizon 5 --groups 5 --out-dir out/ic
uv run qs analyze ic-surface --panel out/panel.parquet \
--factors mom=out/mom.parquet --factors rsi=out/rsi.parquet \
--directions '{"mom": 1, "rsi": -1}' --horizons 1,5,20 --lags 0,1,2 \
--signal-lag 1 --out-dir out/surface
uv run qs analyze factor-correlation --factors mom=out/mom.parquet --factors rsi=out/rsi.parquet \
--directions '{"mom": 1, "rsi": -1}' --window 60 --min-periods 30 --top-n 3 \
--out-dir out/correlation
uv run qs analyze evaluate --print-template protocol_json # also spec_json
uv run qs analyze preflight --panel out/panel.parquet --spec-json spec.json \
--protocol-json protocol.json
uv run qs analyze evaluate --panel out/panel.parquet --spec-json spec.json \
--protocol-json protocol.json --values out/roc10_values.parquet --output out/eval.json
uv run qs analyze overfit --candidates out/candidates.parquet --tests dsr,pbo --n-splits 4
uv run qs analyze stationarity --series out/one_symbol.parquet --column close --windows 60,120
--factor and --values are long tables with symbol, eob, and value
(the default qs compute factor output); compute --values with --keep-na.--factors NAME=PATH takes wide tables, one column per symbol
(qs compute factor --layout wide).--returns is a dated table with a return column (--column, default
return), for example result.parquet from qs backtest run.--candidates is an eob by candidate table of periodic returns.spec.json and protocol.json are analyze-native SpecSnapshot and
ProtocolSnapshot objects; --print-template and
uv run qs schema analyze.evaluate --file-field protocol_json show their fields.factor-ic is quick screening; evaluate is the execution-aligned Rank-IC
evaluation. Their numbers are not interchangeable.preflight and evaluate fail fast on hard panel, alignment, or causality
failures before any return is evaluated.P[t+L+H]/P[t+L]-1 on protocol.trade_at prices, with signal_lag=L and
horizon_bars=H. trade_at and return_mode must be set on the protocol;
they are never inferred.horizon_bars > 1 the ordinary IC t-test is unavailable because the
forward windows overlap; read the Newey-West (HAC) statistics instead.factor-ic, grouped returns are one-bar returns regrouped every
--horizon bars, so they compound into a valid NAV; IC uses the
--horizon-bar forward return.skills.analyze does not import skills.factor_mining, strategies,
report rendering, or LLM SDKs.AnalyzeFacade trust boundaries, pool comparison, and recipes. Read it when
changing this Skill or writing strategy code.Before using a command, run it with --help to see its options and defaults. uv run qs schema <skill>.<command> shows its input and output fields; add --file-field FIELD for the structure of an option that takes a JSON file.
| Command | What it does | Side effects |
|---|---|---|
uv run qs analyze factor-ic | IC statistics and grouped returns with full_stat. | read-only, writes-output |
uv run qs analyze ic-surface | Execution-aligned factor x horizon x lag rank-IC surface with HAC summaries. | read-only, writes-output |
uv run qs analyze factor-correlation | Factor rank-correlation, Top-N overlap and rolling correlation history. | read-only, writes-output |
uv run qs analyze perf | Scalar performance metrics of a return stream. | read-only |
uv run qs analyze drawdowns | List peak-to-trough drawdown episodes. | read-only |
uv run qs analyze overfit | Deflated Sharpe, PBO, Reality Check/SPA, bootstrap and rolling diagnostics. | read-only |
uv run qs analyze stationarity | Hurst, ADF and KPSS over trailing windows. | read-only |
uv run qs analyze preflight | AnalyzeFacade hard checks of panel, spec and protocol. | read-only |
uv run qs analyze evaluate | Deterministic AnalyzeFacade evaluation of precomputed factor values. | read-only, writes-output |
__init__.py (opens in a new tab)attribution_core.py (opens in a new tab)attribution_counterfactual.py (opens in a new tab)attribution_decision.py (opens in a new tab)attribution_factor.py (opens in a new tab)attribution_ledger.py (opens in a new tab)attribution_ranking.py (opens in a new tab)attribution_robustness.py (opens in a new tab)attribution_shapley.py (opens in a new tab)attribution_stat_tests.py (opens in a new tab)causality.py (opens in a new tab)cli.py (opens in a new tab)content_fingerprint.py (opens in a new tab)contracts.py (opens in a new tab)facade.py (opens in a new tab)factor_analysis.py (opens in a new tab)factor_evaluation.py (opens in a new tab)factor_incremental.py (opens in a new tab)factor_information.py (opens in a new tab)factor_robustness.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/quantspace:analyzefrom quantspace
quantspace@quantskills is listed by quantskills/registry — review the source before installing
npx claudepluginhub quantskills/registry --plugin quantspace10 skills in this plugin
/backtestRun date-by-symbol target weights (or whole lots, booked by quantity with futures on the contracts actually held) through the shared vectorized backtester, convert votes into weights (equal, risk parity, inverse variance), apply market overlays, blend strategy return streams, and price A-share trigger-time costs with `uv run qs backtest ...`./computeCompute technical indicators and factor values on OHLCV panels, build log-difference features and forward-return or triple-barrier labels, resample one-minute bars to five minutes, and forward-adjust stored bars with `uv run qs compute ...`./factor-miningRun governed AI factor mining: template and validate versioned research contracts (ResearchBrief, FactorSpec, ReviewReport, PoolDecision), check generated factor functions with `uv run qs factor-mining ...`, and follow the multi-agent role protocol for generating, reviewing, and pooling factors.Other plugins' skills for the same job