Quantitative finance/mathematical library for Java

QuantLib apparently has Java bindings via SWIG.


I do quite a bit of numerical work in Java and Clojure so hopefully my perspective can be useful.

For 1. and 2. here are some options to explore:

  • Parallel Colt - very comprehensive, high-performance mathematical library. Good for lots of vector processing which you get in finance apps.
  • Incanter - R-like statistical library for Clojure (very easy to embed in a Java app). Has pretty much all the statistical tools you could desire, plus is very easy to extend if you want to create your own DSLs
  • EJML - probably the fastest matrix library available in Java
  • Apache Commons Math - handy collection of maths and statistical tools

For 3. (financial models) these tend to be pretty bespoke to the problem you are trying to solve. I doubt you would want to use an off-the-shelf solution even if it existed. I'd suggest developing yourself using the toolkits mentioned above.


Strata from OpenGamma contains those items. It is a professional quantitative finance library written in Java and open source.

The quantitative finance part contains interest rate, forex and equity models. It is developed by industry quants for bank and hedge funds. I don't which type of financial models you want to use; there is a large panel of models and asset classes and you should be able to find off-the-self a professional type implementation.


IdylFin might be just what you are looking for -- inspired by quantmod, it contains some blazing fast, numerically stable statistical methods, an API to Yahoo Finance, as well as some portfolio optimization methods and it's being extended actively.

Disclaimer: I am the author of the library, and it would knock my socks off if you used it ;).