RustQuant: a Rust library for quantitative finance, module by module
Rust library for quantitative finance.
At a glance
- What is it?
- RustQuant is a Rust workspace for option pricing, stochastic processes, curves and a limit order book. Its own README calls it a free-time project, so the question is which parts are worth building on.
- Who is it for?
- RustQuant fits engineers who want a Rust-native toolbox for pricing experiments, teaching, or prototyping stochastic models, and who are willing to read docs.rs because the README is a module table rather than a guide. It does not fit anyone who needs a supported system for live trading: the README states it is a free-time project and not a professional financial software library, and it recommends against using it for trading or financial decisions.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 19 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 1, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What RustQuant covers, and the gap it fills
Quantitative finance code in Rust usually starts as a private pile of pricing functions. RustQuant is an attempt to publish that pile as a structured library. The README describes it plainly as "A Rust library for quantitative finance", with a module table covering autodiff, cashflows, data, error, instruments, iso, math, ml, macros, models, portfolio, stochastics, time and trading.
The intended audience is visible in the repository itself. The README opens with an invitation: "If you are an experienced quant developer in any language and would like to help out, feel free to contact me!" That is a contributor call, not a vendor pitch. The topics list on the repository includes option-pricing, stochastic-processes, statistics, regression and trading, which matches the module table rather than exceeding it.
The honest framing matters more than the feature list. The README carries a note that begins "Disclaimer: This is currently a free-time project and not a professional financial software library", and states that nothing in it should be taken as financial advice and that the author does not recommend using it for trading or financial decisions. Read that before anything else. RustQuant is a library for people who want to compute and study models in Rust, not a service that will price your book correctly under deadline.
Crate layout: one workspace, several published crates
The root Cargo.toml is a workspace, not a single package. It declares members as "crates/*", "examples" and "bindings", with resolver 2. The workspace package section sets version 0.4.0, edition 2021, and license "MIT OR Apache-2.0". The repository also carries LICENSE-APACHE.md and LICENSE-MIT.md at the top level, and the README badge reads "Dual_License-MIT_and_Apache_2.0".
That split is the most consequential architectural fact for a user. The recent release list names RustQuant_utils-v0.4.0, RustQuant_time-v0.4.0 and RustQuant_stochastics-v0.4.0, all dated 2024-11-23. So the umbrella name and the individual crates can move apart: a crate you pull in may sit at a version that does not match the workspace number you read in the root manifest. Check the crate you actually depend on rather than the workspace version.
Two lint settings in the root manifest tell you something about the code's expectations. Under workspace.lints.rust, missing_docs is set to "forbid". Under workspace.lints.clippy, undocumented_unsafe_blocks is "forbid". In practice that means the codebase is pushed toward documented public items and documented unsafe blocks, which is a reasonable signal for a library you intend to read. It says nothing about numerical correctness, which is a separate question you have to answer yourself.
The bindings/ directory exists in the repository layout, but the README does not document what it exposes or how to build it. If you need a non-Rust interface, treat that directory as unexplored until you read its own files.
The modules that do the actual pricing work
The instruments module is where pricing lives. The README lists implementations for "Bonds, Options, and Money, including their pricing", and adds that "Future additions will include swaps, futures, CDSs, etc". That sentence is the clearest statement of scope in the whole document: if your work is swaps, futures or credit default swaps, the module table is telling you it is not there yet.
The models and stochastics modules overlap deliberately. Models covers "the various forms of Brownian Motion, short rate models, curve models", while stochastics provides generators for Brownian Motion (standard, arithmetic, fractional and geometric) and short-rate models including CIR, OU, Vasicek and Hull-White. The split is between describing a process and generating paths from it, which is a sensible boundary if you are building a Monte Carlo pipeline.
Underneath both sits math, which the README describes as statistical distributions with their related functions (PDF, CDF, CF), Fast Fourier Transform, numerical integration by double-exponential quadrature, optimisation and root-finding (gradient descent, Newton-Raphson), and risk-reward metrics, plus sequence helpers such as linspace and cumsum. The autodiff module handles algorithmic adjoint differentiation for gradients of a scalar output function. Together these are the pieces you need for a pricing routine that has to differentiate through a model.
The ml module is the narrowest of the group: "Currently only linear and logistic regression, along with k-nearest neighbours classification are implemented." Do not read the machine-learning topic tag as a promise of more. The trading module is similarly scoped: "Currently only a basic limit order book (LOB)."
Installing RustQuant and running a first example
RustQuant is a Rust library, so it enters your project through Cargo. The README does not print an install line, but the repository layout and the crates.io badge make the dependency path clear: add the crate to a Cargo project and build. Because the workspace splits into crates, confirm on crates.io which crate name you want before you write the manifest.
cargo add RustQuant
cargo buildThe quickest way to see the library working is the examples directory, which the README points to directly: "See /examples for various uses of RustQuant." The repository layout confirms examples/Cargo.toml and examples/examples/. The README gives one command for running them.
cargo run --example <example>Replace the placeholder with a name from examples/examples/; the README does not enumerate them, so list the directory first. What you should see is the example's own output on stdout, which varies by example. If you clone the repository rather than depending on the published crate, run that command from the workspace root, since examples is a workspace member.
For a release build with debug symbols, the root Cargo.toml documents a custom profile in a comment: use cargo build --profile=release-with-debug, which inherits from release and sets debug = true. That is useful when you are chasing a numerical discrepancy and want a usable stack trace. The default dev profile in the same file sets debug = 0.
Where RustQuant is the wrong tool
The README's own disclaimer is the first limitation, and it is not boilerplate. It says the project is a free-time project, not a professional financial software library, and that the author does not recommend using it for trading or financial decisions. If your requirement is a validated pricing library with a support contract, this is not it, and no amount of module coverage changes that.
Coverage gaps are the second. The instruments module lists swaps, futures and CDSs as future additions, so any workflow centred on those instruments has to be built elsewhere. The trading module is a basic limit order book only. The ml module is three algorithms. These are stated scope boundaries, not bugs, but they will decide your adoption for you.
Versioning is the third and the least obvious. The workspace package version is 0.4.0, and the three named releases are all at 0.4.0. Pre-1.0 version numbers mean the API can move between minor releases, and with a multi-crate workspace the moving parts are not all the same crate. If you pin RustQuant in a long-lived service, pin exact versions and read the changelog before upgrading.
Finally, the documentation surface is uneven. The README is a module table with a disclaimer; the real API documentation lives on docs.rs, where the module links point. The README does not document the bindings directory, does not enumerate the examples, and does not describe rollback or migration between versions. Budget time for reading source, not just docs.
RustQuant against QuantLib and a hand-rolled module
The natural comparison is QuantLib, and the README makes it explicit by listing "quantlib" as a keyword in the root Cargo.toml. QuantLib is a long-established C++ library with a large surface across instruments, calendars, curves and pricing engines, and it has bindings for several languages. RustQuant is a Rust workspace with a much smaller surface: bonds, options and money in instruments, a handful of short-rate models, and a basic limit order book. The difference in approach is not just language. QuantLib is an institution-scale library with decades of accumulated conventions; RustQuant is a Rust-native collection that follows the same broad problem decomposition, down to its own time module for day counters, calendars, conventions and schedules, and its own iso module for ISO-4217, ISO-3166 and ISO-10383 codes.
The second alternative is writing the math yourself. For a single Black-Scholes call or a Vasicek path, a few hundred lines of Rust may be less work than learning a pre-1.0 API surface. RustQuant earns its place when you want the surrounding machinery: distributions with PDF, CDF and characteristic functions, FFT, double-exponential quadrature, gradient descent and Newton-Raphson root-finding, plus autodiff for gradients, all behind one dependency. The data module is the other reason to prefer it, since the README says it can read and write CSV, JSON and Parquet and can download data from Yahoo! Finance. If you already have a data pipeline and only need one pricing formula, the library is more surface than you need.
Licence, maintenance and the cost of upgrading
RustQuant is dual licensed under MIT and Apache-2.0, stated in the root Cargo.toml as "MIT OR Apache-2.0" and reflected by LICENSE-MIT.md and LICENSE-APACHE.md in the repository root. That is the common Rust arrangement, and it means you choose which of the two terms you take the code under. The README also carries a FOSSA status badge, which indicates licence scanning is part of the project's tooling. Nothing here is legal advice; if your organisation has a licence policy, run the dual-licence choice past whoever owns it.
The maintenance picture is mixed and worth stating precisely. The repository is not archived, and the last push was on 2026-09-12, six days before this writing. The most recent named releases, however, are RustQuant_utils-v0.4.0, RustQuant_time-v0.4.0 and RustQuant_stochastics-v0.4.0 from 2024-11-23. Activity on the default branch and tagged releases are therefore not moving at the same pace, which is normal for a free-time project but relevant if you depend on release tags.
Upgrade cost follows from the workspace layout. Because crates/* are separate members with their own versions, a bump in one crate does not imply a bump in another. The CHANGELOG.md at the repository root is the place the project points to for latest changes. Pin exact versions in your manifest, read the changelog before moving, and expect that a pre-1.0 minor bump may require edits at call sites.
Editorial conclusion
RustQuant fits engineers who want a Rust-native toolbox for pricing experiments, teaching, or prototyping stochastic models, and who are willing to read docs.rs because the README is a module table rather than a guide. It does not fit anyone who needs a supported system for live trading: the README states it is a free-time project and not a professional financial software library, and it recommends against using it for trading or financial decisions. Before adopting it, check the crates/ directory layout and the published version of each crate you depend on, since the workspace version is 0.4.0 while the release list only names RustQuant_utils, RustQuant_time and RustQuant_stochastics at that version, and confirm whether the module you need is documented as implemented or listed as a future addition.
Frequently asked questions
Is RustQuant a replacement for QuantLib?
No. RustQuant is a Rust library whose root manifest lists quantlib as a keyword, and its instruments module covers bonds, options and money, with swaps, futures and CDSs named as future additions. QuantLib is a much larger C++ library with a broader instrument surface, so the two differ in scope as well as language.
Can I use RustQuant for live trading?
The README states it is a free-time project and not a professional financial software library, and that the author does not recommend using it for trading or making financial decisions. The trading module is described as currently only a basic limit order book.
How do I install RustQuant in a Rust project?
Add it as a Cargo dependency and build, for example with cargo add RustQuant followed by cargo build. Because the repository is a workspace with members under crates/*, check crates.io for the specific crate name and version you want before writing your manifest.
How do I run the RustQuant examples?
The README points to the /examples directory and gives the command cargo run --example <example>. The repository layout contains examples/Cargo.toml and examples/examples/, and the README does not list the example names, so look in that directory first.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/avhz-rustquant)