Spreaded Price term structure.
More...
#include <qle/termstructures/spreadedpricetermstructure.hpp>
|
| | SpreadedPriceTermStructure (const QuantLib::Handle< PriceTermStructure > &referenceCurve, const std::vector< QuantLib::Real > ×, const std::vector< QuantLib::Handle< QuantLib::Quote > > &priceSpreads) |
| | times should be consistent with reference curve day counter More...
|
| |
| QuantLib::Date | maxDate () const override |
| |
| void | update () override |
| |
| const QuantLib::Date & | referenceDate () const override |
| |
| QuantLib::Calendar | calendar () const override |
| |
| QuantLib::Natural | settlementDays () const override |
| |
| QuantLib::Time | minTime () const override |
| | The minimum time for which the curve can return values. More...
|
| |
| const QuantLib::Currency & | currency () const override |
| | The currency in which prices are expressed. More...
|
| |
| std::vector< QuantLib::Date > | pillarDates () const override |
| | The pillar dates for the PriceTermStructure. More...
|
| |
| | PriceTermStructure (const QuantLib::DayCounter &dc=QuantLib::DayCounter()) |
| |
| | PriceTermStructure (const QuantLib::Date &referenceDate, const QuantLib::Calendar &cal=QuantLib::Calendar(), const QuantLib::DayCounter &dc=QuantLib::DayCounter()) |
| |
| | PriceTermStructure (QuantLib::Natural settlementDays, const QuantLib::Calendar &cal, const QuantLib::DayCounter &dc=QuantLib::DayCounter()) |
| |
| QuantLib::Real | price (QuantLib::Time t, bool extrapolate=false) const |
| |
| QuantLib::Real | price (const QuantLib::Date &d, bool extrapolate=false) const |
| |
| void | update () override |
| |
|
| void | checkRange (QuantLib::Time t, bool extrapolate) const |
| | Extra time range check for minimum time, then calls TermStructure::checkRange. More...
|
| |
Spreaded Price term structure.
Definition at line 33 of file spreadedpricetermstructure.hpp.
◆ SpreadedPriceTermStructure()
times should be consistent with reference curve day counter
Definition at line 27 of file spreadedpricetermstructure.cpp.
32 QL_REQUIRE(
times_.size() > 1,
"SpreadedPriceTermStructure: at least two times required");
34 "SpreadedPriceTermStructure: size of time and quote vectors do not match");
35 QL_REQUIRE(
times_[0] == 0.0,
"SpreadedPriceTermStructure: first time must be 0, got " <<
times_[0]);
37 registerWith(q);
39 QuantLib::ext::make_shared<LinearInterpolation>(
times_.begin(),
times_.end(),
data_.begin()));
42}
PriceTermStructure(const QuantLib::DayCounter &dc=QuantLib::DayCounter())
QuantLib::ext::shared_ptr< QuantLib::Interpolation > interpolation_
std::vector< QuantLib::Handle< QuantLib::Quote > > priceSpreads_
std::vector< QuantLib::Real > times_
QuantLib::Handle< PriceTermStructure > referenceCurve_
std::vector< QuantLib::Real > data_
◆ maxDate()
◆ update()
◆ referenceDate()
| const Date & referenceDate |
( |
| ) |
const |
|
override |
◆ calendar()
| Calendar calendar |
( |
| ) |
const |
|
override |
◆ settlementDays()
| Natural settlementDays |
( |
| ) |
const |
|
override |
◆ minTime()
| QuantLib::Time minTime |
( |
| ) |
const |
|
overridevirtual |
◆ currency()
| const QuantLib::Currency & currency |
( |
| ) |
const |
|
overridevirtual |
◆ pillarDates()
| std::vector< QuantLib::Date > pillarDates |
( |
| ) |
const |
|
overridevirtual |
◆ performCalculations()
| void performCalculations |
( |
| ) |
const |
|
overrideprivate |
◆ priceImpl()
| QuantLib::Real priceImpl |
( |
QuantLib::Time |
| ) |
const |
|
overrideprivatevirtual |
◆ referenceCurve_
◆ times_
| std::vector<QuantLib::Real> times_ |
|
mutableprivate |
◆ priceSpreads_
| std::vector<QuantLib::Handle<QuantLib::Quote> > priceSpreads_ |
|
private |
◆ data_
| std::vector<QuantLib::Real> data_ |
|
mutableprivate |
◆ interpolation_
| QuantLib::ext::shared_ptr<QuantLib::Interpolation> interpolation_ |
|
private |