Skip to main content
skill Claude Code CX Codex Cursor

backtesting-frameworks — Claude Code skill for strategy backtests

Helps build trading strategy backtests that account for look-ahead and survivorship bias, plus transaction costs. Use it when developing or validating a trading algorithm.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install quantitative-trading@claude-code-workflows
Open on GitHub

What backtesting-frameworks does

The skill outlines how to split historical data into training, validation, and test sets, then apply walk-forward analysis. It covers look-ahead bias, survivorship bias, overfitting, strategy selection, and ignored trading costs. Suggested safeguards include point-in-time data, delisted securities, and realistic cost models.

It also recommends out-of-sample testing, Monte Carlo analysis, and pre-registration. Worked examples are in references/details.md. Install it when you are building or checking a trading strategy backtest; it adds little to projects without that work.

What it helps with

  • test a strategy on data kept out of training
  • include trading costs in performance estimates
  • avoid using future information in a backtest
  • compare strategy variants with walk-forward analysis

Example prompts for the agent

  • Review my strategy backtest for look-ahead bias and suggest how to prevent it.
  • Split the historical data into training, validation, and test sets for this strategy.
  • Add transaction costs and delisted securities to the backtest assumptions.

How to install backtesting-frameworks

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install quantitative-trading@claude-code-workflows

This installs the whole quantitative-trading plugin with all its skills

2Skills CLI (Vercel)

npx skills add wshobson/agents --skill backtesting-frameworks -a claude-code

3Manually: put the files in place

~/.claude/skills/backtesting-frameworks/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/backtesting-frameworks/

From the same set213

The whole set →
typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs tailwind-design-system Seth Hobson Helps build design systems with Tailwind CSS v4, from theme tokens to component variants. Use it when a project needs shared UI patterns. Claude Code CX Codex Cursor 70,180installs brand-landingpage Travis D. Elliott This skill interviews you about the product and its visual direction, then builds a landing page through Stitch. Use it when there’s no established design yet. Claude Code CX Codex Cursor 39,476installs python-testing-patterns Seth Hobson This skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. Claude Code CX Codex Cursor 36,943installs python-performance-optimization Seth Hobson This skill profiles Python code to locate CPU and memory bottlenecks. Use it when an application responds slowly or consumes too many resources. Claude Code CX Codex Cursor 35,675installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs api-design-principles Seth Hobson Use this skill to plan or review REST and GraphQL APIs. It helps when writing a specification or setting API conventions for a team. Claude Code CX Codex Cursor 30,348installs code-review-excellence Seth Hobson This skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. Claude Code CX Codex Cursor 30,193installs

Similar

audit-xls official anthropics Audits Excel sheets for formula errors, hardcoded values, and logic breaks. It checks financial model integrity before sharing work with clients or review committees. Claude Code CX Codex Cursor +1 2,200installs 3-statement-model official anthropics Fills and links three-statement financial model templates in Excel using formulas across IS, BS, and Cash Flow. Claude Code CX Codex Cursor +1 2,100installs ccxt-python ccxt Helps Python developers integrate cryptocurrency exchanges using CCXT. Covers REST and WebSocket endpoints in both synchronous and asyncio modes. Claude Code CX Codex Cursor +1 2,000installs creating-financial-models official anthropics Skill for building DCF models, sensitivity analysis, Monte Carlo simulations, and scenario planning for investment decisions. Use it for M&A, project finance, and LBO valuation. Claude Code CX Codex Cursor +1 408installs churn-prevention coreyhaines31 A Claude Code skill for subscription churn: an exit survey at cancellation, an offer matched to the stated reason, and recovery of failed payments. Claude Code CX Codex Cursor +1 120,600installs revops coreyhaines31 This skill helps design RevOps workflows for lead stages, scoring, routing, and marketing-to-sales handoffs. Use it when CRM processes need clear rules. Claude Code CX Codex Cursor +1 113,000installs community-marketing coreyhaines31 Builds and grows branded communities on Discord or Slack to drive product retention and turn users into advocates. Claude Code CX Codex Cursor +1 89,100installs ads coreyhaines31 Guides paid advertising campaigns across Google Ads and Meta. It connects agents to rigorous playbooks and forbids guessing missing numbers. Claude Code CX Codex Cursor +1 82,200installs

Questions about backtesting-frameworks

How do I install backtesting-frameworks in Claude Code?

Run npx skills add wshobson/agents --skill backtesting-frameworks -a claude-code to install it as a skill. The plugin commands are /plugin marketplace add wshobson/agents and /plugin install quantitative-trading@claude-code-workflows.

What does backtesting-frameworks do?

It guides the design of trading strategy backtests, with attention to common biases, transaction costs, and data splits. It also covers walk-forward and Monte Carlo analysis.

How does the skill recommend testing a strategy across time periods?

It describes walk-forward analysis, moving training and test windows forward through time. It also recommends keeping a test set for the final performance evaluation.

Source text

SKILL.md · MIT
---
name: backtesting-frameworks
description: Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs. Use when developing trading algorithms, validating strategies, or building backtesting infrastructure.
---

# Backtesting Frameworks

Build robust, production-grade backtesting systems that avoid common pitfalls and produce reliable strategy performance estimates.

## When to Use This Skill

- Developing trading strategy backtests
- Building backtesting infrastructure
- Validating strategy performance
- Avoiding common backtesting biases
- Implementing walk-forward analysis
- Comparing strategy alternatives

## Core Concepts

### 1. Backtesting Biases

| Bias             | Description               | Mitigation              |
| ---------------- | ------------------------- | ----------------------- |
| **Look-ahead**   | Using future information  | Point-in-time data      |
| **Survivorship** | Only testing on survivors | Use delisted securities |
| **Overfitting**  | Curve-fitting to history  | Out-of-sample testing   |
| **Selection**    | Cherry-picking strategies | Pre-registration        |
| **Transaction**  | Ignoring trading costs    | Realistic cost models   |

### 2. Proper Backtest Structure

```
Historical Data
      │
      ▼
┌─────────────────────────────────────────┐
│              Training Set               │
│  (Strategy Development & Optimization)  │
└─────────────────────────────────────────┘
      │
      ▼
┌─────────────────────────────────────────┐
│             Validation Set              │
│  (Parameter Selection, No Peeking)      │
└─────────────────────────────────────────┘
      │
      ▼
┌─────────────────────────────────────────┐
│               Test Set                  │
│  (Final Performance Evaluation)         │
└─────────────────────────────────────────┘
```

### 3. Walk-Forward Analysis

```
Window 1: [Train──────][Test]
Window 2:     [Train──────][Test]
Window 3:         [Train──────][Test]
Window 4:             [Train──────][Test]
                                     ─────▶ Time
```

## Detailed worked examples and patterns

Detailed sections (starting with `## Implementation Patterns`) live in `references/details.md`. Read that file when the navigation summary above is insufficient.

## Best Practices

### Do's

- **Use point-in-time data** - Avoid look-ahead bias
- **Include transaction costs** - Realistic estimates
- **Test out-of-sample** - Always reserve data
- **Use walk-forward** - Not just train/test
- **Monte Carlo analysis** - Understand uncertainty

### Don'ts

- **Don't overfit** - Limit parameters
- **Don't ignore survivorship** - Include delisted
- **Don't use adjusted data carelessly** - Understand adjustments
- **Don't optimize on full history** - Reserve test set
- **Don't ignore capacity** - Market impact matters

© Seth Hobson · MIT · wshobson/agents

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor