backtesting-frameworks – skill DevOps & Hạ tầng cho agent AI
Xây dựng hệ thống backtest vững chắc cho chiến lược giao dịch, xử lý đúng look-ahead bias, survivorship bias và chi phí giao dịch. Dùng khi phát triển thuật toán giao dịch, kiểm định chiến lược hoặc xây dựng hạ tầng backtest.
Cài skill backtesting-frameworks bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/backtesting-frameworks-55e4a.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /backtesting-frameworks – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/backtesting-frameworks-55e4a.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $backtesting-frameworks – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/backtesting-frameworks-55e4a.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /backtesting-frameworks – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/backtesting-frameworks-55e4a.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /backtesting-frameworks – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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]
─────▶ TimeDetailed 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
Skill liên quan
- docker-privesc – Thoát khỏi container Docker để giành quyền root trên host qua 5 kỹ thuật.
- aws-solution-architect – Thiết kế kiến trúc AWS cho startup dùng mô hình serverless và template IaC. Dùng khi…
- azure-cloud-architect – Thiết kế kiến trúc Azure cho startup và doanh nghiệp. Dùng khi được yêu cầu thiết kế hạ…
- netlify-deploy – Triển khai dự án web lên Netlify bằng Netlify CLI (`npx netlify`). Dùng khi người dùng…
- ai-sre-incident-response – Xây dựng quy trình ứng phó sự cố SRE tập trung vào AI cho các sự cố LLM, chất lượng suy…
- airflow-dag-patterns – Xây dựng Apache Airflow DAG sẵn sàng production theo best practices cho operator…
- cost-optimization – Tối ưu chi phí cloud trên AWS, Azure, GCP và OCI qua rightsizing tài nguyên, chiến lược…
- box – Box quản lý file đám mây, chia sẻ, tìm kiếm và metadata.