Manifoldbt Backtester
Runs a declarative strategy spec over OHLCV bars with the manifoldbt Rust engine, pairs...
Install
npx skills add tradermonty/claude-trading-skills --skill manifoldbt-backtester -g -a claude-code -y- Repository
- tradermonty/claude-trading-skills3.5k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Lightabout 1,444 tokens
- Runs scripts
- Yes, review before use
What it does
Runs a declarative strategy spec over OHLCV bars with the manifoldbt Rust engine, pairs the fill log into round trips, and emits the eight inputs the backtest-expert skill scores. Use when the user wants to execute a backtest, measure a rule they have described, obtain win rate / average win / average loss / max drawdown from real bars, or feed backtest-expert with measured numbers instead of estimates.
manifoldbt Backtester Skill
Purpose
Execute what backtest-expert teaches. That skill grades a backtest on five
dimensions, and its prerequisites say "metrics are user-provided": it scores
numbers it never produces. This skill produces them. It runs a strategy over
real bars and returns the eight inputs its evaluator asks for.
The two chain in one direction: spec, run, evaluate.
When to Use This Skill
- A user describes a rule and wants it measured
backtest-expertis about to run and the numbers do not exist yet- A win rate, average winner, average loser or drawdown must come from bars
- A strategy's parameter count must be established for scoring
Leave the verdict to backtest-expert. It owns the thresholds and the red
flags, and this skill does not duplicate them.
Prerequisites
- Python 3.9+
pip install manifoldbt(Apache 2.0 with Commons Clause; the free tier covers everything this skill does)- OHLCV bars as CSV or Parquet with columns
timestamp, open, high, low, close, volume - No API key required
Workflow
1. Write the strategy spec
A spec names indicators and one entry condition. Keep it to the smallest rule that states the hypothesis. Every added knob makes an in-sample fit easier to reach by accident, and the evaluator penalises the count.
{
"name": "sma_cross_costed",
"indicators": {
"fast": { "type": "sma", "period": 20 },
"slow": { "type": "sma", "period": 60 }
},
"entry": { "left": "fast", "op": ">", "right": "slow" },
"size": 1.0,
"stop_loss_pct": 1.5,
"fees_bps": 5.0,
"slippage_bps": 2.0
}
Field reference: references/strategy_spec.md.
Set fees_bps and slippage_bps to realistic values before you read any
result. A frictionless run scores 0 on execution realism, and over short holding
periods costs decide whether an edge survives.
