21#include <ql/termstructures/yield/overnightindexfutureratehelper.hpp>
22#include <ql/indexes/ibor/sofr.hpp>
23#include <ql/utilities/null_deleter.hpp>
41 Date d = getValidSofrStart(month, year, freq) + Period(freq);
52 const Date& valueDate,
54 const Date& maturityDate,
55 const ext::shared_ptr<OvernightIndex>& overnightIndex,
59 ext::shared_ptr<Payoff> payoff;
60 ext::shared_ptr<OvernightIndex> index =
62 future_ = ext::make_shared<OvernightIndexFuture>(
76 bool observer =
false;
78 ext::shared_ptr<YieldTermStructure> temp(t,
null_deleter());
93 return future_->convexityAdjustment();
104 getValidSofrStart(referenceMonth, referenceYear, referenceFreq),
105 getValidSofrEnd(referenceMonth, referenceYear, referenceFreq),
106 ext::make_shared<
Sofr>(),
110 "only monthly and quarterly SOFR futures accepted");
115 Month referenceMonth,
118 Real convexityAdjustment)
121 getValidSofrStart(referenceMonth, referenceYear, referenceFreq),
122 getValidSofrEnd(referenceMonth, referenceYear, referenceFreq),
123 ext::make_shared<
Sofr>(),
127 "only monthly and quarterly SOFR futures accepted");
degenerate base class for the Acyclic Visitor pattern
Base helper class for bootstrapping.
virtual void accept(AcyclicVisitor &)
virtual Date maturityDate() const
instrument's maturity date
virtual void setTermStructure(TS *)
sets the term structure to be used for pricing
static Date endOfMonth(const Date &d)
last day of the month to which the given date belongs
static Date advance(const Date &d, Integer units, TimeUnit)
static Date nthWeekday(Size n, Weekday w, Month m, Year y)
n-th given weekday in the given month and year
Shared handle to an observable.
RateHelper for bootstrapping over overnight compounding futures.
void setTermStructure(YieldTermStructure *) override
RelinkableHandle< YieldTermStructure > termStructureHandle_
OvernightIndexFutureRateHelper(const Handle< Quote > &price, const Date &valueDate, const Date &maturityDate, const ext::shared_ptr< OvernightIndex > &overnightIndex, const Handle< Quote > &convexityAdjustment={}, RateAveraging::Type averagingMethod=RateAveraging::Compound)
void accept(AcyclicVisitor &) override
Real impliedQuote() const override
ext::shared_ptr< OvernightIndexFuture > future_
Real convexityAdjustment() const
purely virtual base class for market observables
market element returning a stored value
SofrFutureRateHelper(const Handle< Quote > &price, Month referenceMonth, Year referenceYear, Frequency referenceFreq, const Handle< Quote > &convexityAdjustment={})
Sofr (Secured Overnight Financing Rate) index.
@ GovernmentBond
government-bond calendar
Visitor for a specific class
virtual void visit(T &)=0
Interest-rate term structure.
Frequency
Frequency of events.
@ Quarterly
every third month