23#ifndef quantext_price_term_structure_hpp
24#define quantext_price_term_structure_hpp
26#include <ql/currency.hpp>
27#include <ql/math/comparison.hpp>
28#include <ql/quote.hpp>
29#include <ql/termstructure.hpp>
44 PriceTermStructure(
const QuantLib::Date& referenceDate,
const QuantLib::Calendar& cal = QuantLib::Calendar(),
45 const QuantLib::DayCounter& dc = QuantLib::DayCounter());
47 const QuantLib::DayCounter& dc = QuantLib::DayCounter());
52 QuantLib::Real
price(QuantLib::Time t,
bool extrapolate =
false)
const;
53 QuantLib::Real
price(
const QuantLib::Date& d,
bool extrapolate =
false)
const;
62 virtual QuantLib::Time
minTime()
const;
65 virtual const QuantLib::Currency&
currency()
const = 0;
78 virtual QuantLib::Real
priceImpl(QuantLib::Time)
const = 0;
82 void checkRange(QuantLib::Time t,
bool extrapolate)
const;
93 QuantLib::Real
value()
const override;
Helper class so that the spot price can be pulled from the price curve each time the spot price is re...
QuantLib::Real value() const override
QuantLib::Handle< PriceTermStructure > priceTs_
bool isValid() const override
QuantLib::Real price(const QuantLib::Date &d, bool extrapolate=false) const
virtual std::vector< QuantLib::Date > pillarDates() const =0
The pillar dates for the PriceTermStructure.
virtual QuantLib::Time minTime() const
The minimum time for which the curve can return values.
void checkRange(QuantLib::Time t, bool extrapolate) const
Extra time range check for minimum time, then calls TermStructure::checkRange.
virtual QuantLib::Real priceImpl(QuantLib::Time) const =0
Price calculation.
QuantLib::Real price(QuantLib::Time t, bool extrapolate=false) const
PriceTermStructure(QuantLib::Natural settlementDays, const QuantLib::Calendar &cal, const QuantLib::DayCounter &dc=QuantLib::DayCounter())
virtual const QuantLib::Currency & currency() const =0
The currency in which prices are expressed.
PriceTermStructure(const QuantLib::Date &referenceDate, const QuantLib::Calendar &cal=QuantLib::Calendar(), const QuantLib::DayCounter &dc=QuantLib::DayCounter())