How a Rewindex backtest works
This page explains exactly how results are produced, so you can judge them yourself. A backtest is only as honest as its assumptions, so here they all are.
The data
We record short-duration prediction markets ourselves, tick by tick. For every contract we keep:
- every order-book snapshot and every change to it, with the time we received it;
- the reference price the contract settles on (or a recorded substitute where the official source isn't available, and those results are labelled);
- each contract's strike and its official result.
Replay without look-ahead
Events are fed back in the order they were received. A rule can only use information that existed at that moment. Results become visible to rules 20 seconds after a contract closes, as observed live. Nothing from the future leaks into a decision.
How an order is filled
- Decide. The rule sees an opportunity in the current order book.
- Confirm. It waits for a fresh order-book update at least 0.25 seconds later and checks the opportunity is still there.
- Submit. After a further delay (0.5 seconds by default) the order goes in. You can test slower order speeds; each one is a full re-simulation.
- Fill. The order walks the recorded order book level by level, buying only the contracts actually offered at each price. If the price moved or the book thinned, the trade is smaller or doesn't happen.
- Fees. The venue's published taker fee is charged on every fill.
- Settle. Each contract pays $1 or $0 on its official result.
Every simulated trade carries a plain-English note: which price levels it took, the average price, the fee, how long before the close it happened, and how it settled.
Statistics, and why they're there
Controls
Every rule is run next to two controls on the same contracts: one that picks a side at random and one that always buys the favourite. A rule is only interesting if it clearly beats both.
Is it luck?
We resample the trade list 2,000 times (a bootstrap) to get a 95% range for total profit, and say plainly whether that range is above zero, below zero, or straddles it. This assumes trades are independent, which flatters rules whose trades are correlated, so treat it as a minimum test, not proof.
Early days versus late days
The recorded days are split in two and the rule is scored on each half. A rule that only works in one half is probably fitted to noise.
Fill uncertainty
Results are also shown as if every fill were 1 cent worse and 1 cent better. If that small change flips a result from profit to loss, the edge is too thin to trust.
Other measures
- Net profit and return per dollar, after fees.
- Win rate, profit factor (winnings divided by losses) and expectancy (average profit per trade).
- Per-trade Sharpe: average return per dollar risked, divided by its variability.
- Maximum drawdown: the deepest fall from a running peak.
- Calibration and Brier score: how often the side bought actually won, compared with the price paid and with the model's own probability. Lower Brier is better.
- Position sizing: as the rule chose, fixed dollars, a percentage of a starting bank, or a capped Kelly fraction.
Known limits
- Orders that take the best available price don't model a place in the queue. Resting-order rules with a queue model are planned.
- Larger position sizes are scaled from the recorded fills; real large orders would reach deeper into the order book.
- A slower order still fills at whatever the book shows. A real trader might give up instead.
- Some markets settle on sources we can only approximate; those results are labelled.
- Recordings can have gaps. We flag days and markets with incomplete coverage.
- Short samples and testing many rules on the same data make chance look like skill. Past results, real or simulated, don't predict future results.
Rewindex is a software tool for research and education. It doesn't place orders, hold funds or give investment advice. Terms and disclaimers