Agent Skill
Short answer
QuantWave ships an agent skill — a packaged set of instructions that teaches coding
agents (Claude Code, and any tool that reads the agent-skill format) how to use
QuantWave correctly and which mistakes produce wrong-but-plausible numbers.
Install it by copying .claude/skills/quantwave/ into your own project.
Why this exists
Most QuantWave mistakes are silent. roc returns percent while rocp returns a fraction;
stddev is population while pandas is sample; a signal of 1 opens one unit, not one
unit of capital. None of these raise. An agent writing a strategy from general TA knowledge
will hit them, produce a backtest, and report a Sharpe ratio that means nothing.
The skill front-loads those conventions so the agent gets them right the first time.
Install
Copy the skill directory from the repository into your project:
git clone --depth 1 https://github.com/lavs9/quantwave /tmp/quantwave
mkdir -p .claude/skills
cp -r /tmp/quantwave/.claude/skills/quantwave .claude/skills/
For availability across all your projects, copy it to ~/.claude/skills/ instead.
Agents discover it automatically — no configuration needed.
What's inside
| File | Contents |
|---|---|
SKILL.md |
Happy path: install, .ta vs plugins vs streaming, discovery, warmup, parity |
PITFALLS.md |
Twelve verified silent-wrongness cases, ordered by damage |
BACKTEST.md |
.bt input requirements, sizing model, and the full output contract |
scripts/check_usage.py |
Static linter for the anti-patterns — no dependencies |
Linting your own code
The linter runs standalone, with no QuantWave import and no third-party dependencies:
strategy.py:12: [PITFALLS §1] No `size_multiplier_col`: signal=1 opens 1 unit, not 1 unit of capital.
fix: Add a Float64 sizing column, e.g. (initial_cash * 0.95 / close).
strategy.py:12: [PITFALLS §6] `execution_delay` defaults to "same_bar" — fills on the signal bar's own close.
fix: Pass execution_delay="next_bar" for any strategy claiming execution realism.
Exit code is 1 when there are findings, 0 when clean — so it drops into CI or a
pre-commit hook directly.
The pitfalls it covers
signal=1means one unit, not one unit of capital- Ratio metrics (
sharpe,sortino,profit_factor) go toinfon thin trade counts rocis ×100;rocpis the fractionstddevis ddof=0; pandas.std()is ddof=1ta_*plugins take(high, low, close)— the receiver must behigh, notcloseexecution_delaydefaults to the optimistic"same_bar"hmm_bull_bearbatch-fits the series — look-ahead- Multi-symbol frames must be sorted
["timestamp", "symbol"], in that order drop_nulls()does not remove warmup — warmup isNaN, notnull- Metrics are fractions, not percents;
max_drawdown_pctis positive - Plugins are stateless; streaming instances are stateful and per-symbol
- Parameter names are not uniform —
timeperiodvsperiod
Each is reproduced against the current release rather than inferred from the source.
Related
- Plugin vs
.ta— choosing an integration surface - Backtest Output Contract — the authoritative schema
- llms.txt — canonical page index for AI crawlers