What is backtesting?
Backtesting runs a new fraud rule, threshold or model on past data with known outcomes to estimate how it would have performed before it goes live.
Also called: historical testing, retro testing, rule simulation
How it works
A team takes a period of past events where it knows which ones were fraud. It applies the new rule or model to those events as if it had been live, and counts what would have happened: fraud caught, fraud missed and good customers stopped.
The results are compared with the current setup. This shows the trade-off clearly, for example how much extra fraud a stricter threshold would catch for each extra good customer it declines.
Why it matters for fraud and trust
Changes to fraud controls affect real customers and real money. A rule that looks sensible can block many good users. Backtesting finds these problems before customers feel them, and gives evidence for the change.
Common pitfalls
- Data leakage: using data in the test that was not available at the time of the decision.
- Label delay: recent periods have fraud that is not yet reported, so results look too good.
- Selection bias: past declines have no outcome, so the test cannot show what those customers would have done.
- Changing attacks: fraudsters adapt, so past results may not hold for the future.
Good practice
Use a time period after the data used to build the rule or model. Report results with precision and recall, not only a single number. After a backtest, many teams run the change in monitor-only mode or as a champion-challenger test before full launch.
Related terms
- Champion-challenger testingChampion-challenger testing compares the current fraud strategy, the champion, with a new one, the challenger, on live traffic to see which performs better before a full switch.
- Precision and recallPrecision is the share of flagged cases that are truly fraud. Recall is the share of all fraud that gets flagged. Together they show how well a fraud check works.
- Fraud rules engineA fraud rules engine is software that applies written conditions to events, such as logins or payments, and returns an action like approve, review, challenge or decline.
- Model driftModel drift is the drop in a model's performance over time as real-world data or the link between inputs and outcomes changes from what it learned.
- AI evaluation (evals)AI evaluation, often called evals, is the practice of testing an AI model or system on defined tasks and metrics to measure quality, safety and fitness for use.