1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2005, 2007, 2010, 2012, 2014 Klaus Spanderen
5 Copyright (C) 2022 Ignacio Anguita
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
21#ifndef quantlib_test_heston_model_hpp
22#define quantlib_test_heston_model_hpp
23
24#include <boost/test/unit_test.hpp>
25#include "speedlevel.hpp"
26
27/* remember to document new and/or updated tests in the Doxygen
28 comment block of the corresponding class */
29
30class HestonModelTest {
31 public:
32 static void testBlackCalibration();
33 static void testDAXCalibration();
34 static void testAnalyticVsBlack();
35 static void testAnalyticVsCached();
36 static void testKahlJaeckelCase();
37 static void testMcVsCached();
38 static void testFdBarrierVsCached();
39 static void testFdVanillaVsCached();
40 static void testFdVanillaWithDividendsVsCached();
41 static void testFdAmerican();
42 static void testDifferentIntegrals();
43 static void testMultipleStrikesEngine();
44 static void testAnalyticPiecewiseTimeDependent();
45 static void testDAXCalibrationOfTimeDependentModel();
46 static void testAlanLewisReferencePrices();
47 static void testAnalyticPDFHestonEngine();
48 static void testExpansionOnAlanLewisReference();
49 static void testExpansionOnFordeReference();
50 static void testAllIntegrationMethods();
51 static void testCosHestonCumulants();
52 static void testCosHestonEngine();
53 static void testCosHestonEngineTruncation();
54 static void testCharacteristicFct();
55 static void testAndersenPiterbargPricing();
56 static void testAndersenPiterbargControlVariateIntegrand();
57 static void testAndersenPiterbargConvergence();
58 static void testPiecewiseTimeDependentChFvsHestonChF();
59 static void testPiecewiseTimeDependentComparison();
60 static void testPiecewiseTimeDependentChFAsymtotic();
61 static void testSmallSigmaExpansion();
62 static void testSmallSigmaExpansion4ExpFitting();
63 static void testExponentialFitting4StrikesAndMaturities();
64 static void testHestonEngineIntegration();
65 static void testOptimalControlVariateChoice();
66 static void testAsymptoticControlVariate();
67 static void testLocalVolFromHestonModel();
68
69
70 static boost::unit_test_framework::test_suite* suite(SpeedLevel);
71 static boost::unit_test_framework::test_suite* experimental();
72};
73
74
75#endif
76

source code of quantlib/test-suite/hestonmodel.hpp