How marketcalls/vectorbt-backtesting-skills works
This repository is an instruction and example library for AI coding agents to create VectorBT backtests, rather than a backtesting service. The principal workflow is an agent using an invocable skill to produce a backtest from market data through strategy signals and portfolio simulation to benchmarked results and reports. Separate skills cover setup, optimization, quick statistics, and strategy comparison; the expert skill and its rules provide broader market and methodology guidance. README documents these capabilities; the sampled scripts show concrete OpenAlgo data retrieval, VectorBT simulation, benchmark analysis, plots, and exports.
Main entry points: SBIN_ema_crossover_backtest.py EMA crossover example · buy_hold_75_25_backtest.py Buy-and-hold example · dual_momentum_backtest.py Dual momentum example · niftybees_rsi_accumulation_backtest.py RSI accumulation example
Components 17
Agent Skills
- Setup skill
.claude/skills/setup/SKILL.md - Backtest skill
.claude/skills/backtest/SKILL.md - Optimize skill
.claude/skills/optimize/SKILL.md - Quick stats skill
.claude/skills/quick-stats/SKILL.md - Strategy compare skill
.claude/skills/strategy-compare/SKILL.md
Backtesting Guidance
- VectorBT expert skill
.claude/skills/vectorbt-expert/SKILL.md - Market and method rules
.claude/skills/vectorbt-expert/rules
Backtest Examples
- Strategy templates
.claude/skills/vectorbt-expert/rules/assets - EMA crossover example
backtesting/SBIN_ema_crossover_backtest.py - Buy-and-hold example
backtesting/buy_hold_75_25_backtest.py - Dual momentum example
backtesting/dual_momentum_backtest.py - RSI accumulation example
backtesting/niftybees_rsi_accumulation_backtest.py
Other components
- AI coding agent
- OpenAlgo data API
- VectorBT simulation
- Metrics and benchmarks
- Plots and exports
Connections 28
- AI coding agent → Setup skill: invokes
README.md - AI coding agent → Backtest skill: invokes
README.md - AI coding agent → Optimize skill: invokes
README.md - AI coding agent → Quick stats skill: invokes
README.md - AI coding agent → Strategy compare skill: invokes
README.md - AI coding agent → VectorBT expert skill: consults
README.md - VectorBT expert skill → Market and method rules: provides guidance
- VectorBT expert skill → Strategy templates: provides templates
- AI coding agent → EMA crossover example: uses example
README.md - AI coding agent → Buy-and-hold example: uses example
README.md - AI coding agent → Dual momentum example: uses example
README.md - AI coding agent → RSI accumulation example: uses example
README.md - EMA crossover example → OpenAlgo data API: fetches data
backtesting/SBIN_ema_crossover_backtest.py - EMA crossover example → VectorBT simulation: simulates portfolio
backtesting/SBIN_ema_crossover_backtest.py - EMA crossover example → Metrics and benchmarks: computes metrics
backtesting/SBIN_ema_crossover_backtest.py - EMA crossover example → Plots and exports: plots and exports
backtesting/SBIN_ema_crossover_backtest.py - Buy-and-hold example → OpenAlgo data API: fetches data
backtesting/buy_hold_75_25_backtest.py - Buy-and-hold example → VectorBT simulation: simulates portfolio
backtesting/buy_hold_75_25_backtest.py - Buy-and-hold example → Metrics and benchmarks: compares benchmarks
backtesting/buy_hold_75_25_backtest.py - Buy-and-hold example → Plots and exports: plots and exports
backtesting/buy_hold_75_25_backtest.py - Dual momentum example → OpenAlgo data API: fetches data
backtesting/dual_momentum_backtest.py - Dual momentum example → VectorBT simulation: simulates portfolio
backtesting/dual_momentum_backtest.py - Dual momentum example → Metrics and benchmarks: compares benchmarks
backtesting/dual_momentum_backtest.py - Dual momentum example → Plots and exports: plots and exports
backtesting/dual_momentum_backtest.py - RSI accumulation example → OpenAlgo data API: fetches data
backtesting/niftybees_rsi_accumulation_backtest.py - RSI accumulation example → VectorBT simulation: simulates portfolio
backtesting/niftybees_rsi_accumulation_backtest.py - RSI accumulation example → Metrics and benchmarks: compares benchmarks
backtesting/niftybees_rsi_accumulation_backtest.py - RSI accumulation example → Plots and exports: plots and exports
backtesting/niftybees_rsi_accumulation_backtest.py