Converts scores or signals into date-by-symbol target weights via Top-N selection, signal weights, or holding calendars. Combines multiple factors by rank, vote, IC, or ICIR and runs cross-sectional backtests with `uv run qs strategy`.
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 strategy commands below; research tasks do not require
reading skills/strategy/ source. Each command prints one JSON envelope on
stdout (ok, data, artifacts, warnings, or error with a hint).
Exact options: uv run qs strategy <command> --help or
uv run qs schema strategy.<command>.
uv run qs compute factor --panel out/panel.parquet --indicator roc -p period=10 \
--layout wide --output out/mom.parquet
uv run qs strategy top-n --scores out/mom.parquet --top-n 3 --output out/targets.parquet
uv run qs strategy hold-calendar --panel out/panel.parquet --weights out/targets.parquet \
--output out/held.parquet
uv run qs strategy signal-weights --signal out/signal.parquet --column value \
--symbol 510300.SH --output out/signal_weights.parquet
uv run qs strategy combine --factors mom=out/mom.parquet --factors rsi=out/rsi.parquet \
--directions '{"mom": 1, "rsi": -1}' --method equal_rank --top-n 3 --out-dir out/combined
uv run qs strategy cs-run --panel out/panel.parquet \
--factors '[{"indicator": "roc", "params": {"period": 10}, "name": "mom"},
{"indicator": "rsi", "params": {"period": 14}, "name": "rsi", "direction": -1}]' \
--slippage-bp 1 --top-pct 0.4 --rebalance-freq W --out-dir out/cs_run
uv run qs backtest run --panel out/panel.parquet --weights out/targets.parquet \
--commission 0.0002 --slippage-bp 2 --out-dir out/run
--scores and --factors NAME=PATH are wide date by symbol tables
(qs compute factor --layout wide, or the rank table of qs ml factor-rank).--signal is one instrument's long factor table; --column names the value.--weights input of
qs backtest run. combine --out-dir also writes the factor-level weights.combine applies factor direction and daily cross-sectional normalization
itself; do not pre-normalize inputs.combine methods are equal rank, equal vote, rolling IC, rolling ICIR, and
correlation-aware maximum IC or ICIR. The rolling methods need IC history
(and the maximum methods a correlation history) from qs analyze ic-surface
and qs analyze factor-correlation; equal_rank needs none.qs backtest run; this Skill keeps
no second return engine. Concrete factors, rules, and workflows belong in
strategies/.combine_factor_scores, and the
time-series helper. 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 strategy top-n | Equal-weight the top N scores on each date. | writes-output |
uv run qs strategy signal-weights | Turn a single-asset signal into target weights. | writes-output |
uv run qs strategy hold-calendar | Forward-hold signal-day weights across a panel's trading calendar. | writes-output |
uv run qs strategy combine | Combine raw factors into composite scores and Top-N weights. | writes-output |
uv run qs strategy cs-run | Run a factor-voting Top-pct cross-sectional strategy with ModularBacktester. | writes-output |
__init__.py (opens in a new tab)cli.py (opens in a new tab)contracts.py (opens in a new tab)cross_sectional/__init__.py (opens in a new tab)cross_sectional/execution.py (opens in a new tab)cross_sectional/exits.py (opens in a new tab)cross_sectional/factor_combination.py (opens in a new tab)cross_sectional/factor_frame.py (opens in a new tab)cross_sectional/io.py (opens in a new tab)cross_sectional/modular_backtester.py (opens in a new tab)cross_sectional/plotting.py (opens in a new tab)cross_sectional/risk_controls.py (opens in a new tab)cross_sectional/selection.py (opens in a new tab)cross_sectional/signals_base.py (opens in a new tab)cross_sectional/signals_top_pct.py (opens in a new tab)cross_sectional/strategy_comparison.py (opens in a new tab)cross_sectional/types.py (opens in a new tab)ports.py (opens in a new tab)references/python-api.md (opens in a new tab)time_series.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/analyzeMeasure returns (performance metrics, drawdowns, overfitting tests), screen factors by IC, grouped returns, horizon and lag IC surfaces, and factor correlation, run deterministic factor preflight and evaluation, and test stationarity with `uv run qs analyze ...`./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 ...`./quantspace:strategyfrom quantspace
quantspace@quantskills is listed by quantskills/registry — review the source before installing
npx claudepluginhub quantskills/registry --plugin quantspaceOther plugins' skills for the same job