backtest

Generate a complete VectorBT backtest script for a specified strategy and symbol.

186|44|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills --skill backtest-marketcalls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backtest
Source: https://github.com/marketcalls/vectorbt-backtesting-skills/tree/main/.claude/skills/backtest
Command: npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills --skill backtest-marketcalls

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Backtesting trading strategies quickly on historical data by generating complete, executable VectorBT scripts that validate ideas before live deployment.

Core Features & Use Cases

  • Generate a complete VectorBT backtest script for a given strategy and symbol.
  • Use a templated starting point, load environment configuration, and fetch data via OpenAlgo.
  • Produce performance statistics, plots, and a trade log for review.

Quick Start

Provide a strategy, symbol, exchange, and interval to generate a ready-to-run backtest script.

Frequently Asked Questions about backtest

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I backtest a trading strategy using VectorBT?

To backtest a trading strategy using VectorBT, you provide a strategy, symbol, exchange, and interval to generate a ready-to-run Python script. The script fetches historical data via OpenAlgo and runs portfolio backtests using vbt.Portfolio.from_signals.

Can I use TA-Lib indicators in my VectorBT backtest script?

Yes, the generated VectorBT backtest script supports using TA-Lib indicators and OpenAlgo ta for technical analysis. The script integrates these indicators to generate the signals required for running portfolio backtests.

What do I need to set up before running an OpenAlgo VectorBT backtest?

Before running an OpenAlgo VectorBT backtest, you need to load your environment variables for API configuration and optionally set up a DuckDB path. You also need to specify your target symbol, exchange, and time interval.

How does the VectorBT backtest output performance statistics and trade logs?

The VectorBT backtest outputs performance statistics by printing them to the console and generates a QuantStats tearsheet if available. It also plots results with Plotly and exports the executed trades to a CSV file for review.

Is there a way to automatically generate a Python script for a VectorBT backtest?

Yes, you can automatically generate a complete Python script for a VectorBT backtest by specifying your chosen strategy and parameters. This process optionally creates a dedicated backtest directory to keep your testing scripts organized.