quantskills/agent-quantspace/strategy
- community
Checking that the SKILL.md file is still in the repository.
Use when tasks need reusable strategy contracts, cross-sectional selection types, or time-series signal-to-weight helpers.
Install
npx vskill@latest install quantskills/agent-quantspace/strategySKILL.md
Strategy
skills/strategy owns reusable strategy types that convert features, scores, labels, or signals into date × symbol target weights. Concrete public strategy behavior remains under strategies/.
Public API
Boundaries
contracts.pydefines the strategy-neutral target-weight result and generator protocol.ports.pydefines only theMarketDataReaderprotocol needed by current workflows.cross_sectional/owns reusable ranking, selection, exit, risk-control, and
modular research types, including equal-rank, equal-vote, rolling IC, rolling ICIR, and correlation-aware maximum-IC / maximum-ICIR factor combinations.
hold_weights_on_calendarmaps signal-day target weights onto the full trading
calendar (forward hold, flat before the first signal) before backtesting.
time_series.pyowns signal-to-weight conversion and a research-only
TimeSeriesBacktester adapter that delegates execution to VectorBacktester.
- Concrete factors, features, rules, model pipelines, and workflows belong in
strategies/.
- Formal public execution always passes target weights to
skills.backtest.VectorBacktester.
TimeSeriesBacktester keeps exploratory prediction-frame analysis available, but does not implement a second return or metric engine. Published public strategy results should still use explicit target weights plus VectorBacktester.
Multi-factor combination recipe
Supported methods are equal rank, equal vote, rolling IC, rolling ICIR, correlation-aware maximum IC, and correlation-aware maximum ICIR. max_ic applies the inverse rolling factor-correlation matrix to rolling mean IC; max_icir applies it to rolling ICIR. Both require tidy correlation history with columns eob, factor_a, factor_b, and correlation. result.factor_weights is the factor-level voice in the composite score; result.target_weights is the separate asset allocation produced after Top-N selection. The public combination entry point always applies factor direction and daily cross-sectional normalization. Use normalization="rank" for robust percentile ranks or normalization="zscore" to retain relative score distance; do not pre-normalize inputs.
Time-series recipe
CLI command reference
<!-- BEGIN GENERATED: qs commands -->
Transport: --input-json FILE|-, --preview N, and --log-level LEVEL; flags override JSON. Use --print-template [FIELD] for fillable templates.
Shared parameter groups
PanelSource
| Option | Type / default | Description | |
|---|---|---|---|
--panel | path? / null | Parquet/CSV panel, mutually exclusive with symbols or symbols-file. | |
--symbols | list[string] / factory | QuantSpace symbols such as SHSE.510300; repeat flag or comma-separate. | |
--symbols-file | path? / null | Text lines or JSON list of QuantSpace symbols. | |
--frequency | string / 1d | Market store directory under data/market, for example 1d or 1d_adj. | |
--data-root | path? / null | Managed data root; otherwise QUANTSPACE_DATA_ROOT or repository data/. | |
--start | string? / null | Inclusive start date: YYYY-MM-DD or YYYYMMDD. | |
--end | string? / null | Inclusive end date: YYYY-MM-DD or YYYYMMDD. | |
--fields | list[string] / factory | Optional panel field subset. |
OutputOptions
| Option | Type / default | Description | |
|---|---|---|---|
--output | path? / null | Explicit output path outside managed store namespaces. | |
--overwrite | boolean / false | Allow replacing an existing output artifact. | |
--data-root | path? / null | Managed data root; otherwise QUANTSPACE_DATA_ROOT or repository data/. |
uv run qs strategy top-n
Equal-weight the top N scores on each date.
Priority: P1. Side effects: writes-output.
Shared parameters: OutputOptions.
| Option | Type / default | Description | |
|---|---|---|---|
--output | path / required | Destination target-weight table. | |
--scores | path / required | Date by symbol score table; higher is better. | |
--top-n | integer / required | Names held per date. | |
--gross-exposure | number / 1.0 | Total weight per date. |
Output data fields: rows, columns, start, end, preview.
Inspect schemas: uv run qs schema strategy.top-n (add --part input|output or --file-field FIELD).
uv run qs strategy signal-weights
Turn a single-asset signal into target weights.
Priority: P1. Side effects: writes-output.
Shared parameters: OutputOptions.
| Option | Type / default | Description | |
|---|---|---|---|
--output | path / required | Destination one-column target-weight table. | |
--signal | path / required | Signal table with an eob index or column. | |
--column | string / signal | Signal column; values are clipped to [-1, 1]. | |
--symbol | string / required | QuantSpace symbol that receives the weights. | |
--exposure | number / 1.0 | Weight multiplier. |
Output data fields: rows, columns, start, end, preview.
Inspect schemas: uv run qs schema strategy.signal-weights (add --part input|output or --file-field FIELD).
uv run qs strategy hold-calendar
Forward-hold signal-day weights across a panel's trading calendar.
Priority: P1. Side effects: writes-output.
Shared parameters: PanelSource, OutputOptions.
| Option | Type / default | Description | |
|---|---|---|---|
--output | path / required | Destination daily target-weight table. | |
--weights | path / required | Signal-day target weights (date by symbol). |
Output data fields: rows, columns, start, end, preview.
Inspect schemas: uv run qs schema strategy.hold-calendar (add --part input|output or --file-field FIELD).
uv run qs strategy combine
Combine raw factors into composite scores and Top-N weights.
Priority: P1. Side effects: writes-output.
Shared parameters: OutputOptions.
| Option | Type / default | Description | ||||||
|---|---|---|---|---|---|---|---|---|
--factors | object / required | Raw factor tables by name, each date by symbol, e.g. mom=mom.parquet. | ||||||
--directions | object / required | Direction for every factor: 1 if larger is better, -1 otherwise. | ||||||
--method | `equal_rank\ | equal_vote\ | rolling_ic\ | rolling_icir\ | max_ic\ | max_icir / required` | Combination method. | |
--normalization | `rank\ | zscore / rank` | Daily cross-sectional normalization. | |||||
--top-n | integer / 3 | Assets selected from the composite score. | ||||||
--ic-history | path? / null | IC of direction-oriented factors (pass --directions to analyze ic-surface); required by rolling and max methods. Either a date by factor table, or the tidy daily_ic table written by analyze ic-surface (factor, horizon, lag, eob, ic), which also needs --ic-horizon. | ||||||
--ic-horizon | integer? / null | Horizon of the tidy daily_ic rows to use; required for a tidy --ic-history and rejected for a wide one. | ||||||
--ic-lag | integer / 0 | Lag of the tidy daily_ic rows to use (tidy input only). | ||||||
--correlation-history | path? / null | Tidy table with eob, factor_a, factor_b, correlation, computed on direction-oriented ranked factors (analyze factor-correlation --directions writes it); required by max methods. | ||||||
--availability-delay | integer? / null | Bars before an IC becomes known (signal_lag + horizon); required by rolling and max methods. | ||||||
--lookback | integer / 252 | Rolling IC window. | ||||||
--min-periods | integer / 126 | Minimum IC observations. | ||||||
--max-weight | number / 0.5 | Cap on one factor's weight. | ||||||
--correlation-shrinkage | number / 0.5 | Shrink factor correlations toward identity. | ||||||
--out-dir | path / required | Directory for factor_weights, composite_scores and target_weights Parquet files. |
Output data fields: method, factors, rows, start, end, latest_factor_weights.
Inspect schemas: uv run qs schema strategy.combine (add --part input|output or --file-field FIELD).
uv run qs strategy cs-run
Run a factor-voting Top-pct cross-sectional strategy with ModularBacktester.
Priority: P1. Side effects: writes-output.
Shared parameters: PanelSource.
| Option | Type / default | Description | ||||
|---|---|---|---|---|---|---|
--start | string? / null | First result date (start_date); earlier bars still load. Pass a trimmed --panel from qs store read to limit history. | ||||
--end | string? / null | Last result date (end_date); later bars still load. Pass a trimmed --panel from qs store read to limit history. | ||||
--factors | list[FactorItem] / required | Entry factors voted into the Top-pct selection. | ||||
--exit-filters | list[ExitFilterItem] / factory | Exit filters applied to selected weights. | ||||
--top-pct | number / 0.2 | Fraction of names selected. | ||||
--trade-at | `open\ | close / close` | Execution price field. | |||
--signal-lag | integer / 1 | Bars between signal and execution. | ||||
--commission | number / 0.0002 | One-way commission rate. | ||||
--slippage-bp | number / required | One-way slippage in basis points. | ||||
--rebalance-freq | string / 1 | D, W, M, or a positive number of bars between rebalances. | ||||
--weight-method | `equal\ | risk_parity\ | inverse_variance\ | epo / equal` | WEIGHT_METHODS key for selected names. | |
--vol-target | number? / null | Optional volatility target. | ||||
--exposure-policy | `keep_cash\ | renormalize\ | allocate_defensive / keep_cash` | What happens to weight removed by exit filters. | ||
--defensive-symbols | list[string] / factory | Symbols for the allocate_defensive policy. | ||||
--out-dir | path? / null | Optional directory for signal_weights, executed_weights, result Parquet files and metrics.json. | ||||
--overwrite | boolean / false | Allow replacement of existing output files. |
Output data fields: metrics, weight_stats, rows, start, end.
Inspect schemas: uv run qs schema strategy.cs-run (add --part input|output or --file-field FIELD).
<!-- END GENERATED: qs commands -->
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/strategy/SKILL.md
Popularity
- Repository stars
- 57
- Repository forks
- 11
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/quantskills/agent-quantspace/strategy)