NablaTensor vs QuantLib

September 8, 2026 · View on GitHub

Keywords: quantlib java alternative, quantlib adjoint greeks, quantlib monte carlo performance, jvm quant library vs quantlib

QuantLib is the reference open-source quant library — C++, enormous coverage, decades of production use, with a Java binding via SWIG (QuantLib-Java) and the XAD-based adjoint fork (QuantLib-Risks). NablaTensor is not chasing its breadth. It targets the combination QuantLib's Java surface does not give you: a valuation written in plain Java, recorded once, replayed adjoint-accelerated on a bytecode / SIMD / GPU kernel.

Where each fits

QuantLib (+ Java binding)NablaTensor (Phase 1)
Instrument / model cataloguevastvanilla + Asian + lookback + barrier/digital/cliquet/autocallable; GBM, Heston, SABR, local-vol, HW1F, LMM
Greeksbump; adjoint via the XAD fork (C++)one adjoint sweep, all first-order Greeks + model-parameter gradient, pure JVM
Monte-Carlo executionC++ pathsrecorded tape → fused kernel: cpu-jit, simd, vulkan, rocm, cuda
CalibrationLevenberg-Marquardt, finite-difference Jacobianrecorded objective, adjoint gradient, box-projected L-BFGS
Curve bootstrapfull, many conventionsannual single-curve bootstrap with an analytic d(zero)/d(quote) Jacobian
Deployment on the JVMJNI + native .so/.dll per platformpure Java for cpu-jit; FFM only at the GPU boundary, no native jar
Determinism / auditper-engineone scalar CPU oracle every backend reproduces path-for-path

The honest summary

  • Need the catalogue and the conventions today — use QuantLib.
  • Need a specific valuation's full Greek + model-parameter gradient, fast and repeatedly (smile calibration, barrier books, scenario ladders) on the JVM with no native toolchain — that is what the record/replay engine is for, and the Java-native + adjoint + GPU combination has no QuantLib-Java equivalent.

Reproducible numbers

A like-for-like Greeks-and-throughput comparison against QuantLib-Java needs the SWIG binding and its native library wired into nablatensor-examples; that is tracked as a follow-up. What is reproducible today:

  • vs-bump-and-revalue.md — the cost model adjoint replaces (~10x on the Asian-Greeks run).
  • ../validation.md — seed-for-seed reproduction across cpu, cpu-jit, simd, rocm.
  • ../examples/sabr-calibration.md — SSE ~1e-25, parameters recovered, ~1.5 s.
  • mvn -o -q -pl nablatensor-quant test — ModelsTest, ExoticsTest, BasketAndCurveTest, CalibrationTest: adjoint-vs-bump and adjoint-vs-closed-form checks for every Phase-1 product.

Contributions with real QuantLib numbers — the harness, the seeds, the machine — are welcome on this page.