Skip to content

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 .pyi stubs 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

Install

pip install itofin
cargo add libitofin

Install the matching native library first, following the Go SDK guide. Then add the module to your application:

go get github.com/benbenbang/libitofin/sdk/go@v0.24.0

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

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.