QuantLib: Test Suite

A free/open-source library for quantitative finance Reference manual - version 1.20

Test Suite

Class DigitalCoupon
  - the correctness of the returned value in case of Asset-or-nothing embedded option is tested by pricing the digital option with Cox-Rubinstein formula.
  - the correctness of the returned value in case of deep-in-the-money Asset-or-nothing embedded option is tested vs the expected values of coupon and option.
  - the correctness of the returned value in case of deep-out-of-the-money Asset-or-nothing embedded option is tested vs the expected values of coupon and option.
  - the correctness of the returned value in case of Cash-or-nothing embedded option is tested by pricing the digital option with Reiner-Rubinstein formula.
  - the correctness of the returned value in case of deep-in-the-money Cash-or-nothing embedded option is tested vs the expected values of coupon and option.
  - the correctness of the returned value in case of deep-out-of-the-money Cash-or-nothing embedded option is tested vs the expected values of coupon and option.
  - the correctness of the returned value is tested checking the correctness of the call-put parity relation.
  - the correctness of the returned value is tested by the relationship between prices in case of different replication types.
Class ExchangeRateManager
  lookup of direct, triangulated, and derived exchange rates is tested.
Class ExchangeRate
  application of direct and derived exchange rate is tested against calculations.
Class AnalyticDoubleBarrierBinaryEngine
  - the correctness of the returned value is tested by reproducing results available in literature.
Class AnalyticDoubleBarrierEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class BinomialDoubleBarrierEngine< T, D >
  the correctness of the returned values is tested by checking it against analytic results.
Class WulinYongDoubleBarrierEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class FloatingCatBond
  calculations are tested by checking results against cached values.
Class UnitOfMeasureConversionManager
  lookup of direct unit of measure conversion is tested.
Class AnalyticAmericanMargrabeEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class AnalyticCompoundOptionEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class AnalyticEuropeanMargrabeEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class AnalyticPDFHestonEngine
  the correctness of the returned value is tested by reproducing digital prices using call spreads and the AnalyticHestonEngine.
Class AnalyticTwoAssetBarrierEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class LongstaffSchwartzMultiPathPricer
  the correctness of the returned value is tested by reproducing results available in web/literature
Class MCLongstaffSchwartzPathEngine< GenericEngine, MC, RNG, S >
  the correctness of the returned value is tested by reproducing results available in web/literature
Class VarianceGammaEngine
  the correctness of the returned values is tested by checking it against known good results.
Class FFTVanillaEngine
  the correctness of the returned values is tested by comparison with Black Scholes pricing.
Class FFTVarianceGammaEngine
  the correctness of the returned values is tested by comparison with known good values and the analytic approach
Class Instrument
  observability of class instances is checked.
Class Bond
  - price/yield calculations are cross-checked for consistency.
  - price/yield calculations are checked against known good values.
Class CmsRateBond
  calculations are tested by checking results against cached values.
Class FixedRateBond
  calculations are tested by checking results against cached values.
Class FloatingRateBond
  calculations are tested by checking results against cached values.
Class ZeroCouponBond
  calculations are tested by checking results against cached values.
Class CapFloor
  - the correctness of the returned value is tested by checking that the price of a cap (resp. floor) decreases (resp. increases) with the strike rate.
  - the relationship between the values of caps, floors and the resulting collars is checked.
  - the put-call parity between the values of caps, floors and swaps is checked.
  - the correctness of the returned implied volatility is tested by using it for reproducing the target value.
  - the correctness of the returned value is tested by checking it against a known good value.
Class YoYInflationCapFloor
  - the relationship between the values of caps, floors and the resulting collars is checked.
  - the put-call parity between the values of caps, floors and swaps is checked.
  - the correctness of the returned value is tested by checking it against a known good value.
