33 const std::vector<Period>& optionTenors,
34 const std::vector<Rate>& strikes,
38 nOptionTenors_(optionTenors.size()),
39 optionTenors_(optionTenors),
40 optionDates_(nOptionTenors_),
41 optionTimes_(nOptionTenors_),
42 nStrikes_(strikes.size()),
45 vols_(vols.size(), vols[0].size())
51 io::ordinal(i+1) <<
" row of vol handles has size " <<
62 const Date& settlementDate,
65 const std::vector<Period>& optionTenors,
66 const std::vector<Rate>& strikes,
70 nOptionTenors_(optionTenors.size()),
71 optionTenors_(optionTenors),
72 optionDates_(nOptionTenors_),
73 optionTimes_(nOptionTenors_),
74 nStrikes_(strikes.size()),
77 vols_(vols.size(), vols[0].size())
83 io::ordinal(i+1) <<
" row of vol handles has size " <<
94 const Date& settlementDate,
97 const std::vector<Period>& optionTenors,
98 const std::vector<Rate>& strikes,
102 nOptionTenors_(optionTenors.size()),
103 optionTenors_(optionTenors),
104 optionDates_(nOptionTenors_),
105 optionTimes_(nOptionTenors_),
106 nStrikes_(strikes.size()),
108 volHandles_(vols.rows()),
128 const std::vector<Period>& optionTenors,
129 const std::vector<Rate>& strikes,
133 nOptionTenors_(optionTenors.size()),
134 optionTenors_(optionTenors),
135 optionDates_(nOptionTenors_),
136 optionTimes_(nOptionTenors_),
137 nStrikes_(strikes.size()),
139 volHandles_(vols.rows()),
158 "mismatch between number of option tenors (" <<
165 "non increasing option tenor: " <<
io::ordinal(i) <<
170 "mismatch between strikes(" <<
strikes_.size() <<
bicubic spline interpolation between discrete points
Cap/floor smile volatility surface.
bicubic-spline interpolation between discrete points
std::vector< Date > optionDates_
void registerWithMarketData()
void performCalculations() const override
std::vector< std::vector< Handle< Quote > > > volHandles_
Interpolation2D interpolation_
std::vector< Time > optionTimes_
CapFloorTermVolSurface(Natural settlementDays, const Calendar &calendar, BusinessDayConvention bdc, const std::vector< Period > &optionTenors, const std::vector< Rate > &strikes, const std::vector< std::vector< Handle< Quote > > > &, const DayCounter &dc=Actual365Fixed())
floating reference date, floating market data
std::vector< Period > optionTenors_
void initializeOptionDatesAndTimes() const
std::vector< Rate > strikes_
Cap/floor term-volatility structure.
Shared handle to an observable.
Matrix used in linear algebra.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
DateProxy & evaluationDate()
the date at which pricing is to be performed.
market element returning a stored value
static Settings & instance()
access to the unique instance
Time timeFromReference(const Date &date) const
date/time conversion
Date optionDateFromTenor(const Period &) const
period/date conversion
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
BusinessDayConvention
Business Day conventions.
detail::percent_holder rate(Rate)
output rates and spreads as percentages
detail::ordinal_holder ordinal(Size)
outputs naturals as 1st, 2nd, 3rd...
unsigned QL_INTEGER Natural
positive integer
std::size_t Size
size of a container