Backtesting Frameworks
Build robust, production-grade backtesting systems that avoid common pitfalls and produce reliable strategy performance estimates.
Use this skill when
- Developing trading strategy backtests
- Building backtesting infrastructure
- Validating strategy performance and robustness
- Avoiding common backtesting biases
- Implementing walk-forward analysis
Do not use this skill when
- You need live trading execution or investment advice
- Historical data quality is unknown or incomplete
- The task is only a quick performance summary
Instructions
- Define hypothesis, universe, timeframe, and evaluation criteria.
- Build point-in-time data pipelines and realistic cost models.
- Implement event-driven simulation and execution logic.
- Use train/validation/test splits and walk-forward testing.
- If detailed examples are required, open
resources/implementation-playbook.md.
Safety
- Do not present backtests as guarantees of future performance.
- Avoid providing financial or investment advice.
Resources
resources/implementation-playbook.mdfor detailed patterns and examples.
AGI Framework Integration
Adapted for @techwavedev/agi-agent-kit Original source: antigravity-awesome-skills
Memory-First Protocol
Retrieve prior test strategies, known flaky tests, and coverage gaps. Cache test infrastructure setup to avoid re-configuring test environments.
# Check for prior testing/QA context before starting
python3 execution/memory_manager.py auto --query "test patterns and coverage strategies for Backtesting Frameworks"
Storing Results
After completing work, store testing/QA decisions for future sessions:
python3 execution/memory_manager.py store \
--content "Testing strategy: integration tests hit real DB (no mocks), 85% line coverage, mutation testing on critical paths" \
--type technical --project <project> \
--tags backtesting-frameworks testing
Multi-Agent Collaboration
Share test results and coverage reports with code review agents so they can verify adequate coverage on changed code.
python3 execution/cross_agent_context.py store \
--agent "<your-agent>" \
--action "QA complete — test suite expanded with 12 new integration tests, all passing" \
--project <project>
TDD Enforcement
This skill integrates with the framework's iron-law RED-GREEN-REFACTOR cycle. No production code without a failing test first.
Agent Team: QA
Dispatch qa_team to generate tests and verify they pass before marking implementation complete.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.