Options
All
  • Public
  • Public/Protected
  • All
Menu

quantlib.js

quantlib.js

npm version License Twitter Follow

Donate

The free libraray quantlib.js, notebook app, API Docs and Test Suite would be impossible without author's hardwork, please fund quantlib.js to make it better! Thank you!

Alipay Wechat

quantitative finance in javascript

  1. introduction
  2. get started
  3. how to use
  4. release note
  5. api document
  6. test suite & example
  7. license
  8. credit
  9. resource
  10. test report

introduction

quantlib.js aims to be a COMPLETE re-implementation of C++ QuantLib in javascript language, emscripten is NOT used. it can be used in web browser or node.js environment.

get started

Old home page and get started section moved to https://quantlib.js.org/test-suite/

We build a notebook app for easy use of quantlib.js, it's hosted on Github pages, after loading, it works offline.

https://quantlib.js.org/notebook/

Tutorial: https://quantlib.js.org/notebook/#tutorial.json

usage

load from CDN

install from npm

npm i @quantlib/ql

use in web page

ql.mjs is ESM format, when using in html script tag, make sure to have script type set to "module"

<script type="module">

import { Actual360, AnalyticEuropeanEngine, BlackConstantVol, BlackScholesProcess, DateExt, EuropeanExercise, EuropeanOption, FlatForward, Handle, Option, PlainVanillaPayoff, Settings, SimpleQuote, TARGET } from 'https://cdn.jsdelivr.net/npm/@quantlib/ql@latest/ql.mjs';

const today = DateExt.UTC('7,March,2014');
Settings.evaluationDate.set(today);

const payoff = new PlainVanillaPayoff(Option.Type.Call, 100.0);
const exercise = new EuropeanExercise(DateExt.UTC('7,June,2014'));
const option = new EuropeanOption(payoff, exercise);

const u = new SimpleQuote(100.0);
const r = new SimpleQuote(0.01);
const s = new SimpleQuote(0.2);

const riskFreeCurve = new FlatForward().ffInit3(0, new TARGET(), new Handle(r), new Actual360());
const volatility = new BlackConstantVol().bcvInit4(0, new TARGET(), new Handle(s), new Actual360());

const process = new BlackScholesProcess(new Handle(u), new Handle(riskFreeCurve), new Handle(volatility));

const engine = new AnalyticEuropeanEngine().init1(process);
option.setPricingEngine(engine);

const npv = option.NPV();
console.log(`NPV = ${npv}`);  // 4.155543462156206

</script>

what about UMD format/style javascript?

You may use javascript dynamic import

<script>

import('https://cdn.jsdelivr.net/npm/@quantlib/ql@latest/ql.mjs').then(module=>{
  window.ql = module;
  test();
});

function test() {
  const today = ql.DateExt.UTC('7,March,2014');
  ql.Settings.evaluationDate.set(today);

  const payoff = new ql.PlainVanillaPayoff(ql.Option.Type.Call, 100.0);
  const exercise = new ql.EuropeanExercise(ql.DateExt.UTC('7,June,2014'));
  const option = new ql.EuropeanOption(payoff, exercise);

  const u = new ql.SimpleQuote(100.0);
  const r = new ql.SimpleQuote(0.01);
  const s = new ql.SimpleQuote(0.2);

  const riskFreeCurve = new ql.FlatForward().ffInit3(0, new ql.TARGET(), new ql.Handle(r), new ql.Actual360());
  const volatility = new ql.BlackConstantVol().bcvInit4(0, new ql.TARGET(), new ql.Handle(s), new ql.Actual360());

  const process = new ql.BlackScholesProcess(new ql.Handle(u), new ql.Handle(riskFreeCurve), new ql.Handle(volatility));

  const engine = new ql.AnalyticEuropeanEngine().init1(process);
  option.setPricingEngine(engine);

  const npv = option.NPV();
  console.log(`NPV = ${npv}`);  // 4.155543462156206
}

</script>

use in node.js

quantlib.js works in node.js environment. after installing with npm, pass --experimental-modules to node to use ESM javascript file

node --experimental-modules test.mjs

in test.mjs

import { Actual360, AnalyticEuropeanEngine, BlackConstantVol, BlackScholesProcess, DateExt, EuropeanExercise, EuropeanOption, FlatForward, Handle, Option, PlainVanillaPayoff, Settings, SimpleQuote, TARGET } from '@quantlib/ql';

const today = DateExt.UTC('7,March,2014');
Settings.evaluationDate.set(today);

const payoff = new PlainVanillaPayoff(Option.Type.Call, 100.0);
const exercise = new EuropeanExercise(DateExt.UTC('7,June,2014'));
const option = new EuropeanOption(payoff, exercise);

const u = new SimpleQuote(100.0);
const r = new SimpleQuote(0.01);
const s = new SimpleQuote(0.2);

const riskFreeCurve = new FlatForward().ffInit3(0, new TARGET(), new Handle(r), new Actual360());
const volatility = new BlackConstantVol().bcvInit4(0, new TARGET(), new Handle(s), new Actual360());

const process = new BlackScholesProcess(new Handle(u), new Handle(riskFreeCurve), new Handle(volatility));

const engine = new AnalyticEuropeanEngine().init1(process);
option.setPricingEngine(engine);

const npv = option.NPV();
console.log(`NPV = ${npv}`);  // 4.155543462156206

typescript

ql.d.ts is published along with ql.mjs

write code in typescript, then compile with tsc or run with ts-node

in test.ts

import {Actual360, AnalyticEuropeanEngine, BlackConstantVol, BlackScholesProcess, BlackVolTermStructure, DateExt, EuropeanExercise, EuropeanOption, Exercise, FlatForward, GeneralizedBlackScholesProcess, Handle, Option, PlainVanillaPayoff, PricingEngine, Quote, Real, Settings, SimpleQuote, StrikedTypePayoff, TARGET, YieldTermStructure} from '@quantlib/ql';

const today: Date = DateExt.UTC('7,March,2014');
Settings.evaluationDate.set(today);

const payoff: StrikedTypePayoff =
    new PlainVanillaPayoff(Option.Type.Call, 100.0);
const exercise: Exercise = new EuropeanExercise(DateExt.UTC('7,June,2014'));
const option: EuropeanOption = new EuropeanOption(payoff, exercise);

const u: Quote = new SimpleQuote(100.0);
const r: Quote = new SimpleQuote(0.01);
const s: Quote = new SimpleQuote(0.2);

const riskFreeCurve: YieldTermStructure =
    new FlatForward().ffInit3(0, new TARGET(), new Handle(r), new Actual360());
const volatility: BlackVolTermStructure = new BlackConstantVol().bcvInit4(
    0, new TARGET(), new Handle(s), new Actual360());

const process: GeneralizedBlackScholesProcess = new BlackScholesProcess(
    new Handle(u), new Handle(riskFreeCurve), new Handle(volatility));

const engine: PricingEngine = new AnalyticEuropeanEngine().init1(process);
option.setPricingEngine(engine);

const npv: Real = option.NPV();
console.log(`NPV = ${npv}`); // 4.155543462156206

release note

version notes
0.3.6 TBD
0.3.5 minor fix for notebook
0.3.4 no fix, renamed many symbol names for notebook app
0.3.3 fixed most asianoption specs
0.3.2 fixed swaption, most of short-rate models specs and some other pricing specs, and part of bermudanswaption example
0.3.1 examples code cleanup, fixed 4 examples, global optimizers example DE tests passed
0.3.0 fixed 40+ pricing specs, started working on model tests
0.2.7 fixed default probability curves specs
0.2.6 fixed most european option test, tree engine cleanup
0.2.5 fixed piecewise zero spreaded term structure, brownian bridge, 4 american options specs, FD engine cleanup
0.2.4 fixed risk statistics, brownian bridge some piecewise yield curve specs
0.2.3 fixed termstructure spec, experimental Gaussian quadratures specs
0.2.2 termstructure constructor cleanup, fixed a few simple ts specs
0.2.1 add halley, halleysafe, inverseIncompleteGammaFunction from QuantLib-noBoost, fixed blackdeltacalculator
0.2.0 started working on instrument pricing specs, fixed some old test that passed before
0.1.x most math specs passed
0.0.x date&time, patterns, currency, misc specs passed

docs

test-suite & example

source code in ESM javascript:

converted from the c++ quantlib test-suite & Examples

these are the code loaded and executed in https://quantlib.js.org/test-suite/

license


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

credit

resource

test report

v0.3.3 specs + examples status report total: 735, passed: 452, failed: 176, pending: 107

LazyObject tests

  • Testing that lazy objects discard notifications after the first...
  • Testing that lazy objects forward all notifications when told...

Observer tests

  • Testing observable settings...

Black delta calculator tests

  • Testing delta calculator values...
  • Testing premium-adjusted delta price consistency...
  • Testing put-call parity for deltas...
  • Testing delta-neutral ATM quotations...

Exchange-rate tests

  • Testing direct exchange rates...
  • Testing derived exchange rates...
  • Testing lookup of direct exchange rates...
  • Testing lookup of triangulated exchange rates...
  • Testing lookup of derived exchange rates...

Money tests

  • Testing money arithmetic without conversions...
  • Testing money arithmetic with conversion to base currency...
  • Testing money arithmetic with automated conversion...

Rounding tests

  • Testing closest decimal rounding...
  • Testing upward decimal rounding...
  • Testing downward decimal rounding...
  • Testing floor decimal rounding...
  • Testing ceiling decimal rounding...

Business day convention tests

  • Testing business day conventions...

Calendar tests

  • Testing calendar modification...
  • Testing joint calendars...
  • Testing US settlement holiday list...
  • Testing US government bond market holiday list...
  • Testing New York Stock Exchange holiday list...
  • Testing TARGET holiday list...
  • Testing Frankfurt Stock Exchange holiday list...
  • Testing Eurex holiday list...
  • Testing Xetra holiday list...
  • Testing UK settlement holiday list...
  • Testing London Stock Exchange holiday list...
  • Testing London Metals Exchange holiday list...
  • Testing Milan Stock Exchange holiday list...
  • Testing Russia holiday list...
  • Testing Brazil holiday list...
  • Testing South-Korean settlement holiday list...
  • Testing Korea Stock Exchange holiday list...
  • Testing China Shanghai Stock Exchange holiday list...
  • Testing China Inter Bank working weekends list...
  • Testing end-of-month calculation...
  • Testing calculation of business days between dates...
  • Testing bespoke calendars...

Date tests

  • Testing ECB dates...
  • Testing IMM dates...
  • Testing ASX dates...
  • Testing dates...
  • Testing ISO dates...
  • Testing parsing of dates...
  • Testing intraday information of dates...

Day counter tests

  • Testing actual/actual day counters...
  • Testing actual/actual day counter with schedule...
  • Testing simple day counter...
  • Testing 1/1 day counter...
  • Testing business/252 day counter...
  • Testing thirty/360 day counter (Bond Basis)...
  • Testing thirty/360 day counter (Eurobond Basis)...
  • Testing intraday behavior of day counter ...

Period tests

  • Testing period algebra on years/months...
  • Testing period algebra on weeks/days...
  • Testing period parsing...

Schedule tests

  • Testing schedule with daily frequency...
  • Testing end date for schedule with end-of-month adjustment...
  • Testing that no dates are past the end date with EOM adjustment...
  • Testing that next-to-last date same as end date is removed...
  • Testing that the last date is not adjusted for EOM when termination date convention is unadjusted...
  • Testing that the first date is not duplicated due to EOM convention when going backwards...
  • Testing CDS2015 semi-annual rolling convention...
  • Testing the constructor taking a vector of dates and possibly additional meta information...
  • Testing that a four-weeks tenor works...

Timegrid tests

  • Testing TimeGrid constructor with additional steps...
  • Testing TimeGrid constructor with only mandatory points...
  • Testing TimeGrid construction with n evenly spaced points...
  • Testing if the constructor raises an error for empty iterators...
  • Testing if the constructor raises an error for negative time values...
  • Testing returned index is closest to the requested time...
  • Testing returned time matches to the requested index...
  • Testing mandatory times are recalled correctly...

Time series tests

  • Testing time series construction...
  • Testing time series interval price...
  • Testing time series iterators...

Gaussian quadraturesGaussian quadratures tests

  • Testing Gauss-Jacobi integration...
  • Testing Gauss-Laguerre integration...
  • Testing Gauss-Hermite integration...
  • Testing Gauss hyperbolic integration...
  • Testing tabulated Gauss-Laguerre integration...

Gaussian quadratures experimental tests

  • Testing Gauss non-central chi-squared integration...
  • Testing Gauss non-central chi-squared sum of notes...

Integration tests

  • Testing segment integration...
  • Testing trapezoid integration...
  • Testing mid-point trapezoid integration...
  • Testing Simpson integration...
  • Testing adaptive Gauss-Kronrod integration...
  • Testing adaptive Gauss-Lobatto integration...
  • Testing non-adaptive Gauss-Kronrod integration...
  • Testing two dimensional adaptive Gauss-Lobatto integration...
  • Testing Folin's integral formulae...
  • Testing discrete integral formulae...
  • Testing discrete integrator formulae...
  • Testing piecewise integral...

Numerical differentiation tests

  • Testing numerical differentiation using the central scheme...
  • Testing numerical differentiation using the backward scheme...
  • Testing numerical differentiation using the Forward scheme...
  • Testing numerical differentiation of first order using an irregular scheme...
  • Testing numerical differentiation of second order using an irregular scheme...
  • Testing numerical differentiation of sin function...
  • Testing coefficients from numerical differentiation by comparison with results from Vandermonde matrix inversion...

ODE tests

  • Testing adaptive Runge Kutta...
  • Testing matrix exponential based on ode...
  • Testing matrix exponential of a zero matrix based on ode...

1-D solver tests

  • Testing Brent solver...
  • Testing bisection solver...
  • Testing false-position solver...
  • Testing Newton solver...
  • Testing Newton-safe solver...
  • Testing Halley solver...
  • Testing Halley-safe solver...
  • Testing finite-difference Newton-safe solver...
  • Testing Ridder solver...
  • Testing secant solver...

Array tests

  • Testing array construction...
  • Testing array functions...

Covariance and correlation tests

  • Testing matrix rank reduction salvaging algorithms...
  • Testing positive semi-definiteness salvaging algorithms...
  • Testing covariance and correlation calculations...

Matrix tests

  • Testing eigenvalues and eigenvectors calculation...
  • Testing matricial square root...
  • Testing Higham matricial square root...
  • Testing singular value decomposition...
  • Testing QR decomposition...
  • Testing QR solve...
  • Testing LU inverse calculation...
  • Testing LU determinant calculation...
  • Testing orthogonal projections...
  • Testing Cholesky Decomposition...
  • Testing Moore-Penrose inverse...
  • Testing iterative solvers...

TQR eigen decomposition tests

  • Testing TQR eigenvalue decomposition...
  • Testing TQR zero-off-diagonal eigenvalues...
  • Testing TQR eigenvector decomposition...

Auto-covariance tests

  • Testing convolutions...
  • Testing auto-covariances...
  • Testing auto-correlations...

Distribution tests

  • Testing normal distributions...
  • Testing bivariate cumulative normal distribution...
  • Testing Poisson distribution...
  • Testing cumulative Poisson distribution...
  • Testing inverse cumulative Poisson distribution...
  • Testing bivariate cumulative Student t distribution...
  • Testing bivariate cumulative Student t distribution for large N...
  • Testing inverse CDF based on stochastic collocation...

Linear least squares regression tests

  • Testing linear least-squares regression...
  • Testing multi-dimensional linear least-squares regression...
  • Testing 1D simple linear least-squares regression...

Optimizers tests

  • Testing optimizers...
  • Testing nested optimizations...
  • Testing differential evolution...

Risk statistics tests

  • Testing risk measures...

Statistics tests

  • Testing statistics...
  • Testing sequence statistics...
  • Testing convergence statistics...
  • Testing incremental statistics...

Low-discrepancy sequence tests

  • Testing random-seed generator...
  • Testing 21200 primitive polynomials modulo two...
  • Testing randomized low-discrepancy sequences up to dimension 21200...
  • Testing randomized lattice sequences...
  • Testing Sobol sequences up to dimension 21200...
  • Testing Faure sequences...
  • Testing Halton sequences...
  • Testing Mersenne-twister discrepancy...
  • Testing plain Halton discrepancy...
  • Testing random-start Halton discrepancy...
  • Testing random-shift Halton discrepancy...
  • Testing random-start, random-shift Halton discrepancy...
  • Testing Jaeckel-Sobol discrepancy...
  • Testing Levitan-Sobol discrepancy...
  • Testing Levitan-Lemieux-Sobol discrepancy...
  • Testing unit Sobol discrepancy...
  • Testing Sobol sequence skipping...

RNG traits tests

  • Testing Gaussian pseudo-random number generation...
  • Testing Poisson pseudo-random number generation...
  • Testing custom Poisson pseudo-random number generation...

Mersenne twister tests

  • Testing Mersenne twister...

Fast fourier transform tests

  • Testing complex direct FFT...
  • Testing convolution via inverse FFT...

Factorial tests

  • Testing factorial numbers...
  • Testing Gamma function...
  • Testing Gamma values...
  • Testing modified Bessel function of first and second kind...
  • Testing weighted modified Bessel functions...

Interpolation tests

  • Testing spline approximation on Gaussian data sets...
  • Testing spline interpolation on a Gaussian data set...
  • Testing spline interpolation on RPN15A data set...
  • Testing spline interpolation on generic values...
  • Testing symmetry of spline interpolation end-conditions ...
  • Testing derivative end-conditions for spline interpolation ...
  • Testing non-restrictive Hyman filter...
  • Testing N-dimensional cubic spline...
  • Testing use of interpolations as functors...
  • Testing Fritsch-Butland interpolation...
  • Testing backward-flat interpolation...
  • Testing forward-flat interpolation...
  • Testing Sabr interpolation...
  • Testing kernel 1D interpolation...
  • Testing kernel 2D interpolation...
  • Testing bicubic spline derivatives...
  • Testing that bicubic splines actually update...
  • Testing Richardson extrapolation...
  • Testing no-arbitrage Sabr interpolation...
  • Testing Sabr calibration single cases...
  • Testing Sabr and no-arbitrage Sabr transformation functions...
  • Testing Lagrange interpolation...
  • Testing Lagrange interpolation at supporting points...
  • Testing Lagrange interpolation derivatives...
  • Testing Lagrange interpolation on Chebyshev points...
  • Testing B-Splines...
  • Testing piecewise constant interpolation on a single point...

Sampled curve tests

  • Testing sampled curve construction...

Transformed grid

  • Testing transformed grid construction...

Cash flows tests

  • Testing cash-flow settings...
  • Testing dynamic cast of coupon in Black pricer...
  • Testing default evaluation date in cashflows methods...
  • Testing ibor leg construction with null fixing days...
  • Testing irregular first coupon reference dates with end of month enabled...
  • Testing irregular last coupon reference dates with end of month enabled...
  • Testing leg construction with partial schedule...

Capped and floored coupon tests

  • Testing degenerate collared coupon...
  • Testing collared coupon against its decomposition...

Digital coupon tests

  • Testing European asset-or-nothing digital coupon...
  • Testing European deep in-the-money asset-or-nothing digital coupon...
  • Testing European deep out-the-money asset-or-nothing digital coupon...
  • Testing European cash-or-nothing digital coupon...
  • Testing European deep in-the-money cash-or-nothing digital coupon...
  • Testing European deep out-the-money cash-or-nothing digital coupon...
  • Testing call/put parity for European digital coupon...
  • Testing replication type for European digital coupon...

YoY inflation capped and floored coupon tests

  • Testing collared coupon against its decomposition...
  • Testing inflation capped/floored coupon against inflation capfloor instrument...

Interest Rate tests

  • Testing interest-rate conversions...

Range Accrual tests

  • Testing infinite range accrual floaters...
  • Testing price monotonicity with respect to the lower strike...
  • Testing price monotonicity with respect to the upper strike...

Hybrid Heston-HullWhite tests

  • Testing European option pricing for a BSM process with one-factor Hull-White model...
  • Comparing European option pricing for a BSM process with one-factor Hull-White model...
  • Testing Monte-Carlo zero bond pricing...
  • Testing Monte-Carlo vanilla option pricing...
  • Testing Monte-Carlo Heston option pricing...
  • Testing analytic Heston Hull-White option pricing...

Brownian bridge tests

  • Testing Brownian-bridge variates...
  • Testing Brownian-bridge path generation...

Path generation tests

  • Testing 1-D path generation against cached values...
  • Testing n-D path generation against cached values...

Longstaff Schwartz MC engine tests

  • Testing Monte-Carlo pricing of American options...
  • Testing Monte-Carlo pricing of American max options...

Curve States tests

  • Testing constant-maturity-swap-market-model curve state...

Finite Difference Heston tests

  • Testing FDM Heston variance mesher ...
  • Testing FDM Heston variance mesher ...
  • Testing FDM with barrier option for Heston model vs Black-Scholes model...
  • Testing FDM with American option in Heston model...
  • Testing FDM Heston for Ikonen and Toivanen tests...
  • Testing FDM Heston with Black Scholes model...
  • Testing FDM with European option with dividends in Heston model...
  • Testing FDM Heston convergence...
  • Testing FDM Heston intraday pricing ...
  • Testing method of lines to solve Heston PDEs...
  • Testing for spurious oscillations when solving the Heston PDEs...

Linear operator tests

  • Testing indexing of a linear operator...
  • Testing uniform grid mesher...
  • Testing application of first-derivatives map...
  • Testing application of second-derivatives map...
  • Testing finite differences coefficients...
  • Testing application of second-order mixed-derivatives map...
  • Testing triple-band map solution...
  • Testing FDM with barrier option in Heston model...
  • Testing FDM with American option in Heston model...
  • Testing FDM with express certificate in Heston model...
  • Testing FDM with Heston Hull-White model...
  • Testing bi-conjugated gradient stabilized algorithm...
  • Testing GMRES algorithm...
  • Testing Crank-Nicolson with initial implicit damping steps for a digital option...
  • Testing SparseMatrixReference type...
  • Testing assignment to zero in sparse matrix...
  • Testing integrals over meshers functions...
  • Testing Black-Scholes mesher in a high interest rate scenario...
  • Testing Black-Scholes mesher in a low volatility and high discrete dividend scenario...

Operator tests

  • Testing tridiagonal operator...
  • Testing differential operators...
  • Testing consistency of BSM operators...

European option extended trees tests

  • Testing time-dependent JR binomial European engines against analytic results...
  • Testing time-dependent CRR binomial European engines against analytic results...
  • Testing time-dependent EQP binomial European engines against analytic results...
  • Testing time-dependent TGEO binomial European engines against analytic results...
  • Testing time-dependent TIAN binomial European engines against analytic results...
  • Testing time-dependent LR binomial European engines against analytic results...
  • Testing time-dependent Joshi binomial European engines against analytic results...

Black formula tests

  • Testing Bachelier implied vol...
  • Testing Chambers-Nawalkha implied vol approximation...
  • Testing Radoicic-Stefanica implied vol approximation...
  • Testing Radoicic-Stefanica lower bound...
  • Testing implied volatility calculation via adaptive successive over-relaxation...

Amortizing Bond tests

  • Testing amortizing fixed rate bond...

Bond tests

  • Testing consistency of bond price/yield calculation...
  • Testing consistency of bond price/ATM rate calculation...
  • Testing consistency of bond price/z-spread calculation...
  • Testing theoretical bond price/yield calculation...
  • Testing bond price/yield calculation against cached values...
  • Testing zero-coupon bond prices against cached values...
  • Testing fixed-coupon bond prices against cached values...
  • Testing floating-rate bond prices against cached values...
  • Testing Brazilian public bond prices against Andima cached values...
  • Testing ex-coupon UK Gilt price against market values...
  • Testing ex-coupon Australian bond price against market values...
  • Testing South African R2048 bond price using Schedule constructor with Date vector...
  • Testing Thirty/360 bond with settlement on 31st of the month...

