# vectorbt-expert

A skill for testing trading strategies with VectorBT, from signal generation and historical data to performance charts and benchmark comparison.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2900 installs · ★ 211
- Author: marketcalls
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/marketcalls/vectorbt-backtesting-skills/tree/HEAD/.claude/skills/vectorbt-expert/SKILL.md
- Updated: 2026-07-12
- HTML: https://affpapa.org/en/nevibecode/skills/vectorbt-expert

## What it does

\`vectorbt-expert` guides an agent through Python backtesting with `vectorbt`, `pandas`, `numpy`, and `plotly`. It covers historical data retrieval, entry and exit signals, position sizing, market fees, portfolio metrics, drawdowns, equity curves, and trade analysis.

The default indicator layer is `openalgo.ta`, including `exrem()`, `crossover()`, `crossunder()`, and `flip()`. The skill requires a strategy-versus-benchmark table after each backtest and includes guidance for OpenAlgo, DuckDB, `yfinance`, `CCXT`, parameter searches, and walk-forward analysis.

Scripts belong in `backtesting/{strategy_name}/` directories. API settings are read from the project-root `.env` through `python-dotenv` and `find_dotenv()`. Python and the `vectorbt`, `pandas`, `numpy`, and `plotly` packages are required for these scripts to run.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add marketcalls/vectorbt-backtesting-skills --skill vectorbt-expert -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/vectorbt-expert/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/vectorbt-expert/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add marketcalls/vectorbt-backtesting-skills --skill vectorbt-expert -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/vectorbt-expert/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add marketcalls/vectorbt-backtesting-skills --skill vectorbt-expert -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/vectorbt-expert/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install marketcalls/vectorbt-backtesting-skills vectorbt-expert
```

2. **Manually: put the files in place**
- File: `.github/skills/vectorbt-expert/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add marketcalls/vectorbt-backtesting-skills --skill vectorbt-expert -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/marketcalls/vectorbt-backtesting-skills --path .claude/skills/vectorbt-expert
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/vectorbt-expert/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add marketcalls/vectorbt-backtesting-skills --skill vectorbt-expert -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/marketcalls/vectorbt-backtesting-skills/tree/HEAD/.claude/skills/vectorbt-expert/SKILL.md

## When to use it
- backtest a trading strategy
- generate entry and exit signals
- compare a strategy with its benchmark
- inspect drawdown and position sizing
- search for better strategy parameters

## Example prompts
- Backtest an EMA crossover strategy with OpenAlgo data and compare it with the benchmark.
- Load historical prices from DuckDB, create entry and exit signals, then review the trades.
- Test the strategy parameters in `vectorbt` and plot the equity curve and drawdown.

## Similar
- [churn-prevention](https://affpapa.org/en/nevibecode/skills/coreyhaines31-churn-prevention.md) — skill · 121000 installs
- [revops](https://affpapa.org/en/nevibecode/skills/revops.md) — skill · 113500 installs
- [community-marketing](https://affpapa.org/en/nevibecode/skills/community-marketing.md) — skill · 89500 installs
- [ads](https://affpapa.org/en/nevibecode/skills/ads.md) — skill · 82800 installs
- [pricing](https://affpapa.org/en/nevibecode/skills/pricing.md) — skill · 79300 installs
- [marketing-plan](https://affpapa.org/en/nevibecode/skills/marketing-plan.md) — skill · 67900 installs

From the same set: [marketcalls/vectorbt-backtesting-skills](https://affpapa.org/en/nevibecode/by/marketcalls/vectorbt-backtesting-skills.md) — 6 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
