28 const QuantLib::ext::shared_ptr<CrossAssetModel>& model, Size index)
29 : ZeroInflationModelTermStructure(model, index) {}
31QL_DEPRECATED_DISABLE_WARNING
32DkImpliedZeroInflationTermStructure::DkImpliedZeroInflationTermStructure(
33 const QuantLib::ext::shared_ptr<CrossAssetModel>& model, Size index,
bool indexIsInterpolated)
34 : ZeroInflationModelTermStructure(model, index, indexIsInterpolated) {}
35QL_DEPRECATED_ENABLE_WARNING
37Real DkImpliedZeroInflationTermStructure::zeroRateImpl(Time t)
const {
38 QL_REQUIRE(t >= 0.0,
"DkImpliedZeroInflationTermStructure::zeroRateImpl: negative time (" << t <<
") given");
39 auto p = model_->infdkI(index_, relativeTime_, relativeTime_ + t, state_[0], state_[1]);
40 return std::pow(p.second, 1 / t) - 1;
43void DkImpliedZeroInflationTermStructure::checkState()
const {
45 QL_REQUIRE(state_.size() == 2,
"DkImpliedZeroInflationTermStructure: expected state to have " <<
46 "two elements but got " << state_.size());
DkImpliedZeroInflationTermStructure(const QuantLib::ext::shared_ptr< CrossAssetModel > &model, QuantLib::Size index)
zero inflation term structure implied by a Dodgson Kainth (DK) model