CatBond tests

  • Testing that catastrophe events are split correctly for periods of whole years...
  • Testing that catastrophe events are split correctly for irregular periods...
  • Testing that catastrophe events are split correctly when there are no simulated events...
  • Testing that beta risk gives correct terminal distribution...
  • Testing floating-rate cat bond against risk-free floating-rate bond...
  • Testing floating-rate cat bond in a doom scenario (certain default)...
  • Testing floating-rate cat bond in a doom once in 10 years scenario...
  • Testing floating-rate cat bond in a doom once in 10 years scenario with proportional notional reduction...
  • Testing floating-rate cat bond in a generated scenario with proportional notional reduction...

Convertible bond tests

  • Testing out-of-the-money convertible bonds against vanilla bonds...
  • Testing zero-coupon convertible bonds against vanilla option...
  • Testing fixed-coupon convertible bond in known regression case...

Cap and floor tests

  • Testing cap/floor vega...
  • Testing cap/floor dependency on strike...
  • Testing consistency between cap, floor and collar...
  • Testing cap/floor parity...
  • Testing cap/floor ATM rate...
  • Testing implied term volatility for cap and floor...
  • Testing Black cap/floor price against cached values...

Inflation (year-on-year) Cap and floor tests

  • Testing consistency between yoy inflation cap, floor and collar...
  • Testing yoy inflation cap/floor parity...
  • Testing Black yoy inflation cap/floor price against cached values...

CPI swaption tests

  • Testing cpi capfloor price surface...
  • Testing cpi capfloor pricer...

Forward rate agreement

  • Testing forward rate agreement construction...

Instrument tests

  • Testing observability of instruments...
  • Testing reaction of composite instrument to date changes...

American option tests

  • Testing Barone-Adesi and Whaley approximation for American options...
  • Testing Bjerksund and Stensland approximation for American options...
  • Testing Ju approximation for American options...
  • Testing finite-difference engine for American options...
  • Testing finite-differences American option greeks...
  • Testing finite-differences shout option greeks...

Asian option tests

  • Testing analytic continuous geometric average-price Asians...
  • Testing analytic continuous geometric average-price Asian greeks...
  • Testing analytic discrete geometric average-price Asians...
  • Testing analytic discrete geometric average-strike Asians...
  • Testing Monte Carlo discrete geometric average-price Asians...
  • Testing Monte Carlo discrete arithmetic average-price Asians...
  • Testing Monte Carlo discrete arithmetic average-strike Asians...
  • Testing discrete-averaging geometric Asian greeks...
  • Testing use of past fixings in Asian options...
  • Testing Asian options with all fixing dates in the past...

Asian option experimental tests

  • Testing Levy engine for Asians options...
  • Testing Vecer engine for Asian options...

Barrier option tests

  • Testing that knock-in plus knock-out barrier options replicate a European option...
  • Testing barrier options against Haug's values...
  • Testing barrier options against Babsiri's values...
  • Testing barrier options against Beaglehole's values...
  • Testing local volatility and Heston FD engines for barrier options...
  • Testing barrier option pricing with discrete dividends...

Barrier option experimental tests

  • Testing perturbative engine for barrier options...
  • Testing barrier FX options against Vanna/Volga values...

Basket option tests

  • Testing two-asset European basket options...
  • Testing three-asset basket options against Barraquand's values...
  • Testing three-asset American basket options against Tavella's values...
  • Testing basket American options against 1-D case...
  • Testing antithetic engine using odd sample number...
  • Testing 2D local-volatility spread-option pricing...
  • Testing Greeks of two-dimensional PDE engine...

Cliquet option tests

  • Testing Cliquet option values...
  • Testing Cliquet option greeks...
  • Testing performance option greeks...
  • Testing Monte Carlo performance engine against analytic results...

Dividend European option tests

  • Testing dividend European option values with no dividends...
  • Testing dividend European option values with known value...
  • Testing dividend European option with a dividend on today's date...
  • Testing dividend European option values with end limits...
  • Testing dividend European option greeks...
  • Testing finite-difference dividend European option values...
  • Testing finite-differences dividend European option greeks...
  • Testing finite-differences dividend American option greeks...
  • Testing degenerate finite-differences dividend European option...
  • Testing degenerate finite-differences dividend American option...

European option tests

  • Testing European option values...
  • Testing European option greek values...
  • Testing analytic European option greeks...
  • Testing European option implied volatility...
  • Testing self-containment of implied volatility calculation...
  • Testing JR binomial European engines against analytic results...
  • Testing CRR binomial European engines against analytic results...
  • Testing EQP binomial European engines against analytic results...
  • Testing TGEO binomial European engines against analytic results...
  • Testing TIAN binomial European engines against analytic results...
  • Testing LR binomial European engines against analytic results...
  • Testing Joshi binomial European engines against analytic results...
  • Testing finite-difference European engines against analytic results...
  • Testing integral European engines against analytic results...
  • Testing Monte Carlo European engines against analytic results...
  • Testing Quasi Monte Carlo European engines against analytic results...
  • Testing European price curves...
  • Testing finite-differences with local volatility...
  • Testing separate discount curve for analytic European engine...
  • Testing different PDE schemes to solve Black-Scholes PDEs...
  • Testing finite-difference European engine with non-constant parameters...

European option experimental tests

  • Testing FFT European engines against analytic results...

Forward option tests

  • Testing forward option values...
  • Testing forward performance option values...
  • Testing forward option greeks...
  • Testing forward performance option greeks...
  • Testing forward option greeks initialization...

Quanto option tests

  • Testing quanto option values...
  • Testing quanto option greeks...
  • Testing quanto-forward option values...
  • Testing quanto-forward option greeks...
  • Testing quanto-forward-performance option values...

Experimental quanto option tests

  • Testing quanto-double-barrier option values...

Quote tests

  • Testing observability of quotes...
  • Testing observability of quote handles...
  • Testing derived quotes...
  • Testing composite quotes...
  • Testing forward-value and implied-standard-deviation quotes...

