# finmath-lib: a Java library of financial mathematics, from Black-Scholes to multi-curve calibration

> finmath-lib is a long-running Apache 2.0 Java library of numerical finance, covering analytic formulas, finite differences, Monte Carlo simulation of multi-factor rate models, Fourier transform valuation, curve and volatility surface calibration, and Monte Carlo automatic differentiation. It is a research library with a Maven coordinate, not a wrapper around a commercial pricing engine.

**finmath/finmath-lib** — Mathematical Finance Library: Algorithms and methodologies related to mathematical finance.

- Repository: https://github.com/finmath/finmath-lib
- Stars: 586 · Forks: 175
- Language: Java
- License: Apache-2.0
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/finmath-finmath-lib

## The scope is methodologies, not a pricing API

finmath-lib describes itself as a Mathematical Finance Library of algorithms and methodologies related to mathematical finance, and the project home page is at finmath.net/finmath-lib. That word methodologies is the important one. This is a library of numerical methods rather than a product with a pricing endpoint, and the README's own framing is that the libraries provide JVM implementations of methodologies related to mathematical finance, but applicable to other fields. The audience is a quant developer, a graduate student, or a researcher who needs to implement a method, understand one, or verify the output of another system against a second implementation. The topic tags confirm the emphasis, with quantitative-finance, monte-carlo-simulation, simulation, and mathematical-modelling listed. It is also worth noting the line about applicability to other fields, since a good chunk of the library is generic numerical machinery rather than finance specific.

## Analytic formulas cover the classic models and their variants

The analytic formulas section lists distributions for Normal, Gamma, and Non-Central Chi-Squared, with some functions delegated to Apache commons-math, and models for Black-Scholes, Bachelier, SABR, ZABR, CEV, and others. The library also provides general numerical algorithms, including random number generation and optimisation, with a Levenberg-Marquardt algorithm provided. Bachelier and SABR in the same list is a good indication of the range, since Bachelier is the normal model for futures and SABR is the workhorse for the volatility smile, and both sit alongside the models a practitioner reaches for first. The optimisation routine matters more than it first appears, because calibration is where the real work happens in rate and volatility modelling, and a library that ships a Levenberg-Marquardt implementation is one you can inspect rather than a black box. The delegation to commons-math for some distribution functions is a sensible way to avoid duplicating a numerical library that already exists.

## Fourier transform valuation covers the stochastic volatility models

A separate group of the library handles valuation using Fourier transforms and characteristic functions, and the README credits it as contributed by Alessandro Gnoatto, Lorenzo Torricelli, and others. The models listed under it are the ones where the characteristic function is the practical route: Black-Scholes, Heston, Bates, the two factor Bates model, Merton, and the Variance Gamma model, which the README notes is contributed and maintained by Gnoatto. This is a meaningful capability rather than a wrapper, because a characteristic function implementation for Heston is several pages of careful algebra with a branch cut and a Fourier inversion, and getting it wrong produces a price that is plausible and wrong. A separate contribution covers finite difference methods, credited to Ralph Rudd and Jörg Kienitz, using the theta-scheme, applied to the Black-Scholes and Constant Elasticity of Variance models for European options.

## Monte Carlo covers multi-factor rate models and then some

The Monte Carlo section is the largest part of the README, and it is simulation of multi-dimensional, multi-factor stochastic differential equations. The models listed include the Hull-White Short Rate Model with time dependent parameters, the LIBOR Market Model and Forward Rate Model in various forms, the Time Homogeneous Forward Rate Model, the Cross-Currency LIBOR Market Model, a Black-Scholes type multi-asset model using multi-factor multi-dimensional geometric Brownian motion, the Equity Hybrid LIBOR Market Model, and the Merton, Heston, and Variance Gamma models as Monte Carlo simulations. Three further capabilities extend it. American Monte-Carlo is covered, meaning estimation of conditional expectations in a Monte Carlo framework, which is what a Bermudan or multi-callable valuation needs. There is stochastic automatic differentiation as part of the package `net.finmath.montecarlo.automaticdifferentiation`, and there is Monte Carlo simulation on GPGPUs via Cuda, which requires the separate finmath-lib-cuda-extensions project. There is also dependency injection on the numerical algorithms with custom return type priorities, described in a linked SSRN paper.

## Calibration and term structure work is where the library is deepest

The calibration and simulation section covers the part of quant finance that consumes most of a team's time. Rate curve calibration includes multi-curve interest rate curve calibration with OIS discounting, basis swaps, and cross-currency swaps, plus bond curve calibration using local linear regression, a range of interpolation methods including linear, cubic spline, harmonic spline, and Akima, interpolation on different entities such as value, log-value, and rate, and parametric curves like Nelson-Siegel and Nelson-Siegel-Svensson. On the volatility side there is SABR smile parameterization, swaption volatility cubes with SABR parameterization, and CMS replication with various annuity mappings. The simulation of interest rate term structure models includes the LIBOR market model with local and stochastic volatility and the calibration of that model. Complex derivative valuation covers Bermudan options and multi-callables via regression estimation of the conditional expectation for a lower bound, and via the dual method for an upper bound. There is also hedge simulation, and margin valuation adjustments through forward ISDA SIMM simulation, which the README notes is currently a separate project.

