Set up the Python backtesting environment. Detects OS, creates virtual environment, installs dependencies (openalgo, ta-lib, vectorbt, plotly), and creates the backtesting folder structure.
npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills --skill setup
Set up the complete Python backtesting environment for VectorBT + OpenAlgo.
$0 = Python version (optional, default: python3). Examples: python3.12, python3.13Run the following to detect the OS:
uname -s 2>/dev/null || echo "Windows"
Map the result:
Darwin = macOSLinux = LinuxMINGW* or CYGWIN* or Windows = WindowsPrint the detected OS to the user.
Create a Python virtual environment in the current working directory:
macOS / Linux:
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
Windows:
python -m venv venv
venv\Scripts\activate
pip install --upgrade pip
If the user specified a Python version argument, use that instead of python3:
$PYTHON_VERSION -m venv venv
OpenAlgo ta (from openalgo import ta) is the default indicator library for this project - it ships 100+ indicators and needs no separate system dependency. TA-Lib is only needed if the user wants to be able to say "use talib" for a specific backtest.
Ask the user with AskUserQuestion:
If the user skips it, skip this entire step and omit ta-lib from the Step 4 pip install. If the user wants it, TA-Lib requires a C library installed at the OS level BEFORE pip install ta-lib.
macOS:
brew install ta-lib
Linux (Debian/Ubuntu):
sudo apt-get update
sudo apt-get install -y build-essential wget
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib/
./configure --prefix=/usr
make
sudo make install
cd ..
rm -rf ta-lib ta-lib-0.4.0-src.tar.gz
Linux (RHEL/CentOS/Fedora):
sudo yum groupinstall -y "Development Tools"
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib/
./configure --prefix=/usr
make
sudo make install
cd ..
rm -rf ta-lib ta-lib-0.4.0-src.tar.gz
Windows:
pip install ta-lib
If that fails, download the appropriate .whl file from https://github.com/cgohlke/talib-build/releases and install with:
pip install TA_Lib-0.4.32-cp312-cp312-win_amd64.whl
Install all required packages (latest versions). openstatz replaces QuantStats for tearsheets - always install it, never quantstats:
pip install openalgo vectorbt plotly anywidget nbformat pandas numpy yfinance python-dotenv tqdm scipy numba nbformat ipywidgets openstatz ccxt duckdb psutil
If the user opted into TA-Lib in Step 3, append ta-lib to this install command (after the C library is installed).
Create only the top-level backtesting directory. Strategy subfolders are created on-demand when a backtest script is generated (by the /backtest skill).
mkdir -p backtesting
Do NOT pre-create strategy subfolders.
6a. Check if .env.sample exists at the project root. If it does, use it as a template.
6b. Ask the user which markets they will be backtesting using AskUserQuestion:
6c. If the user selected Indian Markets, ask for their OpenAlgo API key:
.env6d. If the user selected Indian Markets (DuckDB), ask for the DuckDB database path:
market_data table with symbol, exchange, interval, timestamp columns, it is OpenAlgo Historify format (store as HISTORIFY_DB_PATH). Otherwise store as DUCKDB_PATH.6e. If the user selected Crypto Markets, ask if they want to configure exchange API keys:
.env.env6f. Write the .env file in the project root directory. Use this template, filling in any keys/paths the user provided:
# Indian Markets (OpenAlgo)
OPENALGO_API_KEY={user_provided_key or "your_openalgo_api_key_here"}
OPENALGO_HOST=http://127.0.0.1:5000
# DuckDB Data Sources (direct database loading - fastest)
# Custom DuckDB (user-created with OHLCV table)
DUCKDB_PATH={user_provided_path or ""}
# OpenAlgo Historify DuckDB (market_data table with epoch timestamps)
HISTORIFY_DB_PATH={user_provided_path or ""}
# Crypto Markets (CCXT) - Optional
CRYPTO_API_KEY={user_provided_key or ""}
CRYPTO_SECRET_KEY={user_provided_key or ""}
6g. Add .env to .gitignore if it exists (never commit secrets):
Scripts use find_dotenv() to automatically walk up and find the single root .env, so no copies are needed in subdirectories.
grep -qxF '.env' .gitignore 2>/dev/null || echo '.env' >> .gitignore
Run a quick verification:
python -c "
import vectorbt as vbt
from openalgo import ta
import plotly
import duckdb
import anywidget
import nbformat
import openstatz
from dotenv import load_dotenv
print('All packages installed successfully')
print(f' vectorbt: {vbt.__version__}')
print(f' plotly: {plotly.__version__}')
print(f' duckdb: {duckdb.__version__}')
print(f' nbformat: {nbformat.__version__}')
print(f' openstatz: {openstatz.__version__}')
print(f' OpenAlgo ta: available (default indicator library)')
print(f' python-dotenv: available')
"
If the user opted into TA-Lib, also verify with python -c "import talib; print('TA-Lib available')". If that import fails, inform the user that the C library needs to be installed first (see Step 3).
Print a summary showing:
/backtest).env file status (configured with keys / placeholder) — single file at project rootcp .env.sample .env and fill in API keys if you skipped configuration"brew install ta-lib.env files — they contain secrets. Always use .gitignore..env — do not ask them to edit the file manuallypython-dotenv is included in the pip install and must be used by all scripts to load .envGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take marketcalls/setup from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip, brew, apt.
Without those the skill loads but fails at the first command.