backtesting-frameworks
하는 일
이 도구는 투자 전략을 테스트하는 시스템을 만들도록 돕습니다. 전략이 실제보다 좋아 보이게 만드는 흔한 실수를 피해서 테스트가 공정하도록 합니다.
사용하는 경우
- ✓투자 아이디어를 테스트할 때.
- ✓전략을 테스트하기 위한 기반 시설을 만들 때.
- ✓투자 전략이 잘 작동하는지 확인할 때.
스킬 링크
https://github.com/wshobson/agents/blob/main/plugins/quantitative-trading/skills/backtesting-frameworks/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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.
댓글
- …
이 저장소의 다른 스킬
screen-reader-testing
41k에이전트가 스크린 리더로 웹사이트를 테스트해 접근성을 확인하도록 돕습니다.
wcag-audit-patterns
41k에이전트가 WCAG 지침에 따라 웹사이트의 접근성을 감사하고 문제를 고치도록 돕습니다.
multi-reviewer-patterns
41k에이전트가 병렬 코드 리뷰를 조율하고, 중복된 발견 사항을 정리하며, 보고서를 통합하도록 돕습니다.
parallel-debugging
41k에이전트가 병렬 조사와 근본 원인 분석으로 복잡한 문제를 디버그하도록 돕습니다.