Skip to content

How every number is verified

Nothing lands without a named, green oracle proving it against a known value. "Runs and looks right" is not an oracle, and neither is a test that re-runs the code and agrees with itself.

The oracle ladder

Highest available rung wins:

  1. A closed form from the source that defines the quantity.
  2. An external cross-check — an independent implementation.
  3. Self-consistency — a requirement the finance must satisfy whatever the parameters: put-call parity, a correction that vanishes where it must, a variance that cannot go negative.
  4. A trusted mark.

Two rules do most of the work. The failing reference-value test is committed before the code that satisfies it, because implement-then-check invites bending the code to a number. And the test computes its own reference — never reading a value back from the code under test, nor from the same rendering of the source the code was transcribed from. A reflowed PDF can merge a formula's parentheses, so a second transcription of it repeats the error; load-bearing formulas are read in two renderings and reconciled.

What a green actually proves

Only what the oracle examined. Every defect this project has shipped was an oracle whose domain excluded the thing that was wrong — checked against a prior implementation instead of the source, against one rendering instead of two, on the quote maturities instead of the whole curve, or one parameter at a time instead of jointly.

So the question before trusting a green is where would the failure live, and does the oracle look there? The commonest answer is a degenerate fixture: a parameter sitting where it cannot be seen — an accrual of exactly one, a flat curve, a single period, a zero. Eleven distinct shapes of that have been catalogued here, each after it cost something.

Mutation as the proof a test has power

A green suite hides holes, so the test's power is measured rather than assumed: flip a sign, drop a factor, remove a guard. A surviving mutant is a hole — unless it is provably equivalent, and the proof must be an identity, not an argument that it looks harmless.

This runs as a committed instrument rather than a script written from memory each time, because five re-audits of ad-hoc scripts re-introduced the same tooling bugs twice. It encodes the lessons already paid for: a mutation that never applied is not a mutation that died, a run that errored is not a kill, a stale bytecode cache can make a mutant report a confident kill while testing the original, and a suite that was already red makes every mutant look killed.

Two tracks, one gate

Literature arcs add pricing capability verified against a held book. Structural arcs add library-wide capability — representation, greeks, scenario and P&L — verified against the catalogue the literature arcs built: an analytic greek as the exact target, a finite difference converging to it at a measured rate, a scenario as an exact reprice under a shocked snapshot.

Both pass the same gate. What cannot be oracled is not debt to go deeper — it is out of method, recorded as such, and not built.

The periodic whole-tree re-audit

CI catches structural drift on every push. It cannot catch an oracle that was strong when written and was quietly weakened by a later refactor — the signature failure of this kind of project. So the whole tree is re-audited at every arc close: a full mutation sweep over the oldest code as much as the newest, the registers re-derived rather than re-read, and the charter itself checked for clauses that have gone stale.

It is run with independence — the reviewer is not the surface that built the code — and the findings are ruled, not filed.