30 return freq ==
Monthly ? Date(1, month, year) :
31 Date::nthWeekday(3,
Wednesday, month, year);
38 Date
d = getSofrStart(month, year, freq) + Period(freq);
49 const Date& valueDate,
51 const Date& maturityDate,
52 const ext::shared_ptr<OvernightIndex>& overnightIndex,
56 ext::shared_ptr<OvernightIndex> index =
58 future_ = ext::make_shared<OvernightIndexFuture>(
73 bool observer =
false;
90 return future_->convexityAdjustment();
101 getSofrStart(referenceMonth, referenceYear, referenceFreq),
102 getSofrEnd(referenceMonth, referenceYear, referenceFreq),
103 ext::make_shared<
Sofr>(),
107 "only monthly and quarterly SOFR futures accepted");
112 Month referenceMonth,
115 Real convexityAdjustment)
118 getSofrStart(referenceMonth, referenceYear, referenceFreq),
119 getSofrEnd(referenceMonth, referenceYear, referenceFreq),
120 ext::make_shared<
Sofr>(),
124 "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 nthWeekday(Size n, Weekday w, Month m, Year y)
n-th given weekday in the given month and year
Shared handle to an observable.
void registerWithObservables(const ext::shared_ptr< Observer > &)
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.
Visitor for a specific class
virtual void visit(T &)=0
Interest-rate term structure.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Frequency
Frequency of events.
@ Quarterly
every third month
empty deleter for shared_ptr
Overnight Index Future bootstrap helper.
ext::shared_ptr< BlackVolTermStructure > v