## Distribution is a Maven coordinate with a Java 8 classifier

The library is distributed through the central Maven repository with the group id `net.finmath` and the artifact id `finmath-lib`, and the project home page also hosts binary releases. The coordinates differ between the Java lines:

```xml
    <groupId>net.finmath</groupId>
    <artifactId>finmath-lib</artifactId>
    <version>${project.version}</version>
```

For the Java 8 version the same artifact carries a classifier:

```xml
	<groupId>net.finmath</groupId>
	<artifactId>finmath-lib</artifactId>
	<version>3.6.3</version>
	<classifier>java8</classifier>
```

The README adds the note that finmath-lib version 4 and 5 is currently not available for Java 6, and that for Java 6 you may try version 3.6.3 with classifier java6. The build is a Maven project, with a `pom.xml` at the root, a `bnd.bnd` for OSGi metadata, a `checkstyle/` directory with a checkstyle configuration, and a `src/` directory, and the repository also carries an Eclipse code style preferences file. The default Maven profile is Java 11 without Kotlin, with a `java-8` profile for the older line and a `kotlin` profile, and the library is available for Java 11 and Java 8 with examples starting to be provided in Kotlin.

## A branch rename and a version history that stopped in 2020

Two maintenance facts deserve attention. The first is administrative. As of October 12, 2025 the master branch was renamed to main, and the README gives the commands for an existing clone:

```bash
git fetch origin
git branch -m master main           # if you still have 'master'
git branch -u origin/main main
git remote set-head origin -a
```

The second is about the pace of releases. The release list shows finmath-lib 3.4.4 in November 2018, 4.0.5 and 4.1.2 in March 2020, and nothing since, while the last push was on 2026-08-29. The version numbering follows semantic versioning, at least the README says so with a parenthetical, and the last pushed state is considerably newer than the newest published artifact. The reasonable reading is that the library is still being worked on and the artefact you pull from Maven Central is not the tip of the repository. Anyone pinning the latest published version is pinning 2020 code, and anyone who needs the current state has to build from source, which is a real adoption consideration for a numerical library where a fix to a formula matters.

## Conclusion

finmath-lib fits a quant developer or researcher in Java who needs to implement or check a pricing or calibration method and would rather read and modify the code than call a proprietary engine. It is the wrong choice for a production pricing system that needs a vendor support contract, a tested certification, or a modern build, since the newest listed release is from 2020 while the last push was on 2026-08-29. Before adopting it, confirm the Java version you need, because the artifact is published with a classifier for Java 8 and the README says the Java 8 line is version 3.6.3, and check whether the specific model you need is on the supported list, since the coverage is broad but not uniform.

## FAQ

### What does finmath-lib actually provide?

It provides JVM implementations of methodologies related to mathematical finance, including analytic formulas for distributions and models such as Black-Scholes, Bachelier, SABR, ZABR and CEV, general numerical algorithms such as random number generation and a Levenberg-Marquardt optimiser, and a set of specialised packages for Monte Carlo, calibration, and automatic differentiation.

### Which valuation models does finmath-lib price with Fourier transforms?

The README lists the Black-Scholes, Heston, Bates, two factor Bates, Merton, and Variance Gamma models under valuation using Fourier transforms and characteristic functions, credited to contributors including Alessandro Gnoatto and Lorenzo Torricelli.

### How do I add finmath-lib to a Maven project?

The coordinates are group id `net.finmath` and artifact id `finmath-lib` from the central Maven repository, with the version set as you need it. The Java 8 build is published as the same artifact with a `java8` classifier and version 3.6.3.

### Which Java versions does finmath-lib support?

The library is available for Java 11 and Java 8, and the README says the default Maven profile is Java 11 without Kotlin, with a `java-8` profile for the older line and a `kotlin` profile. Version 4 and 5 are not available for Java 6, and the note suggests version 3.6.3 with classifier java6 as an alternative.

### Does finmath-lib support GPU acceleration and automatic differentiation?

Yes to both. The README lists Monte Carlo simulation on GPGPUs via Cuda, which requires the separate finmath-lib-cuda-extensions project, and Stochastic Automatic Differentiation as part of the package `net.finmath.montecarlo.automaticdifferentiation`.

## Sources

- [finmath/finmath-lib on GitHub](https://github.com/finmath/finmath-lib)
- [Issues](https://github.com/finmath/finmath-lib/issues)
- [License: Apache-2.0](https://github.com/finmath/finmath-lib/blob/main/LICENSE)
- [README](https://github.com/finmath/finmath-lib/blob/main/README.md)
- [Releases](https://github.com/finmath/finmath-lib/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/finmath-finmath-lib
