strategy
Use when tasks need reusable strategy contracts, cross-sectional selection types, or time-series signal-to-weight helpers.
Skill by quantskills
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/quantskills-strategy
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/strategy
What's inside
- Skill name
strategy- Description
- Use when tasks need reusable strategy contracts, cross-sectional selection types, or time-series signal-to-weight helpers.
- License
- GPL-3.0
- Instructions
- 101 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (19)
- SKILL.md
- __init__.py
- contracts.py
- __init__.py · cross_sectional/
- execution.py · cross_sectional/
- exits.py · cross_sectional/
- factor_combination.py · cross_sectional/
- factor_frame.py · cross_sectional/
- io.py · cross_sectional/
- modular_backtester.py · cross_sectional/
- plotting.py · cross_sectional/
- risk_controls.py · cross_sectional/
- selection.py · cross_sectional/
- signals_base.py · cross_sectional/
- signals_top_pct.py · cross_sectional/
- strategy_comparison.py · cross_sectional/
- types.py · cross_sectional/
- ports.py
- time_series.py
SKILL.md (first lines)
# 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
```python
from skills.strategy import StrategyContext, StrategyResult, WeightGenerator
from skills.strategy.cross_sectional import (
DynamicFactorWeightConfig,
ModularBacktester,
apply_rebalance_schedule,
combine_factor_scores,
estimate_factor_weights,
hold_weights_on_calendar,
normalize_factor_frames,
rank_factor_frames,
top_n_weights,
)
from skills.strategy.time_series import signal_to_single_asset_weights
```
## Boundaries
- `contracts.py` defines the strategy-neutral target-weight result and generator protocol.
- `ports.py` defines only the `MarketDataReader` protocol 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_calendar` maps signal-day target weights onto the full trading
calendar (forward hold, flat before the first signal) before backtesting.
- `time_series.py` owns 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
```python
from skills.strategy.cross_sectional import (
DynamicFactorWeightConfig,
combine_factor_scores,
)
config = DynamicFactorWeightConfig(
availability_delay=signal_lag + horizon,
lookback=252,
min_periods=126,
max_weight=0.5,
correlation_shrinkage=0.5,
)
result = combine_factor_scores(
raw_factors,
method="max_icir",
directions=factor_directions,
normalization="rank",
top_n=3,
ic_history=ic_history,
correlation_history=rolling_rank_correlations,
dynamic_config=config,
)
```
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
```python
from skills.backtest import VectorBacktester
from skills.strategy.time_series import signal_to_single_asset_weights
weights = signal_to_single_asset_weights(signal, symbol="SHSE.510300")
result = VectorBacktester(
panel,
signal_lag=1,
commission=0.0002,
slippage_bp=2.0,
).run(weights)
```
## 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. |From quantskills/agent-quantspace, GPL-3.0.
More from quantskills/agent-quantspace
- 0.667score
analyze
quantskills
Use when tasks need factor diagnostics, IC/grouped return analysis, attribution, robustness checks, deterministic factor-mining evaluation, or time-series…
SkillAFreshness: A★ 64Claude Code +9 - 0.632score
ingest
quantskills
Use when tasks need PandaData/PandaAI stock, fund, ETF, index, or futures data, reference data, adjustment factors, futures tick downloads, or symbol…
SkillBFreshness: B★ 64Claude Code +9 - 0.627score
report
quantskills
Use when tasks need complete HTML research reports, HTML dashboards, PNG chart helpers, or files under the research reports directory.
SkillBFreshness: B★ 64Claude Code +9 - 0.627score
ml
quantskills
Use when tasks need optional PyCaret model training, ML factor generation, inference wrappers, feature importance, or sparse LASSO weight generation.
SkillBFreshness: B★ 64Claude Code +9 - 0.627score
backtest
quantskills
Use when tasks need vectorized strategy execution, portfolio weighting, portfolio-level filters, transaction cost helpers, exit A/B analysis, overlay metrics…
SkillBFreshness: B★ 64Claude Code +9 - 0.627score
compute
quantskills
Use when tasks need strategy-agnostic OHLCV indicators, math utilities, generic factor examples, regime slicing, resampling, or label makers.
SkillBFreshness: B★ 64Claude Code +9 - 0.626score
store
quantskills
Use when tasks need local market Parquet data, factor artifacts, backtest data, or model files through DataManager.
SkillBFreshness: B★ 64Claude Code +9 - 0.623score
factor_mining
quantskills
Use when tasks need AI multi-agent factor mining research boundaries, versioned ResearchBrief/FactorSpec contracts, evaluation/review/decision objects, or…
SkillBFreshness: B★ 64Claude Code +9 - 0.621score
research
quantskills
Use when tasks need reusable research pipeline templates, factor screening, or parameter sensitivity sweeps.
SkillBFreshness: B★ 64Claude Code +9
Signals
- Stars
- 64
- Forks
- 14
- Open issues
- 2
- Last commit (this folder)
- Sep 14, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- GPL-3.0
- Repository
- github.com/quantskills/agent-quantspace
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from quantskills
- 0.667score
analyze
quantskills
Use when tasks need factor diagnostics, IC/grouped return analysis, attribution, robustness checks, deterministic factor-mining evaluation, or time-series…
SkillAFreshness: A★ 64Claude Code +9 - 0.632score
ingest
quantskills
Use when tasks need PandaData/PandaAI stock, fund, ETF, index, or futures data, reference data, adjustment factors, futures tick downloads, or symbol…
SkillBFreshness: B★ 64Claude Code +9 - 0.627score
report
quantskills
Use when tasks need complete HTML research reports, HTML dashboards, PNG chart helpers, or files under the research reports directory.
SkillBFreshness: B★ 64Claude Code +9 - 0.627score
ml
quantskills
Use when tasks need optional PyCaret model training, ML factor generation, inference wrappers, feature importance, or sparse LASSO weight generation.
SkillBFreshness: B★ 64Claude Code +9 - 0.627score
backtest
quantskills
Use when tasks need vectorized strategy execution, portfolio weighting, portfolio-level filters, transaction cost helpers, exit A/B analysis, overlay metrics…
SkillBFreshness: B★ 64Claude Code +9 - 0.627score
compute
quantskills
Use when tasks need strategy-agnostic OHLCV indicators, math utilities, generic factor examples, regime slicing, resampling, or label makers.
SkillBFreshness: B★ 64Claude Code +9
Cite this page
strategy skill. Agent Mart. https://agentmart.dev/skills/quantskills-strategy (last updated 2026-10-24)