← Back to list

strategy-backtest
by gevans3000
⭐ 0🍴 0📅 Jan 25, 2026
SKILL.md
name: strategy-backtest description: Backtest a strategy and compare performance against the baseline
Strategy Backtest Skill
This skill runs a full backtest on any named strategy and compares it against the default baseline.
Usage
Invoke with: /strategy-backtest <strategy_name> [bars]
Examples:
/strategy-backtest scalp_1m_sweep/strategy-backtest scalp_1m_sweep 2000
Parameters
strategy_name(required): Name of strategy file inconfig/strategies/(without.json)bars(optional): Number of bars to backtest (default: 1000)
Steps
// turbo-all
Step 1: Validate Strategy Exists
$strategyPath = "config/strategies/$strategyName.json"
if (-not (Test-Path $strategyPath)) {
Write-Error "Strategy not found: $strategyPath"
exit 1
}
Write-Host "Strategy found: $strategyPath"
Step 2: Run Baseline Backtest
Run default strategy first to establish baseline:
$env:PYTHONPATH="src"; .\.venv\Scripts\python.exe -m src.laptop_agents.run --mode backtest --source mock --backtest $bars
Save metrics from runs/latest/stats.json as baseline.
Step 3: Run Target Strategy Backtest
$env:PYTHONPATH="src"; .\.venv\Scripts\python.exe -m src.laptop_agents.run --strategy $strategyName --mode backtest --source mock --backtest $bars
Step 4: Extract Metrics
Parse runs/latest/stats.json for:
net_pnl: Net Profit/Lossmax_drawdown: Maximum Drawdowntrade_count: Number of tradeswin_rate: Win percentagesharpe_ratio: Risk-adjusted return (if available)
Step 5: Generate Comparison Report
Output a comparison table:
| Metric | Baseline (default) | Target ($strategyName) | Delta |
|---|---|---|---|
| Net PnL | $X | $Y | +/-$Z |
| Max Drawdown | X% | Y% | +/-Z% |
| Trade Count | N | M | +/-K |
| Win Rate | X% | Y% | +/-Z% |
Step 6: Pass/Fail Determination
The strategy PASSES if:
- Net PnL > 0
- Max Drawdown < 10%
- Trade Count > 10
Output Artifacts
- Comparison table printed to console
- Full results available in
runs/latest/
On Failure
- Report which criteria failed
- Suggest parameter adjustments if drawdown is too high
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon