QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OvernightIndexFuture Class Reference

#include <ql/instruments/overnightindexfuture.hpp>

+ Inheritance diagram for OvernightIndexFuture:
+ Collaboration diagram for OvernightIndexFuture:

Public Member Functions

 OvernightIndexFuture (ext::shared_ptr< OvernightIndex > overnightIndex, const Date &valueDate, const Date &maturityDate, Handle< Quote > convexityAdjustment=Handle< Quote >(), RateAveraging::Type averagingMethod=RateAveraging::Compound)
 
Real convexityAdjustment () const
 
bool isExpired () const override
 returns whether the instrument might have value greater than zero. More...
 
const ext::shared_ptr< OvernightIndex > & overnightIndex () const
 
Date valueDate () const
 
Date maturityDate () const
 
- Public Member Functions inherited from Instrument
 Instrument ()
 
Real NPV () const
 returns the net present value of the instrument. More...
 
Real errorEstimate () const
 returns the error estimate on the NPV when available. More...
 
const DatevaluationDate () const
 returns the date the net present value refers to. More...
 
template<typename T >
result (const std::string &tag) const
 returns any additional result returned by the pricing engine. More...
 
const std::map< std::string, ext::any > & additionalResults () const
 returns all additional result returned by the pricing engine. More...
 
void setPricingEngine (const ext::shared_ptr< PricingEngine > &)
 set the pricing engine to be used. More...
 
virtual void setupArguments (PricingEngine::arguments *) const
 
virtual void fetchResults (const PricingEngine::results *) const
 
- Public Member Functions inherited from LazyObject
 LazyObject ()
 
 ~LazyObject () override=default
 
void update () override
 
bool isCalculated () const
 
void forwardFirstNotificationOnly ()
 
void alwaysForwardNotifications ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Private Member Functions

void performCalculations () const override
 
Real rate () const
 
Real averagedRate () const
 
Real compoundedRate () const
 

Private Attributes

ext::shared_ptr< OvernightIndexovernightIndex_
 
Date valueDate_
 
Date maturityDate_
 
Handle< QuoteconvexityAdjustment_
 
RateAveraging::Type averagingMethod_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from Instrument
void calculate () const override
 
virtual void setupExpired () const
 
- Protected Member Functions inherited from LazyObject
- Protected Attributes inherited from Instrument
Real NPV_
 
Real errorEstimate_
 
Date valuationDate_
 
std::map< std::string, ext::any > additionalResults_
 
ext::shared_ptr< PricingEngineengine_
 
- Protected Attributes inherited from LazyObject
bool calculated_ = false
 
bool frozen_ = false
 
bool alwaysForward_
 

Detailed Description

Future on a compounded overnight index investment.

Compatible with SOFR futures and Sonia futures available on CME and ICE exchanges.

Definition at line 39 of file overnightindexfuture.hpp.

Constructor & Destructor Documentation

◆ OvernightIndexFuture()

OvernightIndexFuture ( ext::shared_ptr< OvernightIndex overnightIndex,
const Date valueDate,
const Date maturityDate,
Handle< Quote convexityAdjustment = Handle<Quote>(),
RateAveraging::Type  averagingMethod = RateAveraging::Compound 
)

Definition at line 28 of file overnightindexfuture.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ convexityAdjustment()

Real convexityAdjustment ( ) const

Definition at line 117 of file overnightindexfuture.cpp.

+ Here is the caller graph for this function:

◆ isExpired()

bool isExpired ( ) const
overridevirtual

returns whether the instrument might have value greater than zero.

Implements Instrument.

Definition at line 113 of file overnightindexfuture.cpp.

+ Here is the call graph for this function:

◆ overnightIndex()

const ext::shared_ptr< OvernightIndex > & overnightIndex ( ) const

Definition at line 50 of file overnightindexfuture.hpp.

◆ valueDate()

Date valueDate ( ) const

Definition at line 51 of file overnightindexfuture.hpp.

◆ maturityDate()

Date maturityDate ( ) const

Definition at line 52 of file overnightindexfuture.hpp.

◆ performCalculations()

void performCalculations ( ) const
overrideprivatevirtual

In case a pricing engine is not used, this method must be overridden to perform the actual calculations and set any needed results. In case a pricing engine is used, the default implementation can be used.

Reimplemented from Instrument.

Definition at line 121 of file overnightindexfuture.cpp.

+ Here is the call graph for this function:

◆ rate()

Real rate ( ) const
private

Definition at line 100 of file overnightindexfuture.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ averagedRate()

Real averagedRate ( ) const
private

Definition at line 40 of file overnightindexfuture.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compoundedRate()

Real compoundedRate ( ) const
private

Definition at line 66 of file overnightindexfuture.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ overnightIndex_

ext::shared_ptr<OvernightIndex> overnightIndex_
private

Definition at line 58 of file overnightindexfuture.hpp.

◆ valueDate_

Date valueDate_
private

Definition at line 59 of file overnightindexfuture.hpp.

◆ maturityDate_

Date maturityDate_
private

Definition at line 59 of file overnightindexfuture.hpp.

◆ convexityAdjustment_

Handle<Quote> convexityAdjustment_
private

Definition at line 60 of file overnightindexfuture.hpp.

◆ averagingMethod_

RateAveraging::Type averagingMethod_
private

Definition at line 61 of file overnightindexfuture.hpp.