QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Test Suite
Class ActualActual
the correctness of the results is checked against known good values.
Class AnalyticAmericanMargrabeEngine
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 AnalyticBSMHullWhiteEngine
the correctness of the returned value is tested by reproducing results available in web/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 AnalyticCompoundOptionEngine
the correctness of the returned value is tested by reproducing results available in literature.
Class AnalyticContinuousFixedLookbackEngine
returned values are verified against results from literature
Class AnalyticContinuousFloatingLookbackEngine
returned values verified against results from literature
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 AnalyticContinuousGeometricAveragePriceAsianHestonEngine
  • the correctness of the returned value is tested by reproducing results in Table 1 and Table 4 of the paper
Class AnalyticContinuousPartialFixedLookbackEngine
returned values are verified against results from literature
Class AnalyticContinuousPartialFloatingLookbackEngine
returned values verified against results from 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 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 AnalyticDiscreteGeometricAveragePriceAsianHestonEngine
  • the correctness of the returned value is tested by reproducing results in Tables 1, 2 and 3 of the paper
Class AnalyticDiscreteGeometricAverageStrikeAsianEngine
  • the correctness of the returned value is tested by reproducing known good results.
Class AnalyticDividendEuropeanEngine
the correctness of the returned greeks is tested by reproducing numerical derivatives.
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 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 AnalyticEuropeanMargrabeEngine
the correctness of the returned value is tested by reproducing results available in literature.
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 AnalyticHestonForwardEuropeanEngine
  • For tReset > 0, price from the analytic pricer is compared to the MC priver for calls/puts at various moneynesses
  • For tReset ~ 0, price from the analytic pricer is compared to the Heston analytic vanilla pricer for various options
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 AnalyticPDFHestonEngine
the correctness of the returned value is tested by reproducing digital prices using call spreads and the AnalyticHestonEngine.
Class AnalyticPerformanceEngine
the correctness of the returned greeks is tested by reproducing numerical derivatives.
Class AnalyticTwoAssetBarrierEngine
the correctness of the returned value is tested by reproducing results available in literature.
Class Array
construction of arrays is checked in a number of cases
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 BatesModel
calibration is tested against known values.
Class BinomialBarrierEngine< T, D >
the correctness of the returned values is tested by checking it against analytic european results.
Class BinomialDoubleBarrierEngine< T, D >
the correctness of the returned values is tested by checking it against analytic results.
Class BinomialVanillaEngine< T >
the correctness of the returned values is tested by checking it against analytic results.
Class Bisection
the correctness of the returned values is tested by checking them against known good results.
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 BjerksundStenslandApproximationEngine
the correctness of the returned value is tested by reproducing results available in literature.
Class Bond
  • price/yield calculations are cross-checked for consistency.
  • price/yield calculations are checked against known good values.
Class Brazil
the correctness of the returned results is tested against a list of known holidays.
Class Brent
the correctness of the returned values is tested by checking them against known good results.
Class Calendar
the methods for adding and removing holidays are tested by inspecting the calendar before and after their invocation.
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 CmsRateBond
calculations are tested by checking results against cached values.
Class CompositeQuote< BinaryFunction >
the correctness of the returned values is tested by checking them against numerical calculations.
Class ConvergenceStatistics< T, U >
results are tested against known good values.
Class COSHestonEngine
the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black pricing.
Class CovarianceDecomposition
cross checked with getCovariance
Class CubicInterpolation
to be adapted from old ones.
Class CumulativePoissonDistribution
the correctness of the returned value is tested by checking it against known good results.
Class Date
self-consistency of dates, serial numbers, days of month, months, and weekdays is checked over the whole date range.
Class DerivedQuote< UnaryFunction >
the correctness of the returned values is tested by checking them against numerical calculations.
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 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 ExchangeRate
application of direct and derived exchange rate is tested against calculations.
Class ExchangeRateManager
lookup of direct, triangulated, and derived exchange rates is tested.
Class Factorial
the correctness of the returned value is tested by checking it against numerical calculations.
Class FalsePosition
the correctness of the returned values is tested by checking them against known good results.
Class FaureRsg
the correctness of the returned values is tested by reproducing known good values.
Class Fd2dBlackScholesVanillaEngine
the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Kirk approximation.
Class FdBlackScholesBarrierEngine
the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black pricing.
Class FdBlackScholesVanillaEngine
the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black pricing.
Class FdCIRVanillaEngine
the engine has been tested to converge among different schemes.
Class FdHestonBarrierEngine
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 FdHestonVanillaEngine
the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black pricing.
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 FilonIntegral
the correctness of the result is tested by checking it against known good values.
Class FiniteDifferenceNewtonSafe
the correctness of the returned values is tested by checking them against known good results.
Class FixedRateBond
calculations are tested by checking results against cached values.
Class FloatingCatBond
calculations are tested by checking results against cached values.
Class FloatingRateBond
calculations are tested by checking results against cached values.
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 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 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 GammaFunction
the correctness of the returned value is tested by checking it against known good results.
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 GeneralLinearLeastSquares
the correctness of the returned values is tested by checking their properties.
Class GenericSequenceStatistics< StatisticsType >
the correctness of the returned values is tested by checking them against numerical calculations.
Class Germany
the correctness of the returned results is tested against a list of known holidays.
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 HestonModel
calibration is tested against known good values.
Class HullWhite
calibration results are tested against cached values
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 Instrument
observability of class instances is checked.
Class InterestRate
Converted rates are checked against known good results
Class InverseCumulativePoisson
the correctness of the returned value is tested by checking it against known good results.
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 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 KirkEngine
the correctness of the returned value is tested by reproducing results available in literature.
Class LfmHullWhiteParameterization
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 LiborForwardModelProcess
the correctness is tested by Monte-Carlo reproduction of caplet & ratchet NPVs and comparison with Black pricing.
Class LongstaffSchwartzMultiPathPricer
the correctness of the returned value is tested by reproducing results available in web/literature
Class LongstaffSchwartzPathPricer< PathType >
the correctness of the returned value is tested by reproducing results available in web/literature
Class MCAmericanEngine< RNG, S, RNG_Calibration >
the correctness of the returned value is tested by reproducing results available in web/literature
Class MCBarrierEngine< RNG, S >
the correctness of the returned value is tested by reproducing results available in 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 MCDiscreteArithmeticAPEngine< RNG, S >
the correctness of the returned value is tested by reproducing results available in literature.
Class MCDiscreteArithmeticAPHestonEngine< RNG, S, P >
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 MCDiscreteGeometricAPHestonEngine< RNG, S, P >
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 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 MCForwardEuropeanBSEngine< RNG, S >
  • the correctness of the returned value is tested by comparing prices to the analytic pricer for a range of moneynesses
