Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs.
SkillScore100Maintained
Automatic
◆Finance & Accounting pack
Last verified 8/29/2026
What it changes
Passed 25 of 25 test cases with the skill, and 20 of 25 without it.
Without skill80%
With skill100%
Checks it passed that the model alone missed
Returns list of train and test DataFrame split tuples
Divides base price by slippage factor for sell orders
Defines class WalkForwardOptimizer with generate_splits method
and 3 more in the full report
5 fixed20 passed either way0 still failing0 broke
Pass-rate lift
+20 pp
Tokens
+156%
Agent turns
0%
Response time
-6%
Model gemini-3.6-flashMeasured 8/29/2026v125 of 25 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 5
Prompt
Specify the mathematical formulas used by `SimpleExecutionModel` to determine the fill price for BUY versus SELL market orders, given base bar price and slippage parameter in basis points.
What was checked, without and with the skill
Checked
Without skill
With skill
Multiplies base price by slippage factor for buy orders
Passed
Passed
Divides base price by slippage factor for sell orders
Missed
Passed
case-25 · gemini-3.6-flash · 8/29/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md658 linessingle file
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) │