by marketcalls
Agentic coding skills for backtesting trading strategies using VectorBT. Supports Indian, US, and Crypto markets with realistic transaction cost modeling, TA-Lib indicators, QuantStats tearsheets, and 12 ready-made strategy templates.
# Add to your Claude Code skills
git clone https://github.com/marketcalls/vectorbt-backtesting-skillsGuides for using ai agents skills like vectorbt-backtesting-skills.
vectorbt-backtesting-skills is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by marketcalls. Agentic coding skills for backtesting trading strategies using VectorBT. Supports Indian, US, and Crypto markets with realistic transaction cost modeling, TA-Lib indicators, QuantStats tearsheets, and 12 ready-made strategy templates. It has 232 GitHub stars.
vectorbt-backtesting-skills's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/marketcalls/vectorbt-backtesting-skills" and add it to your Claude Code skills directory (see the Installation section above).
vectorbt-backtesting-skills is primarily written in Python. It is open-source under marketcalls on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh vectorbt-backtesting-skills against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
A comprehensive collection of backtesting skills for trading strategies using VectorBT. Works with 40+ AI coding agents via skills.sh — including Claude Code, Cursor, Codex, OpenCode, Cline, Windsurf, GitHub Copilot, Gemini CLI, Roo Code, and more.
Supports Indian markets, US markets, and Crypto markets with realistic transaction cost modeling, OpenAlgo indicators (100+, TA-Lib available on request), market-specific benchmarking, OpenStatz tearsheets, and robustness testing. Broker-neutral by design — fee models use industry-standard references that can be customized for any broker.
Install the skills into your project using npx skills. The CLI auto-detects your AI coding agent and installs skills to the correct directory.
# GitHub shorthand
npx skills add marketcalls/vectorbt-backtesting-skills
# Full GitHub URL
npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills
Install a specific skill only:
npx skills add marketcalls/vectorbt-backtesting-skills -s backtest
npx skills add marketcalls/vectorbt-backtesting-skills -s optimize
npx skills add marketcalls/vectorbt-backtesting-skills -s vectorbt-expert
npx skills add marketcalls/vectorbt-backtesting-skills -s setup
List available skills before installing:
npx skills add marketcalls/vectorbt-backtesting-skills -l
Install globally (available across all projects):
npx skills add marketcalls/vectorbt-backtesting-skills -g
Skills are installed via skills.sh which supports 40+ agents. Each agent reads skills from its own directory:
| Agent | Skills Directory |
|---|---|
| Claude Code | .claude/skills/ |
| Cursor | .agents/skills/ |
| Codex | .agents/skills/ |
| OpenCode | .agents/skills/ |
| Cline | .agents/skills/ |
| Windsurf | .agents/skills/ |
| GitHub Copilot | .agents/skills/ |
| Gemini CLI | .agents/skills/ |
| Roo Code | .agents/skills/ |
| + 30 more | Auto-detected by npx skills |
The npx skills add command detects which agents you have installed and places the skill files in the correct paths automatically.
| Market | Data Source | Fee Reference | Default Benchmark |
|---|---|---|---|
| India | OpenAlgo (NSE, BSE, NFO, MCX) | Delivery, Intraday, F&O (4-segment) | NIFTY 50 |
| US | yfinance (NYSE, NASDAQ) | Stocks, Options, Futures (per-share + per-contract) | S&P 500 |
| Crypto | yfinance / CCXT | Spot, Perpetual Futures (maker/taker) | Bitcoin |
| Custom | Any provider via extensible pattern | User-defined | User-defined |
Broker-neutral: Fee models use realistic industry-standard defaults and can be adjusted for any broker by changing the
feesandfixed_feesconstants.
| Command | What It Does |
|---|---|
/setup |
Detects OS, creates venv, installs OpenAlgo + all packages (TA-Lib optional), creates backtesting/ folders, configures .env with API keys |
/backtest |
Generates a complete backtest script with signals, market-specific fees, benchmark comparison, plain-language report, OpenStatz tearsheet |
/optimize |
Parameter grid search with OpenAlgo ta indicators, tqdm progress bars, Plotly heatmaps, best params vs benchmark |
/quick-stats |
Inline code block (no file) — fetch data, run EMA crossover, print compact stats + benchmark alpha |
/strategy-compare |
Side-by-side comparison of multiple strategies on same symbol, overlaid equity curves |
| Strategy | Type | Description |
|---|---|---|
| EMA Crossover | Trend | EMA 10/20 crossover |
| RSI | Mean-reversion | RSI(14) oversold/overbought |
| Donchian Channel | Breakout | Channel breakout with shifted levels (no lookahead) |
| Supertrend | Trend | Supertrend with intraday session windows (9:30-15:00, exit 15:15) |
| MACD | Trend + Breakout | MACD zero-line regime + signal-candle breakout |
| SDA2 | Trend | WMA + STDDEV + ATR band system |
| Double Momentum | Momentum | MOM + MOM-of-MOM with next-bar fill |
| Dual Momentum | Rotation | Quarterly ETF rotation (NIFTYBEES vs GOLDBEES) |
| Buy & Hold | Passive | Static multi-asset allocation with FD benchmark |
| RSI Accumulation | Accumulation | Weekly RSI slab-wise buying (5%/10%/20% by RSI level) |
| Walk-Forward | Validation | Rolling train/test optimization with WFE scoring |
| Realistic Costs | Analysis | Same strategy across 5 fee tiers (zero to full delivery) |
| Category | What's Covered |
|---|---|
| Data | OpenAlgo (India), yfinance (US/Global), CCXT (Crypto), custom providers, .env + python-dotenv, CSV loading, resampling |
| Indicators | OpenAlgo ta by default - 100+ indicators (EMA, SMA, RSI, MACD, BBands, ATR, ADX, STDDEV, MOM, Supertrend, Donchian, Ichimoku, HMA, KAMA, ALMA, ZLEMA, VWMA, oscillators, statistical, hybrid). TA-Lib only if explicitly requested |
| Signals | ta.exrem() signal cleaning, ta.crossover(), ta.crossunder(), ta.flip() regime detection |
| Simulation | from_signals, from_orders, from_holding, long/short/both directions |
| Sizing | Percent, Value, TargetPercent, whole shares (min_size=1), futures lot sizes, fractional crypto |
| Costs | India: 4-segment model (Delivery 0.111%, Intraday 0.0225%, Futures 0.018%, Options 0.098%). US: Per-share + per-contract model (Stocks ~0.01%, Options ~0.2%, Futures ~0.001%). Crypto: Maker/taker model (Spot 0.1%, Futures 0.02%/0.05%, funding rates). All customizable. |
| Futures | SEBI revised lot sizes (Dec 2025): NIFTY=65, BANKNIFTY=30, FINNIFTY=60. US: E-mini/Micro contract specs |
| Risk | Stop loss, take profit, trailing stop (sl_trail) |
| Optimization | Loop-based (OpenAlgo ta / TA-Lib compliant) + broadcasting (vbt.MA exception for parameter sweeps) |
| Benchmarking | India: NIFTY 50 via OpenAlgo. US: S&P 500 (^GSPC). Crypto: Bitcoin (BTC-USD). Strategy vs Benchmark table always produced |
| Reporting | Plain-language backtest explanation for normal traders. OpenStatz HTML tearsheets with 30+ metrics, Monte Carlo simulations |
| Plotting | Plotly dark theme, candlestick with xaxis type="category" (no weekend gaps), VectorBT 7-panel plot pack |
| Validation | Walk-forward analysis (WFE ratio), robustness testing (Monte Carlo trade shuffle, noise injection, parameter sensitivity, entry/exit delay, cross-symbol validation) |
| Safety | 10 common pitfalls with prevention, checklist before going live |
Install any supported AI coding agent. For example:
npm install -g @anthropic-ai/claude-codenpm install -g @openai/codexgo install github.com/opencode-ai/opencode@latestThen install the skills:
npx skills add marketcalls/vectorbt-backtesting-skills
Indian Markets — requires OpenAlgo:
git clone https://github.com/marketcalls/openalgo.git
cd openalgo
pip install -r requirements.txt
python app.py
OpenAlgo runs locally at http://127.0.0.1:5000. You need a broker account connected via OpenAlgo and an API key from the dashboard. See OpenAlgo documentation.
US Markets — no setup needed. Uses yfinance (public Yahoo Finance data).
Crypto Markets — no setup needed for public data (yfinance or CCXT). Exchange API keys are optional (only for private endpoints).
Use the /setup skill for automated setup, or manually:
python -m venv venv
source venv/bin/activate # Linux/Mac
# venv\Scripts\activate # Windows
# Install Python packages (OpenAlgo ta is the default indicator library - no C library needed)
pip install openalgo vectorbt plotly anywidget nbformat pandas numpy yfinance python-dotenv tqdm scipy numba ipywidgets openstatz ccxt
# Optional: only if you want to be able to request TA-Lib explicitly in a backtest
brew install ta-lib # macOS
# sudo apt install libta-lib-dev # Linux
pip install ta-lib
cp .env.sample .env
# Edit .env with your API keys
/setup - Environment SetupDetects OS, creates venv, installs dependencies, creates folder structure, and collects API keys into .env.
/setup
/setup python3.12
/backtest - Quick BacktestCreate a complete backtest script with market-specific fees, benchmark comparison, plain-language report, and OpenStatz tearsheet.
# Indian Markets
/backtest ema-crossover SBIN NSE D
/backtest rsi RELIANCE NSE D
/backtest supertrend NIFTY NFO 5m
# US Markets
/backtest ema-crossover AAPL
/backtest rsi MSFT
# Crypto Markets
/backtest ema-crossover BTC-USD
/optimize - Parameter OptimizationOptimize strategy parameters, generate Plotly heatmaps, and compare best parameters vs benchmark.
/optimize ema-crossover SBIN NSE D
/optimize rsi AAPL
/quick-stats - Inline StatsPrint key backtest stats with benchmark comparison without creating a file.
/quick-stats RELIANCE
/quick-stats AAPL
/quick-stats BTC-USD