quantfinlib

A Java library for quantitative finance research and risk, using only the JDK at runtime, with a reference low-latency trading lane.

Version 4.0.0 · Java 25 · MIT licence · Source on GitHub

What it covers

AreaPackagesExamples
Pricingpricing, fxBlack-Scholes-Merton, Black-76, Bachelier, implied volatility, Heston (COS, calibration), SABR, SVI and SSVI, Dupire local volatility, barriers, touches, Asian, quanto, vanna-volga, FX volatility surface
Rates and creditrates, creditMulti-curve OIS bootstrap with DV01, street-convention bonds, swaps, swaptions, caps, day counts, ISDA CDS model with holiday calendars and the swap-only ISDA rate curve, single- and multi-currency exposure simulation with foreign-currency swaps and a stochastic basis, CVA, bilateral and wrong-way CVA, Z-spread
Market riskrisk, volatility, crbVaR and Acerbi-Tasche ES, filtered historical simulation, EVT, stress tests, VaR backtests, FRTB-style ES, FRTB standardised approach, SA-CCR with haircuts, factor risk model, GARCH by maximum likelihood, central risk book
Portfolio and researchoptimization, alpha, backtestActive-set QP optimiser, risk parity, Black-Litterman, factor IC with Newey-West errors, alpha combination and attribution, capacity curves, next-open backtests, corporate events, walk-forward, deflated Sharpe
Executionmicrostructure, executionAlmgren-Chriss, impact and queue models, VWAP/TWAP/POV/IS algorithms, smart order routing
Trading lane (reference)marketdata, trading, orderbook, fix, sbe, feedRing buffers, risk gate with kill switch, order state machine with cancel/replace, matching engine, call auctions, position ledger fed from gateway fills with busts and corrections, versioned limits, FIX 4.2/4.4/5.0 SP2 sessions and hot-path encoder with journal, schedules and repeating groups, SBE schema 2, ITCH 5.0
Controls and reporting (reference)entitlements, regreportingDeny-overrides entitlements with an audit log and a pre-trade check, MiFIR RTS 22 transaction reports with auth.016 output and ESMA rules, GLEIF, FIRDS and ISO 10383 lookups, CAT and EMIR Refit reports (not certified)

Install

From JitPack:

<repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
</repository>

<!-- stable tier only -->
<dependency>
  <groupId>com.github.AshJha0.Quant-Finance-Library</groupId>
  <artifactId>quant-finance-library</artifactId>
  <version>v4.0.0</version>
</dependency>

<!-- or the trading lane, which brings the stable tier with it -->
<dependency>
  <groupId>com.github.AshJha0.Quant-Finance-Library</groupId>
  <artifactId>quant-finance-library-lowlatency</artifactId>
  <version>v4.0.0</version>
</dependency>

<!-- optional: CSV and HTTP loaders (quant-finance-library-io), or the incubating
     strategy DSL (quant-finance-library-research); same groupId and version -->

Or build from source with a JDK 25:

git clone https://github.com/AshJha0/Quant-Finance-Library.git
cd Quant-Finance-Library
./mvnw verify

Documentation

Not implemented