setup
Complete Python backtesting environment setup with OS detection, virtual environment, dependencies, and configuration.
- Detects operating system (macOS, Linux, Windows) and installs TA-Lib system dependencies accordingly
- Creates isolated Python virtual environment with pip upgrade and installs 15+ packages including vectorbt, openalgo, plotly, ta-lib, duckdb, and quantstats
- Prompts user to select market data source (Indian Markets via OpenAlgo or DuckDB, US Markets via yfinance, or Crypto via CCXT) and configures
.envfile with API keys or database paths - Creates backtesting folder structure and verifies all package installations with version output
- Adds
.envto.gitignoreto prevent accidental secret commits
Set up the complete Python backtesting environment for VectorBT + OpenAlgo.
Arguments
$0= Python version (optional, default:python3). Examples:python3.12,python3.13
Steps
Step 1: Detect Operating System
Run the following to detect the OS:
uname -s 2>/dev/null || echo "Windows"
More from marketcalls/vectorbt-backtesting-skills
backtest
Quick backtest a strategy on a symbol. Creates a complete .py script with data fetch, signals, backtest, stats, and plots.
1.3Kvectorbt-expert
VectorBT backtesting expert. Use when user asks to backtest strategies, create entry/exit signals, analyze portfolio performance, optimize parameters, fetch historical data, use VectorBT/vectorbt, compare strategies, position sizing, equity curves, drawdown charts, or trade analysis. Also triggers for openalgo.ta helpers (exrem, crossover, crossunder, flip, donchian, supertrend).
1.2Koptimize
Optimize strategy parameters using VectorBT. Tests parameter combinations and generates heatmaps.
912strategy-compare
Compare multiple strategies or directions (long vs short vs both) on the same symbol. Generates side-by-side stats table.
877quick-stats
Quickly fetch data and print key backtest stats for a symbol with a default EMA crossover strategy. No file creation needed - runs inline in a notebook cell or prints to console.
832