itofin¶
For interrupted publication, see release recovery.
libitofin is a ground-up port of
QuantLib into idiomatic Rust, with Python and Go
bindings. All three language surfaces share the Rust numerical core.
- Fidelity in numerics, usability at the boundary. QuantLib is the oracle for every
number; the Python API adds ergonomic conveniences (keyword constructors,
price(engine)) without changing the math. - Typed and introspectable. Every class ships hand-written
.pyistubs with Google-style docstrings, so editors autocomplete and this site renders the full signature.
Go and Python expose fixed/zero/floating bond instruments, retained discounting engines and yield/Z-spread analytics: bond binding guide. Existing bootstrap helpers remain separate. Callable bonds, Hull-White tree and single-European Black pricing/IV share the retained Bond interface. OAS and effective risk measures remain separate binding work.
Standalone binding helpers¶
- Reusable currencies and stored fields, plus named currency presets including TWD.
- Black FX delta conventions: standalone delta/strike and ATM conversions, not an FX option pricing engine.
Install¶
Install the matching native library first, following the Go SDK guide. Then add the module to your application:
Go requires cgo, a C compiler, and the itofin_external build tag for
applications outside this repository.
The Getting started page has runnable pricing examples in Python, Rust, and Go. The project index links to the language guides and project documentation.
Where the docs live¶
| Surface | Where |
|---|---|
| Python API reference | This site (see the Python API section) |
| Rust API reference | docs.rs/libitofin - see Rust API |
| Go SDK | Installation, sessions, and examples, plus API reference |
| Worked examples | example/python, sdk/go/examples, and crates/libitofin/examples |
Reviewed Rust additions¶
- Priority adoption scope and limits: 18 retained High rows, with 10 excluded because existing issue acceptance already owns them.
- Rust-core only: no new Python, C or Go facades, and no release implied.
Project guides¶
- Language guides: Rust, Python, Go.
- Status and scope
- Development
- Design
-
Small LOW Rust additions: additive helpers, immutable legacy components, independent references and deferred scope.
-
Bond Z-spread analytics: live-curve clean/dirty quotes and checked spread inversion with settlement and current-notional conventions.
-
Exchange-rate chaining: ordered direct/derived conversions, currency orientations and checked numerical boundaries.
-
Bond forwards: retained live bonds, explicit income/financing curves and checked delivery quotes.
-
Implied volatility term structure: fixed-reference forward variance, live source handles and explicit extrapolation.
-
Black-Scholes theta: current-market theta from supplied Greeks with checked source-order arithmetic.
-
FX forwards: explicit settlement-normalized currency-tagged valuation and snapshot spot inputs.
-
Hull-White forward process: live yield curves, forward-measure transitions and checked stable limiting formulas.
-
Quanto term structure: linked standalone quanto dividend yields with native numeric-time conventions.
-
ABCD math and volatility: coefficient validation, volatility shape and integrated variance/covariance.
-
Householder utilities: checked reflections, orthogonal matrices and explicit native application conventions.
-
Zero-coupon bonds: single-redemption contract and payment dates.
-
Floating-rate bonds: Ibor coupons, gearing, caps/floors and ex-coupon schedules.
-
Par asset swaps: bullet-bond dirty upfront and floating fair spread.
-
Asset swap bindings: retained plain bullet bonds, live Ibor/discount curves and par swap analytics.
-
Cross-currency basis swaps: plain non-resettable Ibor legs and explicit FX valuation.
-
MF state process: standalone Gaussian state law and checked piecewise variance.
-
Asset-or-nothing payoff: strict digital asset payment.
-
Gap payoff: separate trigger and payment strikes.
-
Cap/floor optionlets: shared coupon extraction and pricing decomposition.
-
Constant GSR process: exact Gaussian forward-measure dynamics and checked constant grids.
-
Plain float-float swaps: two-Ibor-leg signed valuation and fair spreads.
-
OIS payer and receiver: explicit swap side with the existing payer default.
-
Bachelier asset ITM: normal-model helper and its zero-volatility convention.
-
Percentage-strike payoff: dimensionless moneyness and exact multiplication order.
-
Floating-type payoff: a supplied strike at each scalar evaluation.
-
Callable zero-coupon bonds: hard calls/puts and Hull-White lattice quotes.
- Constant-parameter GSR process, with mutable forward-measure horizon.
Bond forward bindings retain live plain fixed/zero bonds and explicit financing/income curves.
Plain-vanilla BlackCalculator exposes scalar pricing and Greeks with documented inherited numerical limits. Bond risk analytics covers duration, convexity and signed yield sensitivities. FX forward bindings retain live discount curves with immutable spot and explicit contractual dates.