Class MCForwardEuropeanHestonEngine< RNG, S, P >
  • Heston MC prices for a flat Heston process are compared to analytical BS prices with the same volatility for a range of moneynesses
  • Heston MC prices for a forward-starting option resetting at t=0 are compared to semi-analytical Heston prices for a range of moneynesses
Class MCLongstaffSchwartzEngine< GenericEngine, MC, RNG, S, RNG_Calibration >
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 MCVarianceSwapEngine< RNG, S >
returned fair variances checked for consistency with implied volatility curve.
Class MersenneTwisterUniformRng
the correctness of the returned values is tested by checking them against known good results.
Class Money
money arithmetic is tested with and without currency conversions.
Class MultiCubicSpline< i >
interpolated values are checked against the original function.
Class MultiPathGenerator< GSG >
the generated paths are checked against cached 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 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 PathGenerator< GSG >
the generated paths are checked against cached results
Class Period
self-consistency of algebra 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 PoissonDistribution
the correctness of the returned value is tested by checking it against known good results.
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.
Member QuantLib::getCovariance (DataIterator stdDevBegin, DataIterator stdDevEnd, const Matrix &corr, Real tolerance=1.0e-12)
tested on know values and cross checked with CovarianceDecomposition
Member QuantLib::PoissonPseudoRandom
sequence generators are generated and tested by comparing samples against known good values.
Member QuantLib::PseudoRandom
a sequence generator is generated and tested by comparing samples against known good values.
Member QuantLib::RiskStatistics
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::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 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 Quote
the observability of class instances is tested.
Class RandomizedLDS< LDS, PRS >
correct initialization is tested.
Class ReplicatingVarianceSwapEngine
returned variances verified against results from literature
Class Ridder
the correctness of the returned values is tested by checking them against known good results.
Class Rounding
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 SeedGenerator
correct initialization of the single instance is tested.
Class SegmentIntegral
the correctness of the result is tested by checking it against known good values.
Class SimpleDayCounter
the correctness of the results is checked against known good values.
Class SimpsonIntegral
the correctness of the result is tested by checking it against known good values.
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 StulzEngine
the correctness of the returned value is tested by reproducing results available in literature.
Class SuoWangDoubleBarrierEngine
the correctness of the returned value is tested by reproducing results available in literature.
Class SVD
the correctness of the returned values is tested by checking their properties.
Class SviSmileSection
the correctness of the result is tested by checking it against known good values.
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 SymmetricSchurDecomposition
the correctness of the returned values is tested by checking their properties.
Class TARGET
the correctness of the returned results is tested against a list of known holidays.
Class TqrEigenDecomposition
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 TreeSwaptionEngine
calculations are checked against cached results
Class TreeVanillaSwapEngine
calculations are checked against known good results
Class TurnbullWakemanAsianEngine
  • the correctness of the returned value is tested by reproducing results in literature with flat as well as upward and downward sloping volatility term structures.
  • the pricing of trades with guaranteed exercise/OTM is also tested.
Class UltimateForwardTermStructure
  • the correctness of the returned zero rates is tested by checking them against reference values obtained from the official source.
  • extrapolated forward is validated.
  • rates on the cut-off point are checked against those implied by the base curve.
  • inspectors are tested against the base curve.
  • incorrect input for cut-off point should raise an exception.
  • observability against changes in the underlying term structure and the additional components is checked.
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 UnitOfMeasureConversionManager
lookup of direct unit of measure conversion is tested.
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 VarianceGammaEngine
the correctness of the returned values is tested by checking it against known good results.
Class Xoshiro256StarStarUniformRng
the correctness of the returned values is tested by checking them against the reference implementation in c.
Class YieldTermStructure
observability against evaluation date changes is checked.
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 ZeroCouponBond
calculations are tested by checking results against cached values.
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.