AssetSwap tests

  • Testing consistency between fair price and fair spread...
  • Testing implied bond value against asset-swap fair price with null spread...
  • Testing relationship between market asset swap and par asset swap...
  • Testing clean and dirty price with null Z-spread against theoretical prices...
  • Testing implied generic-bond value against asset-swap fair price with null spread...
  • Testing market asset swap against par asset swap with generic bond...
  • Testing clean and dirty price with null Z-spread against theoretical prices...
  • Testing clean and dirty prices for specialized bond against equivalent generic bond...
  • Testing asset-swap prices and spreads for specialized bond against equivalent generic bond...

Cms tests

  • Testing Hagan-pricer flat-vol equivalence for coupons...
  • Testing Hagan-pricer flat-vol equivalence for swaps...
  • Testing put-call parity for capped-floored CMS coupons...

Cms spread tests

  • Testing fixings of cms spread indices...
  • Testing pricing of cms spread coupons...

Overnight-indexed swap tests

  • Testing Eonia-swap calculation of fair fixed rate...
  • Testing Eonia-swap calculation of fair floating spread...
  • Testing Eonia-swap calculation against cached value...
  • Testing Eonia-swap curve building...
  • Testing Eonia-swap curve building with telescopic value dates...
  • Testing seasoned Eonia-swap calculation...

Swap tests

  • Testing vanilla-swap calculation of fair fixed rate...
  • Testing vanilla-swap calculation of fair floating spread...
  • Testing vanilla-swap dependency on fixed rate...
  • Testing vanilla-swap dependency on floating spread...
  • Testing in-arrears swap calculation...
  • Testing vanilla-swap calculation against cached value...

swap-forward mappings tests

  • Testing forward-rate coinitial-swap Jacobian...
  • Testing forward-rate coterminal-swap mappings...
  • Testing implied swaption vol in LMM using HW approximation...

Bermudan swaption tests

  • Testing Bermudan swaption with HW model against cached values...
  • Testing Bermudan swaption with G2 model against cached values...

Swaption tests

  • Testing swaption dependency on strike...
  • Testing swaption dependency on spread...
  • Testing swaption treatment of spread...
  • Testing swaption value against cached value...
  • Testing swaption vega...
  • Testing cash settled swaptions modified annuity...
  • Testing implied volatility for swaptions...

Swaption Volatility Cube tests

  • Testing swaption volatility cube (atm vols)...
  • Testing swaption volatility cube (smile)...
  • Testing swaption volatility cube (sabr interpolation)...
  • Testing spreaded swaption volatility cube...
  • Testing volatility cube observability...

Swaption Volatility Matrix tests

  • Testing swaption volatility matrix observability...
  • Testing swaption volatility matrix...

Bates model tests

  • Testing analytic Bates engine against Black formula...
  • Testing analytic Bates engine against Merton-76 engine...
  • Testing analytic Bates engine against Monte-Carlo engine...
  • Testing Bates model calibration using DAX volatility data...

GARCH model tests

  • Testing GARCH model calibration...
  • Testing GARCH model calculation...

GJR-GARCH model tests

  • Testing Monte Carlo GJR-GARCH engine against analytic GJR-GARCH engine...
  • Testing GJR-GARCH model calibration using DAX volatility data...

GSR model tests

  • Testing GSR process...
  • Testing GSR model...

Heston model tests

  • Testing Heston model calibration using a flat volatility surface...
  • Testing Heston model calibration using DAX volatility data...
  • Testing analytic Heston engine against Black formula...
  • Testing analytic Heston engine against cached values...
  • Testing Monte Carlo Heston engine against cached values...
  • Testing FD barrier Heston engine against cached values...
  • Testing FD vanilla Heston engine against cached values...
  • Testing MC and FD Heston engines for the Kahl-Jaeckel example...
  • Testing different numerical Heston integration algorithms...
  • Testing multiple-strikes FD Heston engine...
  • Testing analytic piecewise time dependent Heston prices...
  • Testing time-dependent Heston model calibration...
  • Testing Alan Lewis reference prices...
  • Testing expansion on Alan Lewis reference prices...
  • Testing expansion on Forde reference prices...
  • Testing semi-analytic Heston pricing with all integration methods...
  • Testing Heston COS cumulants...
  • Testing Heston pricing via COS method...
  • Testing Heston characteristic function...
  • Testing Andersen-Piterbarg method to price under the Heston model...
  • Testing Andersen-Piterbarg Integrand with control variate...
  • Testing Andersen-Piterbarg pricing convergence...
  • Testing piecewise time dependent ChF vs Heston ChF...
  • Testing piecewise time dependent comparison...
  • Testing piecewise time dependent ChF Asymtotic...

Heston model experimental tests

  • Testing analytic PDF Heston engine...

Heston Stochastic Local Volatility tests

  • Testing Fokker-Planck forward equation for BS process...
  • Testing zero-flow BC for the square root process...
  • Testing zero-flow BC for transformed Fokker-Planck forward equation...
  • Testing Fokker-Planck forward equation for the square root process with stationary density...
  • Testing Fokker-Planck forward equation for the square root log process with stationary density...
  • Testing Fokker-Planck forward equation for the square root process with Dirac start...
  • Testing Fokker-Planck forward equation for the Heston process...
  • Testing Fokker-Planck forward equation for the Heston process Log Transformation with leverage LV limiting case...
  • Testing Fokker-Planck forward equation for BS Local Vol process...
  • Testing local volatility vs SLV model...
  • Testing calibration via vanilla options...
  • Testing Barrier pricing with mixed models...
  • Testing Monte-Carlo vs FDM Pricing for Heston SLV models...
  • Testing Monte-Carlo Calibration...
  • Testing the implied volatility skew of forward starting options in SLV model...
  • Testing double no touch pricing with SLV and mixing...

Jump-diffusion tests

  • Testing Merton 76 jump-diffusion model for European options...

