QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
localvolsurface.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2003 Ferdinando Ametrano
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file localvolsurface.hpp
21 \brief Local volatility surface derived from a Black vol surface
22*/
23
24#ifndef quantlib_localvolsurface_hpp
25#define quantlib_localvolsurface_hpp
26
28
29namespace QuantLib {
30
31 class BlackVolTermStructure;
32 class YieldTermStructure;
33 class Quote;
34
35 //! Local volatility surface derived from a Black vol surface
36 /*! For details about this implementation refer to
37 "Stochastic Volatility and Local Volatility," in
38 "Case Studies and Financial Modelling Course Notes," by
39 Jim Gatheral, Fall Term, 2003
40
41 see www.math.nyu.edu/fellows_fin_math/gatheral/Lecture1_Fall02.pdf
42
43 \bug this class is untested, probably unreliable.
44 */
46 public:
50 Handle<Quote> underlying);
54 Real underlying);
55 //! \name TermStructure interface
56 //@{
57 const Date& referenceDate() const override;
58 DayCounter dayCounter() const override;
59 Date maxDate() const override;
60 //@}
61 //! \name VolatilityTermStructure interface
62 //@{
63 Real minStrike() const override;
64 Real maxStrike() const override;
65 //@}
66 //! \name Visitability
67 //@{
68 void accept(AcyclicVisitor&) override;
69 //@}
70 protected:
71 Volatility localVolImpl(Time, Real) const override;
72
73 private:
77 };
78
79}
80
81#endif
degenerate base class for the Acyclic Visitor pattern
Definition: visitor.hpp:33
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
Shared handle to an observable.
Definition: handle.hpp:41
Local volatility surface derived from a Black vol surface.
Volatility localVolImpl(Time, Real) const override
local vol calculation
const Date & referenceDate() const override
the date at which discount = 1.0 and/or variance = 0.0
Real minStrike() const override
the minimum strike for which the term structure can return vols
void accept(AcyclicVisitor &) override
Handle< BlackVolTermStructure > blackTS_
DayCounter dayCounter() const override
the day counter used for date/time conversion
Handle< YieldTermStructure > riskFreeTS_
Date maxDate() const override
the latest date for which the curve can return values
Handle< YieldTermStructure > dividendTS_
Real maxStrike() const override
the maximum strike for which the term structure can return vols
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
Local volatility term structure base class.
Definition: any.hpp:35