본문으로 건너뛰기
Skillpedia
머신러닝41k · #6771

backtesting-frameworks

하는 일

이 도구는 투자 전략을 테스트하는 시스템을 만들도록 돕습니다. 전략이 실제보다 좋아 보이게 만드는 흔한 실수를 피해서 테스트가 공정하도록 합니다.

사용하는 경우

  • ✓투자 아이디어를 테스트할 때.
  • ✓전략을 테스트하기 위한 기반 시설을 만들 때.
  • ✓투자 전략이 잘 작동하는지 확인할 때.

스킬 링크

https://github.com/wshobson/agents/blob/main/plugins/quantitative-trading/skills/backtesting-frameworks/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/quantitative-trading/skills/backtesting-frameworks/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“주식 거래 전략을 테스트하려고 하는데, 테스트가 믿을 만하도록 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

과거 데이터를 지능적으로 사용해 학습용과 테스트용 부분으로 나눕니다. 이렇게 하면 전략이 '미래를 보는' 것을 막고, 불완전한 데이터 때문에 테스트가 잘못된 결과를 내는 것을 막습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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
자주 묻는 질문

'미래 편향'이란 무엇인가요?

실제로는 나중에야 알 수 있는 정보를 테스트가 사용하는 것입니다. 이 때문에 전략이 실제보다 더 수익성이 좋아 보입니다.

'생존 편향'이란 무엇인가요?

테스트가 '살아남은'(실패하거나 상장 폐지되지 않은) 투자만 고려하고, 실패한 것은 무시하여 결과가 왜곡되는 현상입니다.

'거래 비용'이란 무엇인가요?

자산을 사고팔 때 드는 실제 비용으로, 수수료와 세금이 포함됩니다. 현실적인 결과를 위해 테스트에 반영해야 합니다.

상세 정보

작성자의 원본 설명

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.

repo: wshobson/agents

인기도

GitHub 스타
41k
순위
#6771
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