Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
wshobson avatar

Backtesting Frameworks

  • 13.2k installs
  • 38.3k repo stars
  • Updated July 22, 2026
  • wshobson/agents

Backtesting Frameworks is a skill for building robust, production-grade backtesting systems that avoid common pitfalls.

About

A framework for building production-grade backtesting systems for trading strategies. Covers common pitfalls including look-ahead bias, survivorship bias, overfitting, and transaction costs. Includes walk-forward analysis and out-of-sample testing patterns.

  • Handles look-ahead bias, survivorship bias, and transaction costs
  • Walk-forward analysis patterns
  • Monte Carlo analysis for uncertainty

Backtesting Frameworks by the numbers

  • 13,243 all-time installs (skills.sh)
  • +237 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #4 of 1,136 Finance & Trading skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

backtesting-frameworks capabilities & compatibility

Capabilities
backtesting · strategy validation · bias mitigation · walk forward analysis
Use cases
trading
From the docs

What backtesting-frameworks says it does

Build robust, production-grade backtesting systems that avoid common pitfalls and produce reliable strategy performance estimates.
SKILL.md
npx skills add https://github.com/wshobson/agents --skill backtesting-frameworks

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs13.2k
repo stars38.3k
Security audit3 / 3 scanners passed
Last updatedJuly 22, 2026
Repositorywshobson/agents

How do you build an event-driven trading backtester?

Building and validating trading strategy backtests with proper bias handling.

Who is it for?

Developers building trading algorithms and quant strategies.

Skip if: Quick one-off strategy tests without rigor.

When should I use this skill?

The user designs or codes strategy backtests with order types, slippage, commissions, or event-driven execution simulation in Python.

What you get

Event-driven backtester code, simulated order fills, slippage and commission model, and position tracking reports.

  • Event-driven backtester module
  • Simulated trade log
  • Performance metrics with costs applied

By the numbers

  • Demonstrates 3 order types: market, limit, and stop
  • Uses 2 numerical stack libraries: pandas and numpy

Files

SKILL.mdMarkdownGitHub ↗

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

BiasDescriptionMitigation
Look-aheadUsing future informationPoint-in-time data
SurvivorshipOnly testing on survivorsUse delisted securities
OverfittingCurve-fitting to historyOut-of-sample testing
SelectionCherry-picking strategiesPre-registration
TransactionIgnoring trading costsRealistic 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

Related skills

How it compares

Choose backtesting-frameworks for order-level simulation prototypes; use vectorized analytics skills only when execution realism is out of scope.

FAQ

What biases should I handle in backtesting?

Look-ahead bias, survivorship bias, overfitting, selection bias, and transaction costs.

What is walk-forward analysis?

A validation technique that rolling-retrains on expanding historical windows, testing only out-of-sample data.

Is Backtesting Frameworks safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.