Class Swaption
  - the correctness of the returned value is tested by checking that the price of a payer (resp. receiver) swaption decreases (resp. increases) with the strike.
  - the correctness of the returned value is tested by checking that the price of a payer (resp. receiver) swaption increases (resp. decreases) with the spread.
  - the correctness of the returned value is tested by checking it against that of a swaption on a swap with no spread and a correspondingly adjusted fixed rate.
  - the correctness of the returned value is tested by checking it against a known good value.
  - the correctness of the returned value of cash settled swaptions is tested by checking the modified annuity against a value calculated without using the Swaption class.
Class VanillaSwap
  - the correctness of the returned value is tested by checking that the price of a swap paying the fair fixed rate is null.
  - the correctness of the returned value is tested by checking that the price of a swap receiving the fair floating-rate spread is null.
  - the correctness of the returned value is tested by checking that the price of a swap decreases with the paid fixed rate.
  - the correctness of the returned value is tested by checking that the price of a swap increases with the received floating-rate spread.
  - the correctness of the returned value is tested by checking it against a known good value.
Class InterestRate
  Converted rates are checked against known good results
Class LfmHullWhiteParameterization
  the correctness is tested by Monte-Carlo reproduction of caplet & ratchet npvs and comparison with Black pricing.
Class LiborForwardModelProcess
  the correctness is tested by Monte-Carlo reproduction of caplet & ratchet NPVs and comparison with Black pricing.
Class LiborForwardModel
  the correctness is tested using Monte-Carlo Simulation to reproduce swaption npvs, model calibration and exact cap pricing
Class Array
  construction of arrays is checked in a number of cases
Class BivariateCumulativeNormalDistributionDr78
  the correctness of the returned value is tested by checking it against known good results.
Class BivariateCumulativeNormalDistributionWe04DP
  the correctness of the returned value is tested by checking it against known good results.
Class GammaFunction
  the correctness of the returned value is tested by checking it against known good results.
Class NormalDistribution
  the correctness of the returned value is tested by checking it against numerical calculations. Cross-checks are also performed against the CumulativeNormalDistribution and InverseCumulativeNormal classes.
Class PoissonDistribution
  the correctness of the returned value is tested by checking it against known good results.
Class CumulativePoissonDistribution
  the correctness of the returned value is tested by checking it against known good results.
Class InverseCumulativePoisson
  the correctness of the returned value is tested by checking it against known good results.
Class Factorial
  the correctness of the returned value is tested by checking it against numerical calculations.
Class GeneralLinearLeastSquares
  the correctness of the returned values is tested by checking their properties.
Class FilonIntegral
  the correctness of the result is tested by checking it against known good values.
Class GaussianQuadrature
  the correctness of the result is tested by checking it against known good values.
Class GaussKronrodAdaptive
  the correctness of the result is tested by checking it against known good values.
Class SegmentIntegral
  the correctness of the result is tested by checking it against known good values.
Class SimpsonIntegral
  the correctness of the result is tested by checking it against known good values.
Class TrapezoidIntegral< IntegrationPolicy >
  the correctness of the result is tested by checking it against known good values.
Class CubicInterpolation
  to be adapted from old ones.
Class MultiCubicSpline< i >
  interpolated values are checked against the original function.
Member QuantLib::getCovariance (DataIterator stdDevBegin, DataIterator stdDevEnd, const Matrix &corr, Real tolerance=1.0e-12)
  tested on know values and cross checked with CovarianceDecomposition
Class CovarianceDecomposition
  cross checked with getCovariance
Member pseudoSqrt
  - the correctness of the results is tested by reproducing known good data.
  - the correctness of the results is tested by checking returned values against numerical calculations.
Class SVD
  the correctness of the returned values is tested by checking their properties.
Class SymmetricSchurDecomposition
  the correctness of the returned values is tested by checking their properties.
Member QuantLib::triangularAnglesParametrization (const Array &angles, Size matrixSize, Size rank)
  - the correctness of the results is tested by reproducing known good data.
  - the correctness of the results is tested by checking returned values against numerical calculations.
Member QuantLib::triangularAnglesParametrizationRankThree (Real alpha, Real t0, Real epsilon, Size nbRows)
  - the correctness of the results is tested by reproducing known good data.
  - the correctness of the results is tested by checking returned values against numerical calculations.
Class TqrEigenDecomposition
  the correctness of the result is tested by checking it against known good values.
Class FaureRsg
  the correctness of the returned values is tested by reproducing known good values.
Class HaltonRsg
  - the correctness of the returned values is tested by reproducing known good values.
  - the correctness of the returned values is tested by checking their discrepancy against known good values.
Class MersenneTwisterUniformRng
  the correctness of the returned values is tested by checking them against known good results.
Class RandomizedLDS< LDS, PRS >
  correct initialization is tested.
Member QuantLib::PseudoRandom
  a sequence generator is generated and tested by comparing samples against known good values.
Member QuantLib::PoissonPseudoRandom
  sequence generators are generated and tested by comparing samples against known good values.
Class SeedGenerator
  correct initialization of the single instance is tested.
Class SobolRsg
  - the correctness of the returned values is tested by reproducing known good values.
  - the correctness of the returned values is tested by checking their discrepancy against known good values.
Class Rounding
  the correctness of the returned values is tested by checking them against known good results.
Class Bisection
  the correctness of the returned values is tested by checking them against known good results.
Class Brent
  the correctness of the returned values is tested by checking them against known good results.
Class FalsePosition
  the correctness of the returned values is tested by checking them against known good results.
Class FiniteDifferenceNewtonSafe
  the correctness of the returned values is tested by checking them against known good results.
Class Newton
  the correctness of the returned values is tested by checking them against known good results.
Class NewtonSafe
  the correctness of the returned values is tested by checking them against known good results.
Class Ridder
  the correctness of the returned values is tested by checking them against known good results.
Class Secant
  the correctness of the returned values is tested by checking them against known good results.
Class ConvergenceStatistics< T, U >
  results are tested against known good values.
Member QuantLib::RiskStatistics
  the correctness of the returned values is tested by checking them against numerical calculations.
Class GenericSequenceStatistics< StatisticsType >
  the correctness of the returned values is tested by checking them against numerical calculations.
Member QuantLib::SequenceStatistics
  the correctness of the returned values is tested by checking them against numerical calculations.
Member QuantLib::Statistics
  the correctness of the returned values is tested by checking them against numerical calculations.
Member QuantLib::BSMTermOperator
  coefficients are tested against constant BSM operator
Class DPlusDMinus
  the correctness of the returned values is tested by checking them against numerical calculations.
Class DZero
  the correctness of the returned values is tested by checking them against numerical calculations.
Class LongstaffSchwartzPathPricer< PathType >
  the correctness of the returned value is tested by reproducing results available in web/literature
Class MultiPathGenerator< GSG >
  the generated paths are checked against cached results
Class PathGenerator< GSG >
  the generated paths are checked against cached results
Class BatesModel
  calibration is tested against known values.
Class HestonModel
  calibration is tested against known good values.
Class HullWhite
  calibration results are tested against cached values
Class Money
  money arithmetic is tested with and without currency conversions.
Class AnalyticContinuousGeometricAveragePriceAsianEngine
  - the correctness of the returned value is tested by reproducing results available in literature, and results obtained using a discrete average approximation.
  - the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class AnalyticDiscreteGeometricAveragePriceAsianEngine
  - the correctness of the returned value is tested by reproducing results available in literature.
  - the correctness of the available greeks is tested against numerical calculations.
Class AnalyticDiscreteGeometricAverageStrikeAsianEngine
  - the correctness of the returned value is tested by reproducing known good results.
Class MCDiscreteArithmeticAPEngine< RNG, S >
  the correctness of the returned value is tested by reproducing results available in literature.
Class MCDiscreteGeometricAPEngine< RNG, S >
  the correctness of the returned value is tested by reproducing results available in literature.
