Where the heritage is landing
How the Risk Evolution stochastic-vol heritage fits into the ReflexLibs.ai build, an architecturally satisfying discovery about the 2014 SSRN paper, and a thought on where all of this goes commercially.
The short version
- reflexlibs.ai is one MathIR authoring layer that emits native pricers to C#, Rust, WASM, WIT and ~10 other target lanes. Black-76 has shipped as the reference pattern; SABR follows. Heston and Bates are scaffolded and awaiting kernels.
- The Risk Evolution heritage at
reflex_analytic/andreflex_analytic_raw/is the mathematical north-star for the stochastic-vol family. Under the heritage permission grant it is used as a direct porting source into MathIR. - The 2014 SSRN paper turned out to be the public derivation of exactly
what sits in
HestonNormal.cpp. That opens up a dual-path architecture (diagram below) that is genuinely elegant: the same mathematics has two independent, citeable authorities.
The architecture
Two independent porting paths converging on the same MathIR AST:
Clean-room derivation from the 2014 SSRN paper. Uses published equations directly. No heritage contact at all. Lowest possible copyright surface.
Direct port of HestonNormal.cpp into MathIR under the
permission grant. Preserves 10+ years of production-tested edge cases
— complex-log branch fix per Lord & Kahl 2010, quadrature
tweaks, overflow guards — that the paper doesn't spell out.
Both paths emit through the same lanes (Roslyn / Rust / WASM) and run against identical oracle test vectors. Agreement = two-way verified. Disagreement = triangulated bug — the difference tells us exactly which lane is wrong.
The pattern generalises. Same structure applies to every stochastic-vol family for which a public paper exists:
| Family | Public paper | Heritage | Rows |
|---|---|---|---|
| Heston Normal | SSRN 2445328 (2014) | HestonNormal.* | 7 |
| Heston Lognormal | Heston 1993 (Rev. Financ. Stud.) | HestonLognormal.* | 10 |
| Heston Lognormal-Shifted | Heston 1993 + displacement | HestonLognormalShifted.* | 10 |
| Bates (all variants) | Bates 1996 (Rev. Financ. Stud.) | Bates*.* | 27 |
| SABR | Hagan et al. 2002 (Wilmott) | SABR*.* | shipping |
Every port has dual provenance: one citable public paper, one licensed heritage implementation. That's a very clean story for any future licensing, audit, or acquisition conversation.
Current state
| Test coverage matrix rows | 125 across 7 families |
| Cells PASS today | 173 of 1,250 (Black76 + SABR core shipping) |
| Cells MISS (porting backlog) | 1,077 |
| Execution lanes | Rust · C# · Roslyn · Jint · Wasmtime · WIT · IronPython · … |
| Cross-language three-way tests | 60 / 60 (Roslyn + Jint + Wasmtime) |
| Heritage families inventoried | all 7 (Black · Bates · Heston · CEV · Kirk · SABR · Intrinsic) |
| Papers as authorised porting sources | 1 shipped (SSRN 2445328), 3 next in queue |
The 125-row coverage matrix is the honest ledger of what's done and what's backlog. JSON-sourced with a JSON Schema, renders to both Markdown and HTML, eventually CI-regenerated from actual test runs.
Where this is heading — commercially
Open-source lane — reflexlibs.ai public
Pricing libraries for Black / Black-76 / Bachelier / Shifted / SABR. MIT-style license. GitHub-hosted. Community adoption vector — reputation, downstream hiring, customer funnel.
Proprietary lane — Xll.Ai / Risk Evolution
The MathIR emitter factory itself: 13 target emitters, Roslyn host harness, triumvirate test rig, WIT Component Model distribution. Heston / Bates ship as WIT signatures only on the open side; full kernels live behind the enterprise licence. Custom-model development for specific client books.
Plausible revenue lanes
- Enterprise MathIR licensing — banks, hedge funds: pay for the factory, get emitters in all 13 languages, run internally with zero-data-retention.
.wasmComponent-Model distribution — one binary, any language embeds it (including Excel via EPPlus).- SaaS catalogue surface — the
NanoPrismrenderer is already live. - Custom kernel work — Heston / Bates shifted variants, exotic spreads, anything bespoke.
None of this is live today. The infrastructure is roughly six months out. But it's worth saying now that the Risk Evolution heritage is the crown jewel in this structure — without it, the whole stochastic-vol side of the catalogue is empty.
On the AI-assisted build pipeline
Full transparency: the original version of AST Math generation was developed by Steve Dickson in Q1 2025, drawing on his background in compiler theory and his extensive experience with expression parsers at Lehman Brothers on the 1990s cash-flow editor. The original MathIR codebase was developed in C# using OpenAI o3-mini-high and o4-mini-high models early 2025. This project is being built with significant help from Anthropic's Claude. The heritage permission grant explicitly excludes use of the code for Anthropic foundation-model training. Target-language ports are session-time outputs, not training data.
The underlying heritage was built 2011–2022 by the original Risk Evolution team. This whole project is built on top of that work, and it's still the reference we measure against.