Validation
Validation of solver results is recorded in three pages:
- Classical methods - the finite-difference (FD) and
least-squares Monte Carlo (BSDE) paths in the Rust
solvercrate, validated insidecargo test. - Neural network methods - the deep BSDE, deep HJB (DGM),
and neural operator methods in the
neural_solverpackage (JAX), validated by the Python test suite and against committed Rust reference values. - BSDE precision - the one-time high-precision BSDE verification against exact solutions, targeting \(\leq 0.1\%\) relative error.
Canonical error metric
All numerical-versus-reference comparisons use the canonical error metric in
solver::validation. The primary quantity is the normalized relative error
\[ \varepsilon = \frac{|x - x^{\text{ref}}|}{\max(|x^{\text{ref}}|, f)} \]
where f is the small absolute floor (DEFAULT_ABS_FLOOR = 1e-12) that
prevents division by zero when the reference is at or near zero. A percentage
is \(100\,\varepsilon\). The helpers relative_error, percent_error,
assert_within, and assert_close are shared across every solver test and
benchmark so that a reported tolerance means the same thing regardless of the
magnitude of the quantity under test.