QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
hestonblackvolsurface.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2015 Johannes Göttker-Schnetmann
5 Copyright (C) 2015 Klaus Spanderen
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
25#ifndef quantlib_heston_black_vol_surface_hpp
26#define quantlib_heston_black_vol_surface_hpp
27
28
29#include <ql/models/equity/hestonmodel.hpp>
30#include <ql/pricingengines/vanilla/analytichestonengine.hpp>
31#include <ql/termstructures/volatility/equityfx/blackvoltermstructure.hpp>
32
33namespace QuantLib {
35 public:
36 explicit HestonBlackVolSurface(
37 const Handle<HestonModel>& hestonModel,
41
42 DayCounter dayCounter() const override;
43 Date maxDate() const override;
44 Real minStrike() const override;
45 Real maxStrike() const override;
46
47 protected:
48 Real blackVarianceImpl(Time t, Real strike) const override;
49 Volatility blackVolImpl(Time t, Real strike) const override;
50
51 private:
55 };
56}
57
58#endif
59
60
static Integration gaussLaguerre(Size integrationOrder=128)
Black-volatility term structure.
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
Shared handle to an observable.
Definition: handle.hpp:41
const AnalyticHestonEngine::Integration integration_
Real minStrike() const override
the minimum strike for which the term structure can return vols
const Handle< HestonModel > hestonModel_
DayCounter dayCounter() const override
the day counter used for date/time conversion
Date maxDate() const override
the latest date for which the curve can return values
Real blackVarianceImpl(Time t, Real strike) const override
Black variance calculation.
Volatility blackVolImpl(Time t, Real strike) const override
Black volatility calculation.
Real maxStrike() const override
the maximum strike for which the term structure can return vols
const AnalyticHestonEngine::ComplexLogFormula cpxLogFormula_
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Real Volatility
volatility
Definition: types.hpp:78
Definition: any.hpp:35