Markov functional model tests

  • Testing Markov functional state process...
  • Testing Kahale smile section...
  • Testing Markov functional calibration to one instrument set...
  • Testing Markov functional vanilla engines...
  • Testing Markov functional calibration to two instrument sets...
  • Testing Markov functional Bermudan swaption engine...

Normal CLV Model tests

  • Testing Black-Scholes cumulative distribution function with constant volatility...
  • Testing Heston cumulative distribution function...
  • Testing illustrative 1D example of normal CLV model...
  • Testing Monte Carlo BS option pricing...
  • Testing double no-touch pricing with normal CLV model...

Short-rate model tests

  • Testing Hull-White calibration against cached values using swaptions with start delay...
  • Testing Hull-White calibration with fixed reversion against cached values...
  • Testing Hull-White calibration against cached values using swaptions without start delay...
  • Testing Hull-White swap pricing against known values...
  • Testing Hull-White futures convexity bias...
  • Testing zero bond pricing for extended CIR model ...

SquareRootCLVModel tests

  • Testing vanilla option pricing with square root kernel process...
  • Testing mapping function of the square root kernel process...
  • Testing forward skew dynamics with square root kernel process...

Market-model tests

  • Testing exact repricing of one-step forwards and optionlets in a lognormal forward rate market model...
  • Testing exact repricing of one-step forwards and optionlets in a normal forward rate market model...
  • Testing exact repricing of inverse floater in forward rate market model...

CMS Market-model tests

  • Testing exact repricing of multi-step constant maturity swaps and swaptions in a lognormal constant maturity swap market model...

SMM Market-model tests

  • Testing exact repricing of multi-step coterminal swaps and swaptions in a lognormal coterminal swap rate market model...

SMM Caplet alpha calibration test

  • Testing alpha caplet calibration in a lognormal coterminal swap market model...

SMM Caplet calibration test

  • Testing GHLS caplet calibration in a lognormal coterminal swap market model...

SMM Caplet homogeneous calibration test

  • Testing max homogeneity caplet calibration in a lognormal coterminal swap market model...
  • Testing max homogeneity periodic caplet calibration in a lognormal coterminal swap market model...
  • Testing sphere-cylinder optimization...

volatility models tests

  • Testing volatility model construction...

Default-probability curve tests

  • Testing default-probability structure...
  • Testing flat hazard rate...
  • Testing piecewise-flat hazard-rate consistency...
  • Testing piecewise-flat default-density consistency...
  • Testing piecewise-linear default-density consistency...
  • Testing log-linear survival-probability consistency...
  • Testing single-instrument curve bootstrap...
  • Testing bootstrap on upfront quotes...

Inflation tests

  • Testing zero inflation indices...
  • Testing zero inflation term structure...
  • Testing that zero inflation indices forecast future fixings...
  • Testing year-on-year inflation indices...
  • Testing year-on-year inflation term structure...
  • Testing inflation period...

CPI bond tests

  • Testing clean price...

CPI Swap tests

  • Testing consistency...
  • Testing zciis consistency...
  • Testing cpi bond consistency...

Term structure tests

  • Testing term structure against evaluation date change...
  • Testing consistency of implied term structure...
  • Testing observability of implied term structure...
  • Testing consistency of forward-spreaded term structure...
  • Testing observability of forward-spreaded term structure...
  • Testing consistency of zero-spreaded term structure...
  • Testing observability of zero-spreaded term structure...
  • Testing that a zero-spreaded curve can be created with a null underlying curve...
  • Testing that an underlying curve can be relinked to a null underlying curve...
  • Testing composite zero yield structures...

Andreasen-Huge volatility interpolation tests

  • Testing Andreasen-Huge example with Put calibration...
  • Testing Andreasen-Huge example with Call calibration...
  • Testing Andreasen-Huge example with instantaneous Call and Put calibration...
  • Testing Andreasen-Huge example with linear interpolation...
  • Testing Andreasen-Huge example with piecewise constant interpolation...
  • Testing Andreasen-Huge volatility interpolation with time dependent interest rates and dividend yield...
  • Testing Andreasen-Huge volatility interpolation with a single option...
  • Testing Andreasen-Huge volatility interpolation gives arbitrage free prices...
  • Testing Barrier option pricing with Andreasen-Huge local volatility surface...
  • Testing Peter's and Fabien's SABR example...
  • Testing different optimizer for Andreasen-Huge volatility interpolation...
  • Testing that reference date of adapter surface moves along with evaluation date...

YoY OptionletStripper (yoy inflation vol) tests

  • Testing conversion from YoY price surface to YoY volatility surface...
  • Testing conversion from YoY cap-floor surface to YoY inflation term structure...

Optionlet Stripper Tests

  • Testing forward/forward vol stripping from flat term vol surface using OptionletStripper1 class...
  • Testing forward/forward vol stripping from non-flat term vol surface using OptionletStripper1 class...
  • Testing forward/forward vol stripping from non-flat normal vol term vol surface for normal vol setup using OptionletStripper1 class...
  • Testing forward/forward vol stripping from non-flat normal vol term vol surface for normal vol setup using OptionletStripper1 class...
  • Testing forward/forward vol stripping from flat term vol surface using OptionletStripper2 class...
  • Testing forward/forward vol stripping from non-flat term vol surface using OptionletStripper2 class...
  • Testing switch strike level and recalibration of level in case of curve relinking...

Piecewise yield curve tests

  • Testing consistency of piecewise-log-cubic discount curve...
  • Testing consistency of piecewise-log-linear discount curve...
  • Testing consistency of piecewise-linear discount curve...
  • Testing consistency of piecewise-log-linear zero-yield curve...
  • Testing consistency of piecewise-linear zero-yield curve...
  • Testing consistency of piecewise-cubic zero-yield curve...
  • Testing consistency of piecewise-linear forward-rate curve...
  • Testing consistency of piecewise-flat forward-rate curve...
  • Testing consistency of piecewise-cubic forward-rate curve...
  • Testing consistency of convex monotone forward-rate curve...
  • Testing consistency of local-bootstrap algorithm...
  • Testing observability of piecewise yield curve...
  • Testing use of today's LIBOR fixings in swap curve...
  • Testing bootstrap over JPY LIBOR swaps...
  • Testing copying of discount curve...
  • Testing copying of forward-rate curve...
  • Testing copying of zero-rate curve...
  • Testing SwapRateHelper last relevant date...
  • Testing bootstrap starting from bad guess...

