Skip to main content
skill CX Codex

backtest — Claude Code skill for strategy tests and setup

Builds a Python script to test a trading strategy against a chosen symbol. It can report performance, compare a benchmark, and plot results.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add marketcalls/vectorbt-backtesting-skills --skill backtest -a claude-code
Open on GitHub

What backtest does

The skill creates a script under backtesting/{strategy_name}/ to fetch market data, generate signals, and run a VectorBT backtest. It prints portfolio statistics and a strategy-versus-benchmark comparison, plots equity and drawdown, then exports trades to CSV. Available templates cover EMA Crossover, RSI, Donchian, Supertrend, MACD, SDA2, Momentum, Dual Momentum, Buy & Hold, and RSI Accumulation.

Data can come from OpenAlgo or a DuckDB file supplied by the user. OpenAlgo’s ta module handles indicators unless the user specifically requests TA-Lib; the skill also accounts for Indian delivery and futures fees, with lot-based sizing for NIFTY and BANKNIFTY. Check the data source before running the generated script: the backtest needs market data to produce results.

What it helps with

  • generate a VectorBT script for a chosen strategy and symbol
  • load historical prices from OpenAlgo or DuckDB
  • compare strategy performance with NIFTY or a requested benchmark
  • plot portfolio growth and drawdown
  • export executed trades to CSV

Example prompts for the agent

  • Run /backtest ema-crossover RELIANCE NSE D to create a script that tests this strategy.
  • Test RSI on SBIN with /backtest rsi SBIN.
  • Create a Supertrend backtest for NIFTY on the 5m interval using /backtest supertrend NIFTY NFO 5m.

How to install backtest

1Skills CLI (Vercel)

npx skills add marketcalls/vectorbt-backtesting-skills --skill backtest -a claude-code

2Manually: put the files in place

~/.claude/skills/backtest/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/backtest/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about backtest

How do I install backtest in Claude Code?

Run npx skills add marketcalls/vectorbt-backtesting-skills --skill backtest -a claude-code. The skill file is placed at ~/.claude/skills/backtest/SKILL.md.

What does the backtest skill do?

It generates a Python script that runs a VectorBT strategy test, gathers performance statistics, plots the results, and saves trades as CSV.

Can it use data stored in DuckDB?

Yes. Pass a database path to load data directly, with support for Historify-style data and a custom ohlcv table. If openalgo.ta cannot be imported, the generated script falls back to inline exrem().

Similar skills

SKILL.md skills catalog →

From the same set6

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor