QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
spreadedoptionletvol.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2008 Ferdinando Ametrano
5 Copyright (C) 2007 Giorgio Facchinetti
6 Copyright (C) 2015 Peter Caspers
7
8 This file is part of QuantLib, a free-software/open-source library
9 for financial quantitative analysts and developers - http://quantlib.org/
10
11 QuantLib is free software: you can redistribute it and/or modify it
12 under the terms of the QuantLib license. You should have received a
13 copy of the license along with this program; if not, please email
14 <quantlib-dev@lists.sf.net>. The license is also available online at
15 <http://quantlib.org/license.shtml>.
16
17 This program is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 FOR A PARTICULAR PURPOSE. See the license for more details.
20*/
21
26#ifndef quantlib_spreaded_caplet_volstructure_h
27#define quantlib_spreaded_caplet_volstructure_h
28
29#include <ql/termstructures/volatility/optionlet/optionletvolatilitystructure.hpp>
30#include <ql/termstructures/volatility/optionlet/optionletstripper.hpp>
31#include <ql/termstructures/volatility/optionlet/strippedoptionletadapter.hpp>
32
33namespace QuantLib {
34
35 class Quote;
36
38 public:
40 Handle<Quote> spread);
41 // All virtual methods of base classes must be forwarded
43
45 Rate minStrike() const override;
46 Rate maxStrike() const override;
48
50 DayCounter dayCounter() const override;
51 Date maxDate() const override;
52 Time maxTime() const override;
53 const Date& referenceDate() const override;
54 Calendar calendar() const override;
55 Natural settlementDays() const override;
57 VolatilityType volatilityType() const override;
58 Real displacement() const override;
59
60 protected:
61 // All virtual methods of base classes must be forwarded
63
64 ext::shared_ptr<SmileSection> smileSectionImpl(const Date& d) const override;
65 ext::shared_ptr<SmileSection> smileSectionImpl(Time optionT) const override;
66 Volatility volatilityImpl(Time optionTime, Rate strike) const override;
68 private:
71 };
72
74 return baseVol_->dayCounter();
75 }
76
78 return baseVol_->maxDate();
79 }
80
82 return baseVol_->maxTime();
83 }
84
86 return baseVol_->referenceDate();
87 }
88
90 return baseVol_->calendar();
91 }
92
94 return baseVol_->settlementDays();
95 }
96
99 return baseVol_->businessDayConvention();
100 }
101
103 return baseVol_->minStrike();
104 }
105
107 return baseVol_->maxStrike();
108 }
109
110 inline VolatilityType
112 return baseVol_->volatilityType();
113 }
114
116 return baseVol_->displacement();
117 }
118}
119
120#endif
calendar class
Definition: calendar.hpp:61
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
Shared handle to an observable.
Definition: handle.hpp:41
Optionlet (caplet/floorlet) volatility structure.
Calendar calendar() const override
the calendar used for reference and/or option date calculation
Rate maxStrike() const override
the maximum strike for which the term structure can return vols
const Handle< OptionletVolatilityStructure > baseVol_
Rate minStrike() const override
the minimum strike for which the term structure can return vols
Volatility volatilityImpl(Time optionTime, Rate strike) const override
implements the actual volatility calculation in derived classes
const Date & referenceDate() const override
the date at which discount = 1.0 and/or variance = 0.0
VolatilityType volatilityType() const override
Natural settlementDays() const override
the settlementDays used for reference date calculation
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
BusinessDayConvention businessDayConvention() const override
the business day convention used in tenor to date conversion
ext::shared_ptr< SmileSection > smileSectionImpl(const Date &d) const override
Time maxTime() const override
the latest time for which the curve can return values
BusinessDayConvention
Business Day conventions.
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
Real Volatility
volatility
Definition: types.hpp:78
Real Rate
interest rates
Definition: types.hpp:70
Definition: any.hpp:35