Interpolated piecewise zero spreaded yield curve tests

  • Testing flat interpolation before the first spreaded date...
  • Testing flat interpolation after the last spreaded date...
  • Testing linear interpolation with more than two spreaded dates...
  • Testing linear interpolation between two dates...
  • Testing forward flat interpolation between two dates...
  • Testing backward flat interpolation between two dates...
  • Testing default interpolation between two dates...
  • Testing factory constructor with additional parameters...
  • Testing term structure max date...
  • Testing quote update...

CDO tests

  • Testing CDO premiums against Hull-White values for data set

CDS Option tests

  • Testing CDS-option value against cached values...

Credit-default swap tests

  • Testing credit-default swap against cached values...
  • Testing credit-default swap against cached market values...
  • Testing implied hazard-rate for credit-default swaps...
  • Testing fair-spread calculation for credit-default swaps...
  • Testing fair-upfront calculation for credit-default swaps...
  • Testing ISDA engine calculations for credit-default swaps...

Nth-to-default tests

  • Testing nth-to-default against Hull-White values with Gaussian copula...
  • Testing nth-to-default against Hull-White values with Gaussian and Student copula...

NthOrderDerivativeOp tests

  • Testing sparse matrix apply......

Commodity Unit Of Measure tests

  • Testing direct commodity unit of measure conversions...

Binary Option tests

  • Testing cash-or-nothing barrier options against Haug's values...
  • Testing asset-or-nothing barrier options against Haug's values...

Chooser option tests

  • Testing analytic simple chooser option...
  • Testing analytic complex chooser option...

Compound option tests

  • Testing compound-option put-call parity...
  • Testing compound-option values and greeks...

DoubleBarrier tests

  • Testing double barrier european options against Haug's values...

DoubleBarrier experimental tests

  • Testing double-barrier FX options against Vanna/Volga values...

DoubleBinary tests

  • Testing cash-or-nothing double barrier options against Haug's values...

Digital option tests

  • Testing European cash-or-nothing digital option...
  • Testing European asset-or-nothing digital option...
  • Testing European gap digital option...
  • Testing American cash-(at-hit)-or-nothing digital option...
  • Testing American asset-(at-hit)-or-nothing digital option...
  • Testing American cash-(at-expiry)-or-nothing digital option...
  • Testing American asset-(at-expiry)-or-nothing digital option...
  • Testing American cash-(at-hit)-or-nothing digital option greeks...
  • Testing Monte Carlo cash-(at-hit)-or-nothing American engine...

Extensible option tests

  • Testing analytic engine for holder-extensible option...
  • Testing analytic engine for writer-extensible option...

Everest-option tests

  • Testing Everest option against cached values...

Himalaya-option tests

  • Testing Himalaya option against cached values...

Lookback option tests

  • Testing analytic continuous floating-strike lookback options...
  • Testing analytic continuous fixed-strike lookback options...
  • Testing analytic continuous partial floating-strike lookback options...
  • Testing analytic continuous fixed-strike lookback options...

Exchange option tests

  • Testing European one-asset-for-another option...
  • Testing analytic European exchange option greeks...
  • Testing American one-asset-for-another option...

Pagoda-option tests

  • Testing pagoda option against cached values...

Partial-time barrier option tests

  • Testing analytic engine for partial-time barrier option...

Spread option tests

  • Testing Kirk approximation for spread options...

Swing-Option Test

  • Testing extended Ornstein-Uhlenbeck process...
  • Testing finite difference mesher for the Kluge model...
  • Testing finite difference pricer for the Kluge model...
  • Testing Black-Scholes vanilla swing option pricing...
  • Testing simple swing option pricing for Kluge model...
  • Testing simple swing option pricing for Kluge model...

Two-asset barrier option tests

  • Testing two-asset barrier options against Haug's values...

Two-asset correlation option tests

  • Testing analytic engine for two-asset correlation option...

Credit risk plus tests

  • Testing extended credit risk plus model against reference values...

Risk neutral density calculator tests

  • Testing density against option prices...
  • Testing Black-Scholes-Merton and Heston densities...
  • Testing Fokker-Planck forward equation for local volatility process to calculate risk neutral densities...
  • Testing probability density for a square root process...
  • Testing probability density for a BSM process with strike dependent volatility vs local volatility...

Variance Gamma tests

  • Testing variance-gamma model for European options...
  • Testing variance-gamma model integration around zero...

Variance option tests

  • Testing variance option with integral Heston engine...

Variance swap tests

  • Testing variance swap with replicating cost engine...
  • Testing variance swap with Monte Carlo engine...

VPP Test

  • Testing Geman-Roncoroni process...
  • Testing simple-storage option based on ext. OU model...
  • Testing simple Kluge ext-Ornstein-Uhlenbeck spread option...
  • Testing VPP step condition...
  • Testing VPP pricing using perfect foresight or FDM...
  • Testing KlugeExtOU matrix decomposition...

Zabr model tests

  • Testing Consistency ...

NoArbSabrModel tests

  • Testing no-arbitrage Sabr absorption matrix...
  • Testing consistency of noarb-sabr with Hagan et al (2002)

Libor market model tests

  • Testing simple covariance models...
  • Testing caplet pricing...
  • Testing calibration of a Libor forward model...
  • Testing forward swap and swaption pricing...

Libor market model process tests

  • Testing caplet LMM process initialisation...
  • Testing caplet LMM lambda bootstrapping...
  • Testing caplet LMM Monte-Carlo caplet pricing...

Examples:

  • Basket Losses
  • Bermudan Swaption
  • Bonds
  • Callable bonds
  • CDS
  • Convertable bonds
  • CVAIRS
  • Discrete hedging
  • Equity Option
  • Fitted bond curve
  • FRA
  • Gaussian 1D models
  • Global Optimizer
  • Latent Model
  • Market models
  • Multi-dim Integral
  • Replication
  • Repo
  • Swap valuation