setup

marketcalls/vectorbt-backtesting-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills --skill setup
0 commentsdiscussion
summary

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 Cr
skill.md

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 = macOS
  • Linux = Linux
  • MINGW* or CYGWIN* or Windows = 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 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

Step 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-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

Step 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 psutil

Step 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 backtesting

Do 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_data table with symbol, exchange, interval, timestamp columns, it is OpenAlgo Historify format (store as HISTORIFY_DB_PATH). Otherwise store as DUCKDB_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' >> .gitignore

Step 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)
  • .env file status (configured with keys / placeholder) — single file at project root
  • Reminder: "Run cp .env.sample .env and 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 .env files — 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-dotenv is included in the pip install and must be used by all scripts to load .env
how to use setup

How to use setup on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add setup
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/marketcalls/vectorbt-backtesting-skills --skill setup

The skills CLI fetches setup from GitHub repository marketcalls/vectorbt-backtesting-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/setup

Reload or restart Cursor to activate setup. Access the skill through slash commands (e.g., /setup) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.670 reviews
  • Neel Choi· Dec 28, 2024

    Keeps context tight: setup is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Arjun Brown· Dec 24, 2024

    setup has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Alexander Johnson· Dec 24, 2024

    setup reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Arjun Huang· Dec 20, 2024

    setup fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Mei Malhotra· Dec 12, 2024

    setup fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Anika Kim· Dec 12, 2024

    We added setup from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Anika Abbas· Dec 8, 2024

    setup reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Li Jain· Dec 8, 2024

    setup is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • James Gonzalez· Nov 27, 2024

    We added setup from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Li Ghosh· Nov 27, 2024

    Keeps context tight: setup is the kind of skill you can hand to a new teammate without a long onboarding doc.

showing 1-10 of 70

1 / 7