# morphiq-risk benchmarks — 2026-10-31

morphiq-risk **0.43.2** (release `v0.43.2`, commit `b1ea59e3e239d5576faf616d696c5b36acba3f24`) against native **QuantLib 1.41** C++ on one GCP `c4-standard-8-lssd` (Intel Granite Rapids, {'threadsPerCore': 1, 'turboMode': 'ALL_CORE_MAX'}), `us-east4-a`, image `debian-12-bookworm-v20261027`.

These are successful scalar engine calls on fixed fixtures and 100,000-contract batches. They are not service latency, and the figures describe this host profile only.

## Results

| Workload | morphiq-risk | QuantLib | QuantLib / morphiq-risk |
| --- | ---: | ---: | ---: |
| European call · price | 76.5 ns | 1.02 µs | 13.4–13.4× |
| European call · implied volatility | 964 ns | 8.62 µs | 8.87–9× |
| European call · price and five Greeks | 330 ns | 1.04 µs | 3.16–3.12× |
| American put · Bjerksund-Stensland 1993 price | 598 ns | 3.2 µs | 5.35–5.34× |
| American put · Bjerksund-Stensland 1993 price and five Greeks | 2.07 µs | 3.22 µs | 1.56–1.55× |
| American put · QD+ fixed point price vs QuantLib fastScheme | 11.1 µs | 14.3 µs | 1.28–1.28× |
| American put · QD+ fixed point price vs QuantLib accurateScheme | 11.1 µs | 138 µs | 12.4–12.4× |
| American put · QD+ fixed point price vs QuantLib highPrecisionScheme | 11.1 µs | 6.11 ms | 548–548× |

| morphiq-risk only | morphiq-risk |
| --- | ---: |
| European call · price and all ten Greeks | 388 ns |
| American put · Bjerksund-Stensland 1993 price and all ten Greeks | 3.07 µs |

All ten Greeks: delta, gamma, theta, vega, rho, vanna, volga, charm, veta and color. QuantLib has no second-order Greeks, so these rows have no comparison.

| Batch | Per batch | Per contract | Threads |
| --- | ---: | ---: | ---: |
| BSM · price and all Greeks for 100,000 contracts | 9.7 ms | 97 ns | 4 |
| BSM · IV, forward and all Greeks for 100,000 contracts | 33.9 ms | 339 ns | 4 |

QD+ fixed point: morphiq-risk prices with its qualified scale-aware scheme (1e-4 max(S,K) price criterion). QuantLib's fast and accurate schemes miss that criterion on part of the validated region; high precision meets it (docs/american-qdfp-design.md).

## Method

- Phases ran in the order A1, B1, B2, A2, C1, C2: A is morphiq-risk, B is QuantLib, C is the morphiq-risk batch. Each phase is a fresh process; scalar phases are pinned to one CPU, batch phases to the four batch CPUs.
- Each workload: a pilot sizes samples to 50 ms, 1000 ms of warmup, then 60 timed samples; the statistic is the median ns per call. Tables show the midpoint of the two phase medians; ratios are QuantLib time over morphiq-risk time, paired A1/B1 and A2/B2.
- Every QuantLib call forces recalculation, so cached results are never timed. Both engines read bit-identical inputs (recorded in raw-results.json). Five Greeks means delta, gamma, vega, theta and rho on both sides.
- morphiq-risk is built from the release source with its own lockfile (`cargo build --locked --release`, Rust 1.97.1); the harness file is overlaid from campaign commit `b1ea59e3e239d5576faf616d696c5b36acba3f24`. QuantLib 1.41 is built from its release tarball (SHA-256 `c5e9a30fce129660932e643647eb9a14e19ec24344d6b813c57c054187b03bdd`) with CMake `Release`; the harness uses g++ (Debian 12.2.0-14+deb12u1) 12.2.0 at `-O3`.
- Value agreement between the engines is reported in summary.json as a diagnostic. It is not a correctness claim; accuracy is established against independent references in the engine repository.

## Files

- [summary.json](summary.json): displayed figures, phase medians, paired ratios, host and hashes.
- [raw-results.json](raw-results.json): every phase as recorded, with all samples, inputs and outputs.
- [website_harness.rs](website_harness.rs) and [quantlib_harness.cpp](quantlib_harness.cpp): the exact harnesses.

Reproduce with `scripts/bench_campaign/website/run_gcp.py --release v0.43.2` in the engine repository (attempt `20261031T121114Z-gcp-c4-standard-8-r9a55775`).
