Backtest strategy

From WayfinderFoundation/wayfinder-paths-sdk · View interactive version

Backtest strategy is an AI agent skill from the GitHub repository WayfinderFoundation/wayfinder-paths-sdk. Guide agents through backtesting strategy ideas with automatic data fetching and performance analysis

How to use this skill

Skill file

When to use

Use this skill when you are:

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 — Always load first. Config reference, stats format, gotchas.
  2. 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 — Strategy type → helper mapping, quick start examples, config reference, stats format, gotchas, production path. Always load this first.
  1. 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

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.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.