Skip to content
Back to skills

Backtest Strategy

ASecurity

Guide agents through backtesting strategy ideas with automatic data fetching and performance analysis

  • 22 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 3, 2026
devopsgotestingperformance

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned September 3, 2026

npx -y skills add WayfinderFoundation/wayfinder-paths-sdk --skill backtest-strategy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Backtest Strategy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Backtest Strategy
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wayfinderfoundation-backtest-strategy/badge)](https://www.skillsdirectory.com/skills/wayfinderfoundation-backtest-strategy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: backtest-strategy
description: Guide agents through backtesting strategy ideas with automatic data fetching and performance analysis
metadata:
  tags: backtesting, strategy, performance, sharpe, drawdown, funding, simulation, yield, lending, carry, delta-neutral
---

## 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:

1. **[rules/backtesting.md](rules/backtesting.md)** — **Always load first.** Config reference, stats format, gotchas.
2. **[rules/existing-strategies.md](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.
3. 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):

1. **[rules/backtesting.md](rules/backtesting.md)** — Strategy type → helper mapping, quick start examples, config reference, stats format, gotchas, production path. **Always load this first.**

2. **[rules/yield-strategies.md](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](examples/basic_momentum.py) — Cross-sectional momentum using `quick_backtest`
- [examples/delta_neutral.py](examples/delta_neutral.py) — Delta-neutral basis carry using `backtest_delta_neutral`
- [examples/yield_rotation.py](examples/yield_rotation.py) — USDC rotation across lending venues using `backtest_yield_rotation`
- [examples/carry_trade.py](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)` |
| Active perps / HIP-3 (deployable) | `backtest_perps_trigger(signal_fn, decide_fn, symbols, ...)` |
| Full control | `run_backtest(prices, target_positions, config)` |

All helpers are in `wayfinder_paths.core.backtesting`.

> **For actively-traded Hyperliquid strategies (perp or HIP-3), use `backtest_perps_trigger` and the trigger pattern.** The same `signal.py` and `decide.py` modules run in backtest, live, and reconcile — drift is architecturally impossible. See [rules/perps-trigger.md](rules/perps-trigger.md).

Files in this skill

  • SKILL.md3.3 KB
  • examples/basic_momentum.py2 KB
  • examples/carry_trade.py1.3 KB
  • examples/delta_neutral.py1.5 KB
  • examples/yield_rotation.py1.5 KB
  • rules/backtesting.md11.6 KB
  • rules/existing-strategies.md6 KB
  • rules/perps-trigger.md8.3 KB
  • rules/yield-strategies.md3.9 KB
  • skill.yaml232 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…