Backtest

From marketcalls/vectorbt-backtesting-skills · View interactive version

Backtest is an AI agent skill from the GitHub repository marketcalls/vectorbt-backtesting-skills. Quick backtest a strategy on a symbol. Creates a complete .py script with data fetch, signals, backtest, stats, and plots.

How to use this skill

Skill file

Create a complete VectorBT backtest script for the user.

Arguments

Parse $ARGUMENTS as: strategy symbol exchange interval

If no arguments, ask the user which strategy they want.

Instructions

  1. Read the vectorbt-expert skill rules for reference patterns
  2. Create backtesting/{strategy_name}/ directory if it doesn't exist (on-demand)
  3. Create a .py file in backtesting/{strategy_name}/ named {symbol}_{strategy}_backtest.py
  4. Use the matching template from rules/assets/{strategy}/backtest.py as the starting point
  5. The script must:
  1. Never use icons/emojis in code or logger output
  2. For futures symbols (NIFTY, BANKNIFTY), use lot-size-aware sizing:

Available Strategies

| Strategy | Keyword | Template |

|----------|---------|----------|

| EMA Crossover | ema-crossover | assets/ema_crossover/backtest.py |

| RSI | rsi | assets/rsi/backtest.py |

| Donchian Channel | donchian | assets/donchian/backtest.py |

| Supertrend | supertrend | assets/supertrend/backtest.py |

| MACD Breakout | macd | assets/macd/backtest.py |

| SDA2 | sda2 | assets/sda2/backtest.py |

| Momentum | momentum | assets/momentum/backtest.py |

| Dual Momentum | dual-momentum | assets/dual_momentum/backtest.py |

| Buy & Hold | buy-hold | assets/buy_hold/backtest.py |

| RSI Accumulation | rsi-accumulation | assets/rsi_accumulation/backtest.py |

Benchmark Rules

Example Usage

/backtest ema-crossover RELIANCE NSE D

/backtest rsi SBIN

/backtest supertrend NIFTY NFO 5m

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.