Project overview

The QuantLib project is at this time in beta status.

The following list is a (possibly outdated) overview of the existing code base.

The QuantLib-users and QuantLib-dev mailing lists are the preferred forum for proposals, suggestions and contributions regarding the future development of the library.

Date, calendars, and day count conventions

  • Date class.
  • Weekday, month, frequency, time unit enumerations.
  • Period class (eg. 1y, 30d, 2m, etc.)
  • IMM calculation.
  • More than 30 business calendars.
  • NullCalendar (no holidays) for theoretical calculations.
  • Joint calendars made up as holiday union or intersection of base calendars.
  • Rolling conventions: Preceding, ModifiedPreceding, Following, ModifiedFollowing, MonthEndReference.
  • Schedule class for date stream generation.
  • Day count conventions: Actual360, Actual365Fixed, ActualActual (Bond, ISDA, AFB), 30/360 (US, European, Italian), 1/1.

Math

  • Linear, log-linear, and cubic spline interpolation.
  • Primitive, first and second derivative functions of cubic and linear interpolators.
  • Cubic spline end conditions: first derivative value, second derivative value, not-a-knot.
  • Monotone cubic spline with Hyman non-restrictive filter.
  • Bicubic spline and bilinear interpolations.
  • N-dimensional cubic spline interpolation.
  • Normal and cumulative normal distributions.
  • Inverse cumulative normal distribution: Moro and Acklam approximations.
  • Bivariate cumulative normal distribution.
  • Binomial coefficients, binomial distribution, cumulative binomial distribution, and Peizer-Pratt inversion (method 2.)
  • Chi square and non-central chi square distributions.
  • Beta functions.
  • Poisson and cumulative Poisson distributions.
  • Incomplete gamma functions.
  • Gamma distribution.
  • Factorials.
  • Integration algorithms: segment, trapezoid, mid-point trapezoid, Simpson, Gauss-Kronrod.
  • Error function.
  • General 1-D statistics: mean, variance, standard deviation, skewness, kurtosis, error estimation, min, max.
  • Multi-dimensional (sequence) statistics: all the 1-D methods plus covariance, correlation, L2-discrepancy calculation, etc.
  • Risk measures for Gaussian and empirical distributions: semi-variance, regret, percentile, top percentile, value-at-risk, upside potential, shorfall, average shorfall, expected shortfall.
  • Array and matrix classes for algebra.
  • Singular value decomposition.
  • Eigenvalues, eigenvectors for symmetric matrices.
  • Cholesky decomposition.
  • Schur decomposition.
  • Spectral rank-reduced square root, spectral pseudo-square root.

1-dimensional solvers

  • Bisection, false position, Newton, bounded Newton, Ridder, secant, Brent.

Optimization

  • Conjugate gradient, simplex, steepest descent, line search, Armijo line search, least squares.
  • Constrained (positive, boundary, etc.) and unconstrained optimization

Random-number generation

  • Uniform pseudo-random sequences: Knuth, L'Ecuyer, Mersenne twister.
  • Uniform quasi-random (low-discrepancy) sequences: Halton, Faure, Sobol up to dimension 21,200 (8,129,334 if you really want) with unit, Jäckel, Bradley-Fox, and Lemieux-Cieslak-Luttmer initialization numbers.
  • Randomized quasi-random sequences (in progress)
  • Randomized (shifted) low-discrepancy sequences.
  • Primitive polynomials modulo 2 up to dimension 18 (available up to dimension 27)
  • Gaussian random numbers from uniform random numbers using different algorithms: central limit theorem, Box-Muller, inverse cumulative (Moro and Acklam algorithms)

Patterns

  • Bridge, composite, lazy object, observer/observable, singleton, strategy, visitor.

Finite differences

  • Mixed theta, implicit, explicit, and Crank-Nicolson 1-dimensional schemes.
  • Differential operators: $ D_{0} $, $ D_{+} $, $ D_{-} $, $ D_{+}D_{-} $.
  • Shout, Bermudan and American exercises.

Lattices

  • Binomial trees: Cox-Ross-Rubinstein, Jarrow-Rudd, additive equiprobabilities, Trigeorgis, Tian, Leisen-Reimer.
  • Trinomial (interest-rate) tree.
  • Discretized asset.
  • Richardson extrapolation

Monte Carlo

  • One-factor and multi-factor path classes.
  • Path-generator classes: incremental and Brownian-bridge one-factor path generation, incremental multi-factor path generation.
  • General-purpose Monte Carlo model based on traits for path samples.
  • Antithetic variance-reduction technique.
  • Control variate technique.

