Backtrader
Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
Install
/plugin marketplace add agiprolabs/claude-trading-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add agiprolabs/claude-trading-skills --skill backtradergit clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git /tmp/claude-trading-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-trading-skills/skills/backtrader ~/.claude/skills/backtraderPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Backtrader Backtrader is a Python event-driven backtesting framework that processes data bar-by-bar, simulating realistic execution with a built-in broker, order management, and position tracking. Unlike vectorized frameworks (vectorbt, pandas), backtrader walks through history one bar at a time, firing callbacks that let you implement complex order logic that depends on previous fills, partial executions, and conditional brackets. ## Event-Driven vs Vectorized | Aspect | Backtrader (event-driven) | vectorbt (vectorized) | |---|---|---| | Execution model | Bar-by-bar callbacks | Whole-array operations | | Speed | Slower (Python loop) | Fast (NumPy/Numba) | | Order types | Market, limit, stop, stop-limit, bracket, OCO | Market only (native) | | Realism | Built-in broker with commission, slippage, margin | Manual slippage modeling | | Multi-timeframe | Native resampledata | Manual alignment | | Best for | Complex strategies, bracket orders, portfolio | Fast parameter sweeps, simple signals | **Use backtrader when you need:** - Bracket orders (entry + stop loss + take profit as a unit) - Stop-limit or trailing stop orders - Order-dependent logic (scale in after first fill, cancel if not filled in N bars) - Multi-timeframe strategies (daily signals, hourly execution) - Realistic commission and slippage modeling **Use vectorbt when you need:** - Fast parameter optimization over thousands of combinations - Simple long/short signals without complex order management
Details
- Skill name
backtrader- Repository
- agiprolabs/claude-trading-skills
- Path
skills/backtrader/SKILL.md- License
- MIT
- Repo updated
- 3 September 2026
FAQ
What does the Backtrader skill do?
Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
How do I install the Backtrader skill?
Claude Code plugin: /plugin marketplace add agiprolabs/claude-trading-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Backtrader popular?
It lives in agiprolabs/claude-trading-skills, which has 564 GitHub stars and 113 forks.
Related skills
Birdeye API
564agiprolabs/claude-trading-skills
Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity
Coingecko API
564agiprolabs/claude-trading-skills
Broad crypto market data from CoinGecko covering 13,000+ tokens. Global market stats, historical price data going back years, exchange volumes, trending tokens, and category filters. Best for macro analysis and long-term historical data.
Cointegration Analysis
564agiprolabs/claude-trading-skills
Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis
Correlation Analysis
564agiprolabs/claude-trading-skills
Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation
Lazyweb Quick Search
469LazywebHQ/lazyweb-skill
Deprecated name for /lazyweb-quick-search. Use /lazyweb-search-screens instead.
Cost Basis Engine
564agiprolabs/claude-trading-skills
Multi-method cost basis computation including specific identification, FIFO, LIFO, HIFO, and proportional average cost with partial sell handling
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.