Quant Library · Markets and staking · Any
Walk-Forward Backtest Harness
The test that refits before every week and scores against the closing line.
A harness that refits on a schedule, prices the week ahead, scores Brier, log loss, calibration and skill against the market, and simulates a staking rule with closing-line value attached. The point of it is to make lying to yourself difficult.
Inputs
4What it takes
| Name | Type | Units | Where it comes from |
|---|---|---|---|
| fixtures | list with results and prices | - | your database |
| refit_days optional | int | days | how often to refit; weekly is the platform's |
| min_train optional | int | matches | before which no price is emitted |
| staking rule optional | callable | - | optional, to simulate returns as well as scores |
Outputs
5What it gives back
| Name | Type | Units | Notes |
|---|---|---|---|
| metrics | dict | Brier, log loss, accuracy, ECE | |
| market metrics | dict | the same, for the closing line | |
| brier_skill_vs_market | float | fraction | |
| betting | dict | bets, staked, profit, ROI, CLV, max drawdown | |
| predictions | list | - | every priced match, kept so a later rule can be replayed without refitting |
Method
How it works
- Walk the calendar. At each refit date, fit on everything strictly before it and price the following window.
- 3 further steps in the licensed specification
Assumptions
- The stored prices are what you could actually have taken. If your feed's opening price lagged the market, the harness will flatter you and the closing-line value column is how you find out.
Limits
- It cannot know about a limit you would have hit, a price you would have been refused, or a market that would have moved as you bet.
- 1 further limits in the licensed specification
In the package
- The full specification: inputs, method, assumptions and limits
- The validation panel as measured on the day of purchase
- A reference implementation extracted from the running source
- Perpetual commercial use for one entity
Reference modules:
- 1 module(s), named in the licensed specification and shipped in the package
Read this before you buy. The platform's own walk-forward tests say the closing line forecasts football better than these models do. What they give you is a coherent price for every market and match, before the market opens, with the band and the working attached. Any model here that has been beaten by something simpler says so in its limits, and the validation panel above is generated from the platform's result files rather than typed in.