Pricing engines

  • Analytic Black formula (plus greeks) for different payoffs.
  • Analytic formula for American-style digital options with payoff at expiry.
  • Analytic formula for American-style digital options with payoff at hit.
  • Monte Carlo simulation base engine.
  • Lattice short rate model base engine.
  • Engines for options described by "vanilla" set of parameters: analytic digital American, analytic discrete-dividend European, analytic European, Barone-Adesi and Whaley approximation for American, Ju approximation for American, binomial (Cox-Ross-Rubinstein, Jarrow-Rudd, additive equiprobabilities, Trigeorgis, Tian, Leisen-Reimer), Bjerksund and Stensland approximation for American, integral European, Merton 76 jump-diffusion, Monte Carlo digital, Monte Carlo European, Bates and Heston models, finite-difference European, Bermudan and American.
  • Engines for options described by "barrier" set of parameters: analytic down/up in/out, Monte Carlo down/up in/out
  • Engines for Asian options: analytic discrete geometric average-price, analytic continuous geometric average-price, Monte Carlo discrete arithmetic average-price, Monte Carlo discrete geometric average-price.
  • Engines for options described by "cliquet" set of parameters: analytic, analytic performance.
  • Forward and forward-performance compound engines.
  • Quanto compound engine.
  • Quanto-forward and Quanto-forward-performance compound engines.
  • Basket engine: analytic Stulz engine for max/min on two assets, Monte Carlo engine (in progress).
  • Black model base class for vanilla interest rate derivatives
  • Cap/floor pricing engines: analytic Black model, analytic affine models, tree based engine.
  • Swaption pricing engines: analytic Black model, analytic affine models (Jamshidian), tree based engine.

Pricers

  • Cliquet option
  • Analytic discrete geometric average-price option (European exercise).
  • Analytic discrete geometric average-strike option (European exercise).
  • Monte Carlo cliquet option.
  • Monte Carlo discrete arithmetic average-price option.
  • Monte Carlo discrete arithmetic average-strike option.
  • Monte Carlo Everest option.
  • Monte Carlo Himalaya option.
  • Monte Carlo max basket option.
  • Monte Carlo pagoda option.
  • Monte Carlo forward performance option.

Financial Instruments

  • Instrument base class: npv(), isExpired(), etc.
  • Interest-rate swap.
  • Swaption.
  • Cap/floor.
  • Zero-coupon, fixed-rate coupon, and floating-rate coupon bond.
  • Convertible bond.
  • Stock.
  • One-asset option base class.
  • Asian option.
  • Barrier option.
  • Cliquet option.
  • Forward vanilla option.
  • Quanto vanilla option.
  • Quanto-forward vanilla option.
  • Vanilla option.
  • Multi-asset option base class.
  • Basket option.
  • More...

Yield term structures

  • Term structure common interface.
  • Term structure classes based on discount, zero, or forward underlying description.
  • Term structure based on linear interpolation of zero yields.
  • Term structure based on log-linear interpolation of discounts.
  • Term structure based on constant flat forward.
  • Term structure based on piecewise-constant flat forwards with libor-futures-swap bootstrapping algorithm.
  • Spreaded term structures.
  • Forward-date implied term structure.

Volatility

  • Interface for cap/floor Black volatility term structures (unstable).
  • Interface for swaption Black volatility term structures (unstable).
  • Interface for equity Black volatility term structures based on volatility or variance underlying description: constant, time-dependant curve, time-strike surface, forward date implied term structure.
  • Interface for equity local volatility term structures: constant, time-dependant curve, time-asset level surface (Gatheral's formula).

Short rate models

  • Single factor models: Hull-White, Black-Karasinski, Vasichek (untested), CIR (untested), Extended CIR (untested).
  • Two factor models: G2 (untested).

Test suite

Implemented by means of the Boost unit-test framework. More than 300 automated tests. A semi-automatically-generated list is available here.

Miscellanea

  • Index classes for handling of fixed-income libor indexes (fixings, forecasting, etc.)
  • Cash-flow class.
  • Currency class and enumeration.
  • Money class with automatic exchange-rate capabilities.
  • Output data formatters: long integers, Ordinal numerals, power of two, exponential, fixed digit, sequences, dates, etc.
  • Input data parsers.
  • Error classes and error handling.
  • Exercise classes: European, Bermudan, American
  • Payoff classes: plain, gap, asset-or-nothing, cash-or-nothing
  • Grid classes for handling of equally and unequally spaced grids.
  • History class for handling of historical data.
  • Quote class for mutable data.
  • Null types.
  • User-configurable flag to disable usage of deprecated classes.

Documentation

  • Documentation automatically generated with Doxygen