Class InterestRateFuture
Defined in File interest_rate_future.hpp
Inheritance Relationships
Base Type
public otyca::Security
(Class Security)
Class Documentation
-
class InterestRateFuture : public otyca::Security
Represents an interest rate futures contract.
The InterestRateFuture class models a futures contract on short-term interest rates. It provides methods to access the expiration date and to calculate the implied interest rate based on the futures price.
Public Functions
-
inline InterestRateFuture(const boost::gregorian::date &expiration)
Constructs an InterestRateFuture with a specified expiration date.
- Parameters:
expiration – Expiration date of the futures contract.
-
inline InterestRateFuture(const boost::gregorian::date &expiration, double bid, double ask)
Constructs an InterestRateFuture with specified expiration date, bid, and ask prices.
- Parameters:
expiration – Expiration date of the futures contract.
bid – Bid price.
ask – Ask price.
-
inline double rate()
Calculates and returns the implied interest rate from the futures price.
The implied rate is calculated as (100 - weighted_mid()) / 100.
- Returns:
Implied interest rate.
-
inline boost::gregorian::date get_expiration() const
Returns the expiration date of the futures contract.
- Returns:
Expiration date.
-
inline void set_expiration(boost::gregorian::date expiration)
Sets the expiration date of the futures contract.
- Parameters:
expiration – New expiration date.
Friends
-
friend std::ostream &operator<<(std::ostream &out, const InterestRateFuture &point)
Outputs the InterestRateFuture to a stream.
-
inline InterestRateFuture(const boost::gregorian::date &expiration)