Golden Regression Tests
Golden regressions lock a set of inputs and outputs so any drift in pricing behaviour becomes immediately visible.
Explanation
A golden regression suite consists of reference trades evaluated under fixed market snapshots and model configurations.
Their prices, Greeks, and diagnostics are stored as expected outputs with tolerances appropriate to each method.
Every code change reruns the suite; deviations beyond tolerance fail tests and force an explicit decision.
Updating golden values is a controlled act that should reflect a deliberate model or bug-fix decision, not an accident.
regressiongolden testsdrift detectionreference trades
Interactive visualisation
Golden regression tests
Lock inputs and expected outputs. Force explicit decisions on drift.
Change scenario
Tolerance rule
abs_tol
0.020
rel_tol
0.0010
Suite verdict
PASS
Failures
0 / 6
Updating golden values is a controlled act. If tests fail, you either revert or you document the reason and update deliberately.
Vanilla call
PRICE — case T1
PASS
expected: 2.510 · new: 2.510
|diff| = 0.000 · bound = 0.023
Vanilla call
DELTA — case T1
PASS
expected: 0.540 · new: 0.540
|diff| = 0.000 · bound = 0.021
Put spread
PRICE — case T2
PASS
expected: 1.120 · new: 1.120
|diff| = 0.000 · bound = 0.021
Put spread
VEGA — case T2
PASS
expected: 0.180 · new: 0.180
|diff| = 0.000 · bound = 0.020
Digital
PRICE — case T3
PASS
expected: 0.410 · new: 0.410
|diff| = 0.000 · bound = 0.020
Digital
DELTA — case T3
PASS
expected: 0.090 · new: 0.090
|diff| = 0.000 · bound = 0.020
Interpretation
- Goldens turn behaviour into a contract: fixed inputs → expected outputs.
- Small drifts are often worse than big breaks, because they slip into production silently.
- If failures are intentional, you update goldens with a recorded rationale and version bump.