Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
datedstrippedoptionlet.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file qle/termstructures/datedstrippedoptionlet.hpp
20 \brief Stripped optionlet surface with fixed reference date
21 \ingroup termstructures
22*/
23
24#pragma once
25
27
28#include <ql/indexes/iborindex.hpp>
29#include <ql/quote.hpp>
30#include <ql/termstructures/volatility/optionlet/strippedoptionletbase.hpp>
31
32namespace QuantExt {
33//! Stripped Optionlet Surface
34/*! Class to hold a stripped optionlet surface with a fixed reference date and fixed volatilities
35
36 \ingroup termstructures
37*/
39public:
40 //! Construct from a StrippedOptionletBase object
41 DatedStrippedOptionlet(const Date& referenceDate, const QuantLib::ext::shared_ptr<StrippedOptionletBase>& s);
42 //! Construct from an explicitly provided optionlet surface
43 DatedStrippedOptionlet(const Date& referenceDate, const Calendar& calendar, BusinessDayConvention bdc,
44 const vector<Date>& optionletDates, const vector<vector<Rate> >& strikes,
45 const vector<vector<Volatility> >& volatilities, const vector<Rate>& optionletAtmRates,
46 const DayCounter& dayCounter, VolatilityType type = ShiftedLognormal,
47 Real displacement = 0.0);
48
49 //! \name DatedStrippedOptionletBase interface
50 //@{
51 const vector<Rate>& optionletStrikes(Size i) const override;
52 const vector<Volatility>& optionletVolatilities(Size i) const override;
53
54 const vector<Date>& optionletFixingDates() const override;
55 const vector<Time>& optionletFixingTimes() const override;
56 Size optionletMaturities() const override;
57
58 const vector<Rate>& atmOptionletRates() const override;
59
60 const Date& referenceDate() const override;
61 const Calendar& calendar() const override;
62 BusinessDayConvention businessDayConvention() const override;
63 const DayCounter& dayCounter() const override;
64 VolatilityType volatilityType() const override;
65 Real displacement() const override;
66 //@}
67
68 //! \name LazyObject interface
69 //@{
70 void performCalculations() const override {
71 // Does nothing unless class becomes more dynamic e.g. take in volatilities as quote handles
72 }
73 //@}
74
75private:
76 void checkInputs() const;
77
79 Calendar calendar_;
80 BusinessDayConvention businessDayConvention_;
81 vector<Date> optionletDates_;
83 vector<Time> optionletTimes_;
84 vector<vector<Rate> > optionletStrikes_;
85 vector<vector<Volatility> > optionletVolatilities_;
86 vector<Rate> optionletAtmRates_;
87 DayCounter dayCounter_;
88 VolatilityType type_;
90};
91} // namespace QuantExt
Stripped Optionlet base class interface.
const vector< Date > & optionletFixingDates() const override
const vector< Rate > & optionletStrikes(Size i) const override
const Date & referenceDate() const override
const vector< Time > & optionletFixingTimes() const override
const vector< Volatility > & optionletVolatilities(Size i) const override
VolatilityType volatilityType() const override
vector< vector< Volatility > > optionletVolatilities_
const Calendar & calendar() const override
const DayCounter & dayCounter() const override
const vector< Rate > & atmOptionletRates() const override
BusinessDayConvention businessDayConvention() const override
vector< vector< Rate > > optionletStrikes_
abstract class for optionlet surface with fixed reference date
vector< Real > strikes