Skip to content
Back to skills

Trading Backtest

ASecurity

Backtest trading strategies written as simple rules on one or many symbols in any market - next-bar-open execution with no look-ahead, commissions and slippage, ATR/percent/rule-based stops, R or percent targets, trailing stops, time exits, risk-based position sizing, max concurrent positions with ranking, benchmark comparison, in-sample vs out-of-sample split and a self-contained HTML report. Use when the user asks "does this strategy work", "backtest X", "test a moving-average crossover", "...

  • 4 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added November 14, 2026
ai-agentspythongobash

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 14, 2026

npx -y skills add reddygopalkrishna/trading-skills --skill trading-backtest --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Trading Backtest?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Trading Backtest
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/reddygopalkrishna-trading-backtest/badge)](https://www.skillsdirectory.com/skills/reddygopalkrishna-trading-backtest)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: trading-backtest
description: Backtest trading strategies written as simple rules on one or many symbols in any market - next-bar-open execution with no look-ahead, commissions and slippage, ATR/percent/rule-based stops, R or percent targets, trailing stops, time exits, risk-based position sizing, max concurrent positions with ranking, benchmark comparison, in-sample vs out-of-sample split and a self-contained HTML report. Use when the user asks "does this strategy work", "backtest X", "test a moving-average crossover", "what if I bought when RSI was below 30", or wants to validate an idea before trading it.
license: MIT
metadata:
  author: reddygopalkrishna
  version: "0.2.0"
  pack: trading-skills
---

# Backtester (`trading-backtest`)

Test the idea on history before risking money. Honest defaults: costs on, no look-ahead, caveats printed.

```bash
python3 scripts/backtest.py --spec assets/strategies/rsi2-pullback.json --universe AAPL,MSFT,NVDA,AMZN,GOOGL \
    --oos-start 2021-01-01 --report rsi2.html
python3 scripts/backtest.py SPY --entry "cross_above(sma(50), sma(200))" --exit "cross_below(sma(50), sma(200))" \
    --stop none --start 2005-01-01 --report golden_cross.html
python3 scripts/backtest.py --spec my.json --universe list.txt --set n=20 --set mult=3
python3 scripts/backtest.py --spec my.json --csv-dir ./data --universe A,B,C --trades-csv trades.csv --json
```

Example strategies: `assets/strategies/*.json` (RSI-2 pullback, Donchian breakout, golden cross,
VCP-style breakout, Bollinger mean reversion, Supertrend trend-follow).

## Workflow

1. Write the idea as rules - see [strategy-spec.md](references/strategy-spec.md) and the rule language
   in `../trading-scanner/references/rule-language.md`. Validate rules with `screen.py --check`.
2. Use 10+ years (`--period 10y` default, or `--start`) and several symbols, not one hand-picked chart.
3. Always set `--oos-start` (e.g. the last 30% of the period) and compare in- vs out-of-sample.
4. Generate `--report` and send the HTML to the user.
5. Feed the trade R-multiples to **trading-odds** to see realistic drawdown ranges.
6. Try 2-3 nearby parameter values with `--set`. If results collapse when a parameter moves slightly,
   the edge is not robust - say so.

## Presenting results

Lead with: return vs benchmark, max drawdown vs benchmark, number of trades, avg R, and the
out-of-sample verdict. Always include the printed caveats. Never describe backtest returns as
expected future returns, and never recommend live trading on fewer than ~100 trades of evidence.

Files in this skill

  • SKILL.md2.5 KB
  • assets/strategies/bollinger-reversion.json458 B
  • assets/strategies/donchian-breakout.json500 B
  • assets/strategies/golden-cross.json366 B
  • assets/strategies/rsi2-pullback.json491 B
  • assets/strategies/supertrend-follow.json551 B
  • assets/strategies/vcp-breakout.json685 B
  • references/strategy-spec.md2.9 KB
  • scripts/_vendor/tradekit/__init__.py516 B
  • scripts/_vendor/tradekit/alerts.py7.5 KB
  • scripts/_vendor/tradekit/analysis.py10.3 KB
  • scripts/_vendor/tradekit/backtest.py17.8 KB
  • scripts/_vendor/tradekit/brokers/__init__.py1022 B
  • scripts/_vendor/tradekit/brokers/_rest.py2.7 KB
  • scripts/_vendor/tradekit/brokers/base.py3.5 KB
  • scripts/_vendor/tradekit/brokers/dhan.py6.8 KB
  • scripts/_vendor/tradekit/brokers/fyers.py7.1 KB
  • scripts/_vendor/tradekit/brokers/groww.py7.7 KB
  • scripts/_vendor/tradekit/brokers/kite.py14.5 KB
  • scripts/_vendor/tradekit/brokers/paper.py12.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.