Agent skill
backtest-strategy
Guide agents through backtesting strategy ideas with automatic data fetching and performance analysis
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/backtest-strategy
Metadata
Additional technical details for this skill
- tags
- backtesting, strategy, performance, sharpe, drawdown, funding, simulation, yield, lending, carry, delta-neutral
SKILL.md
When to use
Use this skill when you are:
- Backtesting an existing strategy from
wayfinder_paths/strategies/ - Validating a new trading strategy idea before production deployment
- Analyzing historical performance (Sharpe, drawdown, CAGR, funding PnL)
- Testing any strategy type: momentum, delta-neutral, yield rotation, carry trade
- Testing different leverage levels or parameter combinations
How to use
First, determine if you're backtesting an existing strategy or a new idea:
Backtesting an existing strategy (from wayfinder_paths/strategies/)
Load these rules:
- rules/backtesting.md — Always load first. Config reference, stats format, gotchas.
- rules/existing-strategies.md — REQUIRED for existing strategies. Workflow for reading strategy source code, extracting parameters, fetching real Delta Lab data, and faithfully reproducing signal logic. Never use generic helpers with default parameters for existing strategies.
- Load the strategy-type-specific rule if applicable (yield-strategies.md).
Backtesting a new strategy idea
Load these rules in order (most to least specific for your strategy type):
-
rules/backtesting.md — Strategy type → helper mapping, quick start examples, config reference, stats format, gotchas, production path. Always load this first.
-
rules/yield-strategies.md — Detailed patterns for lending/yield strategies: supply rate rotation, leveraged yield loops, carry trade, multi-venue benchmark. Load when the user's strategy involves lending protocols, supply APRs, or borrow rates.
Examples
- examples/basic_momentum.py — Cross-sectional momentum using
quick_backtest - examples/delta_neutral.py — Delta-neutral basis carry using
backtest_delta_neutral - examples/yield_rotation.py — USDC rotation across lending venues using
backtest_yield_rotation - examples/carry_trade.py — Borrow cheap / supply expensive using
backtest_carry_trade
Strategy type → helper cheat sheet
| Strategy | One-liner |
|---|---|
| Momentum/trend (perp) | quick_backtest(strategy_fn, symbols, start, end) |
| Delta-neutral basis carry | backtest_delta_neutral(symbols, start, end) |
| Yield rotation (lending) | backtest_yield_rotation(symbol, venues, start, end) |
| Carry trade (borrow/supply spread) | backtest_carry_trade(symbol, start, end) |
| Full control | run_backtest(prices, target_positions, config) |
All helpers are in wayfinder_paths.core.backtesting.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?