
Setup
- 1.5k installs
- 183 repo stars
- Updated July 12, 2026
- marketcalls/vectorbt-backtesting-skills
setup is an agent skill that bootstraps a VectorBT plus OpenAlgo Python backtesting environment with TA-Lib and market data config.
About
The setup skill bootstraps a Python backtesting environment for VectorBT plus OpenAlgo across macOS, Linux, and Windows. It detects OS, creates a venv, installs TA-Lib C library prerequisites via brew or source compile, then pip installs openalgo, vectorbt, plotly, ta-lib, pandas, duckdb, quantstats, and ccxt. It creates a backtesting/ folder, configures .env for OpenAlgo API keys, DuckDB paths, Historify DB, and optional crypto exchange keys based on user market selection, and verifies imports. Important notes forbid global installs, require sudo on Linux TA-Lib builds, and never commit .env secrets. Use when initializing VectorBT backtesting workspaces for Indian, US, or crypto markets. Agents should follow the SKILL.md workflow end to end, grounding classification in documented commands, file paths, prerequisites, and troubleshooting notes rather than improvising steps. Set up Python VectorBT backtesting environment with TA-Lib, OpenAlgo, DuckDB, and market data dependencies. Invoke when User sets up VectorBT backtesting environment, installs ta-lib, or configures OpenAlgo DuckDB. Best for Quant developers initializing VectorBT backtesting for Indian, US, or crypto markets. Exp.
- OS detection with venv creation for macOS, Linux, and Windows.
- TA-Lib C library install before pip ta-lib on macOS and Linux.
- Pip stack: vectorbt, openalgo, plotly, duckdb, quantstats, ccxt.
- Interactive .env setup for OpenAlgo, DuckDB, Historify, crypto keys.
- Verification import check for vectorbt, talib, duckdb, quantstats.
Setup by the numbers
- 1,496 all-time installs (skills.sh)
- +50 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #157 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
- Security screen: HIGH risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
setup capabilities & compatibility
- Capabilities
- os specific venv bootstrap · ta lib system dependency install · market specific .env configuration · package verification
- Use cases
- data analysis · research
- Pricing
- Bring your own API key
What setup says it does
Never install packages globally — always use the virtual environment
npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills --skill setupAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.5k |
|---|---|
| repo stars | ★ 183 |
| Security audit | 0 / 3 scanners passed |
| Last updated | July 12, 2026 |
| Repository | marketcalls/vectorbt-backtesting-skills ↗ |
How do I set up a Python VectorBT backtesting environment with TA-Lib and OpenAlgo?
Set up Python VectorBT backtesting environment with TA-Lib, OpenAlgo, DuckDB, and market data dependencies.
Who is it for?
Quant developers initializing VectorBT backtesting for Indian, US, or crypto markets.
Skip if: Skip for running backtests on an already configured environment without setup needs.
When should I use this skill?
User sets up VectorBT backtesting environment, installs ta-lib, or configures OpenAlgo DuckDB.
What you get
A venv with vectorbt, ta-lib, openalgo installed, backtesting/ folder, and configured .env for chosen markets.
- Python virtual environment
- Installed quant dependencies
- Backtesting folder structure
By the numbers
- Installs 4 Python packages: openalgo, ta-lib, vectorbt, plotly
- Maps 3 OS targets: Darwin macOS, Linux, and Windows via MINGW
Files
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"Map the result:
Darwin= macOSLinux= LinuxMINGW*orCYGWIN*orWindows= Windows
Print the detected OS to the user.
Step 2: Create Virtual Environment
Create a Python virtual environment in the current working directory:
macOS / Linux:
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pipWindows:
python -m venv venv
venv\Scripts\activate
pip install --upgrade pipIf the user specified a Python version argument, use that instead of python3:
$PYTHON_VERSION -m venv venvStep 3: Install TA-Lib System Dependency
TA-Lib requires a C library installed at the OS level BEFORE pip install ta-lib.
macOS:
brew install ta-libLinux (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.gzLinux (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.gzWindows:
pip install ta-libIf 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.whlStep 4: Install Python Packages
Install all required packages (latest versions):
pip install openalgo vectorbt plotly anywidget nbformat ta-lib pandas numpy yfinance python-dotenv tqdm scipy numba nbformat ipywidgets quantstats ccxt duckdb psutilStep 5: Create Backtesting Folder
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 backtestingDo NOT pre-create strategy subfolders.
Step 6: Configure .env File
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:
- Indian Markets (OpenAlgo) — requires OpenAlgo API key
- Indian Markets (DuckDB) — direct database loading, no API needed
- US Markets (yfinance) — no API key needed
- Crypto Markets (CCXT) — optional API key for private data
6c. If the user selected Indian Markets, ask for their OpenAlgo API key:
- Ask: "Enter your OpenAlgo API key (from the OpenAlgo dashboard):"
- If the user provides a key, store it in
.env - If the user skips, write a placeholder
6d. If the user selected Indian Markets (DuckDB), ask for the DuckDB database path:
- Ask: "Enter the path to your DuckDB database file (e.g., D:/data/market_data.duckdb):"
- Auto-detect format: If the database has a
market_datatable withsymbol, exchange, interval, timestampcolumns, it is OpenAlgo Historify format (store asHISTORIFY_DB_PATH). Otherwise store asDUCKDB_PATH. - If the user also has OpenAlgo Historify, ask: "Is this an OpenAlgo Historify database? (y/n)"
6e. If the user selected Crypto Markets, ask if they want to configure exchange API keys:
- Ask: "Do you have exchange API keys for authenticated data? (Optional — public OHLCV data works without keys)"
- If yes, ask for API key and secret key, store in
.env - If no, leave them blank in
.env
6f. 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' >> .gitignoreStep 7: Verify Installation
Run a quick verification:
python -c "
import vectorbt as vbt
import openalgo
import plotly
import talib
import duckdb
import anywidget
import nbformat
import quantstats as qs
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' quantstats: {qs.__version__}')
print(f' TA-Lib: available')
print(f' python-dotenv: available')
"If TA-Lib import fails, inform the user that the C library needs to be installed first (see Step 3).
Step 8: Print Summary
Print a summary showing:
- Detected OS
- Python version used
- Virtual environment path
- Installed packages and versions
- Backtesting folder created (strategy subfolders created on-demand by
/backtest) .envfile status (configured with keys / placeholder) — single file at project root- Reminder: "Run
cp .env.sample .envand fill in API keys if you skipped configuration"
Important Notes
- Never install packages globally — always use the virtual environment
- TA-Lib C library installation requires admin/sudo privileges on Linux
- On macOS, Homebrew must be installed for
brew install ta-lib - If the user already has a virtual environment, ask before creating a new one
- The backtesting/ folder is where all generated backtest scripts will be saved
- NEVER commit
.envfiles — they contain secrets. Always use.gitignore. - If the user provides an API key during setup, write it directly to
.env— do not ask them to edit the file manually python-dotenvis included in the pip install and must be used by all scripts to load.env
Related skills
How it compares
Use setup for first-time VectorBT environment provisioning; use strategy skills once the venv and folders exist.
FAQ
What packages are installed?
openalgo, vectorbt, plotly, ta-lib, pandas, duckdb, quantstats, ccxt, and related dependencies in a venv.
Does TA-Lib need system libraries?
Yes — install the TA-Lib C library via brew on macOS or compile from source on Linux before pip install ta-lib.
Is setup safe to install?
Review the Security Audits panel on this page before installing in production.