#include <qle/termstructures/spreadedinflationcurve.hpp>
Definition at line 35 of file spreadedinflationcurve.hpp.
◆ SpreadedZeroInflationCurve()
SpreadedZeroInflationCurve |
( |
const Handle< ZeroInflationTermStructure > & |
referenceCurve, |
|
|
const std::vector< Time > & |
times, |
|
|
const std::vector< Handle< Quote > > & |
quotes |
|
) |
| |
times should be consistent with reference ts day counter
Definition at line 24 of file spreadedinflationcurve.cpp.
27 : ZeroInflationTermStructure(referenceCurve->dayCounter(), referenceCurve->baseRate(),
28 referenceCurve->observationLag(), referenceCurve->frequency(),
29 referenceCurve->seasonality()),
31 QL_REQUIRE(
times_.size() > 1,
"SpreadedZeroInflationCurve: at least two times required");
32 QL_REQUIRE(
times_.size() == quotes.size(),
33 "SpreadedZeroInflationCurve: size of time and quote vectors do not match");
34 for (Size i = 0; i < quotes.size(); ++i) {
36 }
38 QuantLib::ext::make_shared<LinearInterpolation>(
times_.begin(),
times_.end(),
data_.begin()));
41}
std::vector< Time > times_
std::vector< Handle< Quote > > quotes_
Handle< ZeroInflationTermStructure > referenceCurve_
QuantLib::ext::shared_ptr< Interpolation > interpolation_
std::vector< Real > data_
◆ maxDate()
◆ update()
◆ referenceDate()
const Date & referenceDate |
( |
| ) |
const |
|
override |
◆ calendar()
Calendar calendar |
( |
| ) |
const |
|
override |
◆ settlementDays()
Natural settlementDays |
( |
| ) |
const |
|
override |
◆ baseDate()
◆ performCalculations()
void performCalculations |
( |
| ) |
const |
|
overrideprotected |
Definition at line 58 of file spreadedinflationcurve.cpp.
58 {
59 for (Size i = 0; i <
times_.size(); ++i) {
60 QL_REQUIRE(!
quotes_[i].empty(),
"SpreadedZeroInflationCurve: quote at index " << i <<
" is empty");
62 }
64}
◆ zeroRateImpl()
Real zeroRateImpl |
( |
Time |
t | ) |
const |
|
overrideprotected |
◆ referenceCurve_
Handle<ZeroInflationTermStructure> referenceCurve_ |
|
private |
◆ times_
◆ quotes_
std::vector<Handle<Quote> > quotes_ |
|
private |
◆ data_
◆ interpolation_
QuantLib::ext::shared_ptr<Interpolation> interpolation_ |
|
private |