backtesting-frameworks
यह क्या करती है
यह टूल निवेश की रणनीतियों (strategies) की टेस्टिंग का सिस्टम बनाने में मदद करता है। यह कुछ आम गलतियों से बचकर टेस्ट को निष्पक्ष रखता है, जो किसी रणनीति को असल से ज़्यादा अच्छा दिखा सकती हैं।
कब इस्तेमाल करें
- ✓अपने निवेश के विचारों की टेस्टिंग करते समय।
- ✓रणनीतियों को टेस्ट करने का ढाँचा बनाते समय।
- ✓यह जाँचते समय कि कोई निवेश रणनीति अच्छा प्रदर्शन करती है या नहीं।
Skill का लिंक
https://github.com/wshobson/agents/blob/main/plugins/quantitative-trading/skills/backtesting-frameworks/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं अपनी स्टॉक ट्रेडिंग रणनीति को टेस्ट करना चाहता हूँ, और यह पक्का करना चाहता हूँ कि टेस्ट भरोसेमंद हों।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह पिछले डेटा (historical data) को समझदारी से बाँटता है, कुछ हिस्सा training के लिए और कुछ testing के लिए। इससे रणनीति भविष्य को "देखने" से बचती है, और अधूरे डेटा की वजह से टेस्ट गुमराह करने वाले नहीं बनते।
तकनीकी सामग्री (मूल 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
अक्सर पूछे जाने वाले सवाल
'look-ahead bias' क्या है?
यह तब होता है जब टेस्ट में ऐसी जानकारी इस्तेमाल होती है जो असल में घटना के बाद ही उपलब्ध होती, जिससे रणनीति असल ज़िंदगी से ज़्यादा फ़ायदेमंद दिखती है।
'survivorship bias' क्या है?
यह तब होता है जब टेस्ट में सिर्फ़ वे निवेश लिए जाते हैं जो 'बचे रहे' (बंद या हटाए नहीं गए), और जो फेल हो गए उन्हें छोड़ दिया जाता है, जिससे नतीजे गलत हो जाते हैं।
'transaction costs' क्या हैं?
ये खरीदने और बेचने पर लगने वाले असली खर्च हैं, जैसे फीस और टैक्स। यथार्थवादी नतीजे के लिए इन्हें टेस्ट में शामिल करना ज़रूरी है।
जानकारी
लेखक का मूल विवरण
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
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
screen-reader-testing
41kआपके एजेंट को screen readers का इस्तेमाल करके वेबसाइटों की जांच करने देता है, ताकि यह पक्का हो सके कि वे accessible हैं।
wcag-audit-patterns
41kआपके एजेंट को वेबसाइटों का accessibility audit करने और WCAG guidelines के हिसाब से समस्याएं ठीक करने में मदद करता है।
multi-reviewer-patterns
41kआपके एजेंट को कई code reviews को एक साथ चलाने देता है। यह एक जैसे findings हटाता है और सारी रिपोर्ट को एक जगह जोड़ता है।
parallel-debugging
41kआपके एजेंट को parallel जांच के साथ जटिल समस्याओं को debug करने और root cause analysis में मदद करता है।
मिलती-जुलती skills
pytorch-patterns
280kआपके एजेंट को machine learning models के लिए PyTorch इस्तेमाल करने में मदद करता है। कुशल model training के best practices लागू करता है और नतीजों को दोहराने लायक रखता है।
evm-token-decimals
280kयह आपके एजेंट को अलग-अलग blockchain networks पर decimal numbers की गलतियों से बचने में मदद करता है। यह transactions और calculations में token values सही रखने का ध्यान रखता है।
ito-inference
280kआपके एजेंट को AI models की उपलब्धता जाँचने देता है। यह compute request को तैयार model service से जोड़ता है।