QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
strippedoptionlet.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 Copyright (C) 2015 Michael von den Driesch
8
9 This file is part of QuantLib, a free-software/open-source library
10 for financial quantitative analysts and developers - http://quantlib.org/
11
12 QuantLib is free software: you can redistribute it and/or modify it
13 under the terms of the QuantLib license. You should have received a
14 copy of the license along with this program; if not, please email
15 <quantlib-dev@lists.sf.net>. The license is also available online at
16 <http://quantlib.org/license.shtml>.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the license for more details.
21*/
22
26#ifndef quantlib_strippedoptionlet_hpp
27#define quantlib_strippedoptionlet_hpp
28
29#include <ql/termstructures/volatility/optionlet/strippedoptionletbase.hpp>
30#include <ql/indexes/iborindex.hpp>
31#include <ql/quote.hpp>
32
33namespace QuantLib {
34
40 public:
42 const Calendar& calendar,
44 ext::shared_ptr<IborIndex> iborIndex,
45 const std::vector<Date>& optionletDates,
46 const std::vector<Rate>& strikes,
47 std::vector<std::vector<Handle<Quote> > >,
48 DayCounter dc,
50 Real displacement = 0.0);
52 const Calendar& calendar,
54 ext::shared_ptr<IborIndex> iborIndex,
55 const std::vector<Date>& optionletDates,
56 const std::vector<std::vector<Rate>>& strikes,
57 std::vector<std::vector<Handle<Quote>>>,
58 DayCounter dc,
60 Real displacement = 0.0);
62
63 const std::vector<Rate>& optionletStrikes(Size i) const override;
64 const std::vector<Volatility>& optionletVolatilities(Size i) const override;
65
66 const std::vector<Date>& optionletFixingDates() const override;
67 const std::vector<Time>& optionletFixingTimes() const override;
68 Size optionletMaturities() const override;
69
70 const std::vector<Rate>& atmOptionletRates() const override;
71
72 DayCounter dayCounter() const override;
73 Calendar calendar() const override;
74 Natural settlementDays() const override;
77 VolatilityType volatilityType() const override;
78 Real displacement() const override;
79
80 private:
81 void checkInputs() const;
83 void performCalculations() const override;
84
89 ext::shared_ptr<IborIndex> iborIndex_;
92
94 std::vector<Date> optionletDates_;
95 std::vector<Time> optionletTimes_;
96 mutable std::vector<Rate> optionletAtmRates_;
97 std::vector<std::vector<Rate> > optionletStrikes_;
98
99 std::vector<std::vector<Handle<Quote> > > optionletVolQuotes_;
100 mutable std::vector<std::vector<Volatility> > optionletVolatilities_;
101 };
102
103}
104
105#endif
calendar class
Definition: calendar.hpp:61
day counter class
Definition: daycounter.hpp:44
Shared handle to an observable.
Definition: handle.hpp:41
void performCalculations() const override
Calendar calendar() const override
std::vector< std::vector< Volatility > > optionletVolatilities_
const std::vector< Date > & optionletFixingDates() const override
const std::vector< Rate > & optionletStrikes(Size i) const override
ext::shared_ptr< IborIndex > iborIndex_
const std::vector< Time > & optionletFixingTimes() const override
const std::vector< Volatility > & optionletVolatilities(Size i) const override
VolatilityType volatilityType() const override
std::vector< Rate > optionletAtmRates_
std::vector< Time > optionletTimes_
std::vector< Date > optionletDates_
Natural settlementDays() const override
DayCounter dayCounter() const override
std::vector< std::vector< Handle< Quote > > > optionletVolQuotes_
const std::vector< Rate > & atmOptionletRates() const override
BusinessDayConvention businessDayConvention() const override
std::vector< std::vector< Rate > > optionletStrikes_
Real displacement() const override
Size optionletMaturities() const override
BusinessDayConvention businessDayConvention_
BusinessDayConvention
Business Day conventions.
QL_REAL Real
real number
Definition: types.hpp:50
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35