dabiggestpoppa/larger-lab/vectorbt-expert
Claude Code and agent skill by dabiggestpoppa/larger-lab
- community
Checking that the SKILL.md file is still in the repository.
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).
Install
npx vskill@latest install dabiggestpoppa/larger-lab/vectorbt-expertSKILL.md
The same SKILL.md was published earlier as dabiggestpoppa/larger-lab/vectorbt-expert.
VectorBT Backtesting Expert Skill
Environment
- Python with vectorbt, pandas, numpy, plotly
- Data sources: OpenAlgo (Indian markets), DuckDB (direct database), yfinance (US/Global), CCXT (Crypto), custom providers
- DuckDB support: supports both custom DuckDB and OpenAlgo Historify format
- API keys loaded from single root
.envviapython-dotenv+find_dotenv()— never hardcode keys - Technical indicators: TA-Lib (ALWAYS - never use VectorBT built-in indicators)
- Specialty indicators:
openalgo.tafor Supertrend, Donchian, Ichimoku, HMA, KAMA, ALMA, ZLEMA, VWMA - Signal cleaning:
openalgo.tafor exrem, crossover, crossunder, flip - Fee model: Indian market standard (STT + statutory charges + Rs 20/order)
- Benchmark: NIFTY 50 via OpenAlgo (
NSE_INDEX) by default - Charts: Plotly with
template="plotly_dark" - Environment variables loaded from single
.envat project root viafind_dotenv()(walks up from script dir) - Scripts go in
backtesting/{strategy_name}/directories (created on-demand, not pre-created) - Never use icons/emojis in code or logger output
Critical Rules
- ALWAYS use TA-Lib for ALL technical indicators (EMA, SMA, RSI, MACD, BBANDS, ATR, ADX, STDDEV, MOM). NEVER use
vbt.MA.run(),vbt.RSI.run(), or any VectorBT built-in indicator. - Use OpenAlgo ta for indicators NOT in TA-Lib: Supertrend, Donchian, Ichimoku, HMA, KAMA, ALMA, ZLEMA, VWMA.
- Use OpenAlgo ta for signal utilities:
ta.exrem(),ta.crossover(),ta.crossunder(),ta.flip(). Ifopenalgo.tais not importable (standalone DuckDB), use inlineexrem()fallback. See duckdb-data. - Always clean signals with
ta.exrem()after generating raw buy/sell signals. Always.fillna(False)before exrem. - Market-specific fees: India (indian-market-costs), US (us-market-costs), Crypto (crypto-market-costs). Auto-select based on user's market.
- Default benchmarks: India=NIFTY via OpenAlgo, US=S&P 500 (
^GSPC), Crypto=Bitcoin (BTC-USD). See data-fetching Market Selection Guide. - Always produce a Strategy vs Benchmark comparison table after every backtest.
- Always explain the backtest report in plain language so even normal traders understand risk and strength.
- Plotly candlestick charts must use
xaxis type="category"to avoid weekend gaps. - Whole shares: Always set
min_size=1, size_granularity=1for equities. - DuckDB data loading: When user provides a DuckDB path, load data directly using
duckdb.connect()withread_only=True. Auto-detect format: OpenAlgo Historify (tablemarket_data, epoch timestamps) vs custom (tableohlcv, date+time columns). See duckdb-data.
Modular Rule Files
Detailed reference for each topic is in rules/:
| Rule File | Topic | |
|---|---|---|
| data-fetching | OpenAlgo (India), yfinance (US), CCXT (Crypto), custom providers, .env setup | |
| simulation-modes | from_signals, from_orders, from_holding, direction types | |
| position-sizing | Amount/Value/Percent/TargetPercent sizing | |
| indicators-signals | TA-Lib indicator reference, signal generation | |
| openalgo-ta-helpers | OpenAlgo ta: exrem, crossover, Supertrend, Donchian, Ichimoku, MAs | |
| stop-loss-take-profit | Fixed SL, TP, trailing stop | |
| parameter-optimization | Broadcasting and loop-based optimization | |
| performance-analysis | Stats, metrics, benchmark comparison, CAGR | |
| plotting | Candlestick (category x-axis), VectorBT plots, custom Plotly | |
| indian-market-costs | Indian market fee model by segment | |
| us-market-costs | US market fee model (stocks, options, futures) | |
| crypto-market-costs | Crypto fee model (spot, USDT-M, COIN-M futures) | |
| futures-backtesting | Lot sizes (SEBI revised Dec 2025), value sizing | |
| long-short-trading | Simultaneous long/short, direction comparison | |
| duckdb-data | DuckDB direct loading, Historify format, auto-detect, resampling, multi-symbol | |
| csv-data-resampling | Loading CSV, resampling with Indian market alignment | |
| walk-forward | Walk-forward analysis, WFE ratio | |
| robustness-testing | Monte Carlo, noise test, parameter sensitivity, delay test | |
| pitfalls | Common mistakes and checklist before going live | |
| strategy-catalog | Strategy reference with code snippets | |
| quantstats-tearsheet | QuantStats HTML reports, metrics, plots, Monte Carlo |
Strategy Templates (in rules/assets/)
Production-ready scripts with realistic fees, NIFTY benchmark, comparison table, and plain-language report:
| Template | Path | Description | |
|---|---|---|---|
| EMA Crossover | assets/ema_crossover/backtest.py | EMA 10/20 crossover | |
| RSI | assets/rsi/backtest.py | RSI(14) oversold/overbought | |
| Donchian | assets/donchian/backtest.py | Donchian channel breakout | |
| Supertrend | assets/supertrend/backtest.py | Supertrend with intraday sessions | |
| MACD | assets/macd/backtest.py | MACD signal-candle breakout | |
| SDA2 | assets/sda2/backtest.py | SDA2 trend following | |
| Momentum | assets/momentum/backtest.py | Double momentum (MOM + MOM-of-MOM) | |
| Dual Momentum | assets/dual_momentum/backtest.py | Quarterly ETF rotation | |
| Buy & Hold | assets/buy_hold/backtest.py | Static multi-asset allocation | |
| RSI Accumulation | assets/rsi_accumulation/backtest.py | Weekly RSI slab-wise accumulation | |
| Walk-Forward | assets/walk_forward/template.py | Walk-forward analysis template | |
| Realistic Costs | assets/realistic_costs/template.py | Transaction cost impact comparison |
Quick Template: Standard Backtest Script
Quick Template: DuckDB Backtest Script
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.openclaw-2/skills/vectorbt-expert/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dabiggestpoppa/larger-lab/vectorbt-expert)