Class AnalyticBarrierEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class AnalyticBinaryBarrierEngine
  - the correctness of the returned value in case of cash-or-nothing at-expiry binary payoff is tested by reproducing results available in literature.
  - the correctness of the returned value in case of asset-or-nothing at-expiry binary payoff is tested by reproducing results available in literature.
Class BinomialBarrierEngine< T, D >
  the correctness of the returned values is tested by checking it against analytic european results.
Class FdBlackScholesBarrierEngine
  the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black pricing.
Class FdHestonBarrierEngine
  the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black pricing.
Class MCBarrierEngine< RNG, S >
  the correctness of the returned value is tested by reproducing results available in literature.
Class Fd2dBlackScholesVanillaEngine
  the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Kirk approximation.
Class KirkEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class MCEuropeanBasketEngine< RNG, S >
  the correctness of the returned value is tested by reproducing results available in literature.
Class StulzEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class AnalyticCliquetEngine
  - the correctness of the returned value is tested by reproducing results available in literature.
  - the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class AnalyticPerformanceEngine
  the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class ForwardVanillaEngine< Engine >
  - the correctness of the returned value is tested by reproducing results available in literature.
  - the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class ForwardPerformanceVanillaEngine< Engine >
  - the correctness of the returned value is tested by reproducing results available in literature.
  - the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class MCVarianceSwapEngine< RNG, S >
  returned fair variances checked for consistency with implied volatility curve.
Class ReplicatingVarianceSwapEngine
  returned variances verified against results from literature
Class AnalyticContinuousFixedLookbackEngine
  returned values are verified against results from literature
Class AnalyticContinuousFloatingLookbackEngine
  returned values verified against results from literature
Class AnalyticContinuousPartialFixedLookbackEngine
  returned values are verified against results from literature
Class AnalyticContinuousPartialFloatingLookbackEngine
  returned values verified against results from literature
Class MCLongstaffSchwartzEngine< GenericEngine, MC, RNG, S, RNG_Calibration >
  the correctness of the returned value is tested by reproducing results available in web/literature
Class QuantoEngine< Instr, Engine >
  - the correctness of the returned value is tested by reproducing results available in literature.
  - the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class TreeVanillaSwapEngine
  calculations are checked against known good results
Class TreeSwaptionEngine
  calculations are checked against cached results
Class AnalyticBSMHullWhiteEngine
  the correctness of the returned value is tested by reproducing results available in web/literature
Class AnalyticDigitalAmericanEngine
  - the correctness of the returned value in case of cash-or-nothing at-hit digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned value in case of asset-or-nothing at-hit digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned value in case of cash-or-nothing at-expiry digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned value in case of asset-or-nothing at-expiry digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned greeks in case of cash-or-nothing at-hit digital payoff is tested by reproducing numerical derivatives.
Class AnalyticDigitalAmericanKOEngine
  - the correctness of the returned value in case of cash-or-nothing at-hit digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned value in case of asset-or-nothing at-hit digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned value in case of cash-or-nothing at-expiry digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned value in case of asset-or-nothing at-expiry digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned greeks in case of cash-or-nothing at-hit digital payoff is tested by reproducing numerical derivatives.
Class AnalyticDividendEuropeanEngine
  the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class AnalyticEuropeanEngine
  - the correctness of the returned value is tested by reproducing results available in literature.
  - the correctness of the returned greeks is tested by reproducing results available in literature.
  - the correctness of the returned greeks is tested by reproducing numerical derivatives.
  - the correctness of the returned implied volatility is tested by using it for reproducing the target value.
  - the implied-volatility calculation is tested by checking that it does not modify the option.
  - the correctness of the returned value in case of cash-or-nothing digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned value in case of asset-or-nothing digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned value in case of gap digital payoff is tested by reproducing results available in literature.
  - the correctness of the returned greeks in case of cash-or-nothing digital payoff is tested by reproducing numerical derivatives.
