23#ifndef quantext_price_term_structure_adapter_hpp
24#define quantext_price_term_structure_adapter_hpp
26#include <ql/patterns/lazyobject.hpp>
27#include <ql/quote.hpp>
28#include <ql/termstructures/yieldtermstructure.hpp>
29#include <ql/time/calendars/nullcalendar.hpp>
56 const QuantLib::ext::shared_ptr<QuantLib::YieldTermStructure>&
discount,
58 const QuantLib::Calendar&
spotCalendar = QuantLib::NullCalendar());
62 const QuantLib::ext::shared_ptr<QuantLib::YieldTermStructure>&
discount,
63 const QuantLib::Handle<QuantLib::Quote>& spotQuote);
67 QuantLib::Date
maxDate()
const override;
69 QuantLib::DayCounter
dayCounter()
const override;
74 const QuantLib::ext::shared_ptr<PriceTermStructure>&
priceCurve()
const;
75 const QuantLib::ext::shared_ptr<QuantLib::YieldTermStructure>&
discount()
const;
83 QuantLib::DiscountFactor
discountImpl(QuantLib::Time t)
const override;
88 QuantLib::ext::shared_ptr<QuantLib::YieldTermStructure>
discount_;
Adapter class for turning a PriceTermStructure in to a YieldTermStructure.
QuantLib::Calendar spotCalendar_
QuantLib::Natural spotDays() const
const QuantLib::Calendar & spotCalendar() const
QuantLib::ext::shared_ptr< PriceTermStructure > priceCurve_
PriceTermStructureAdapter(const QuantLib::ext::shared_ptr< PriceTermStructure > &priceCurve, const QuantLib::ext::shared_ptr< QuantLib::YieldTermStructure > &discount, QuantLib::Natural spotDays=0, const QuantLib::Calendar &spotCalendar=QuantLib::NullCalendar())
QuantLib::ext::shared_ptr< QuantLib::YieldTermStructure > discount_
const QuantLib::ext::shared_ptr< QuantLib::YieldTermStructure > & discount() const
const QuantLib::Date & referenceDate() const override
QuantLib::DayCounter dayCounter() const override
const QuantLib::ext::shared_ptr< PriceTermStructure > & priceCurve() const
QuantLib::Date maxDate() const override
QuantLib::Natural spotDays_
PriceTermStructureAdapter(const QuantLib::ext::shared_ptr< PriceTermStructure > &priceCurve, const QuantLib::ext::shared_ptr< QuantLib::YieldTermStructure > &discount, const QuantLib::Handle< QuantLib::Quote > &spotQuote)
QuantLib::DiscountFactor discountImpl(QuantLib::Time t) const override
QuantLib::Handle< QuantLib::Quote > spotQuote_
Term structure of prices.