Class AnalyticH1HWEngine
  the correctness of the returned value is tested by reproducing results available in web/literature, testing against QuantLib's analytic Heston, the Black-Scholes-Merton Hull-White engine and the finite difference Heston-Hull-White engine
Class AnalyticHestonEngine
  the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black pricing.
Class AnalyticHestonHullWhiteEngine
  the correctness of the returned value is tested by reproducing results available in web/literature, testing against QuantLib's analytic Heston and Black-Scholes-Merton Hull-White engine
Class BaroneAdesiWhaleyApproximationEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class BatesEngine
  the correctness of the returned value is tested by reproducing results available in web/literature, testing against QuantLib's jump diffusion engine and comparison with Black pricing.
Class BinomialVanillaEngine< T >
  the correctness of the returned values is tested by checking it against analytic results.
Class BjerksundStenslandApproximationEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class COSHestonEngine
  the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black pricing.
Class FdHestonHullWhiteVanillaEngine
  the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black/Heston pricing.
Class FDShoutEngine< Scheme >
  the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class JumpDiffusionEngine
  - the correctness of the returned value is tested by reproducing results available in literature.
  - the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class JuQuadraticApproximationEngine
  the correctness of the returned value is tested by reproducing results available in literature.
Class MCAmericanEngine< RNG, S, RNG_Calibration >
  the correctness of the returned value is tested by reproducing results available in web/literature
Class MCDigitalEngine< RNG, S >
  the correctness of the returned value in case of cash-or-nothing at-hit digital payoff is tested by reproducing known good results.
Class MCEuropeanEngine< RNG, S >
  the correctness of the returned value is tested by checking it against analytic results.
Class MCEuropeanGJRGARCHEngine< RNG, S >
  the correctness of the returned value is tested by reproducing results available in web/literature
Class MCEuropeanHestonEngine< RNG, S, P >
  the correctness of the returned value is tested by reproducing results available in web/literature
Class Quote
  the observability of class instances is tested.
Class CompositeQuote< BinaryFunction >
  the correctness of the returned values is tested by checking them against numerical calculations.
Class DerivedQuote< UnaryFunction >
  the correctness of the returned values is tested by checking them against numerical calculations.
Class ForwardSpreadedTermStructure
  - the correctness of the returned values is tested by checking them against numerical calculations.
  - observability against changes in the underlying term structure and in the added spread is checked.
Class ImpliedTermStructure
  - the correctness of the returned values is tested by checking them against numerical calculations.
  - observability against changes in the underlying term structure is checked.
Class PiecewiseYieldCurve< Traits, Interpolator, Bootstrap >
  - the correctness of the returned values is tested by checking them against the original inputs.
  - the observability of the term structure is tested.
Class ZeroSpreadedTermStructure
  - the correctness of the returned values is tested by checking them against numerical calculations.
  - observability against changes in the underlying term structure and in the added spread is checked.
Class YieldTermStructure
  observability against evaluation date changes is checked.
Class Calendar
  the methods for adding and removing holidays are tested by inspecting the calendar before and after their invocation.
Class Brazil
  the correctness of the returned results is tested against a list of known holidays.
Class Germany
  the correctness of the returned results is tested against a list of known holidays.
Class Italy
  the correctness of the returned results is tested against a list of known holidays.
Class JointCalendar
  the correctness of the returned results is tested by reproducing the calculations.
Class TARGET
  the correctness of the returned results is tested against a list of known holidays.
Class UnitedKingdom
  the correctness of the returned results is tested against a list of known holidays.
Class UnitedStates
  the correctness of the returned results is tested against a list of known holidays.
Class Date
  self-consistency of dates, serial numbers, days of month, months, and weekdays is checked over the whole date range.
Class ActualActual
  the correctness of the results is checked against known good values.
Class SimpleDayCounter
  the correctness of the results is checked against known good values.
Class Period
  self-consistency of algebra is checked.