Class YieldCurve

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class YieldCurve : public virtual otyca::TermStructure

Represents a yield curve, modeling the relationship between term and interest rates.

Inherits from the TermStructure base class and provides methods to compute discount and growth factors based on the term rate.

Subclassed by otyca::PieceWiseYieldCurve

Public Functions

inline double discount_factor(double t) const

Computes the discount factor for a given time to maturity.

The discount factor is calculated using the formula: D(t) = exp(-r(t) * t) where r(t) is the term rate at time t.

Parameters:

t – Time to maturity.

Returns:

The discount factor.

inline double growth_factor(double t) const

Computes the growth factor for a given time to maturity.

The growth factor is calculated using the formula: G(t) = exp(r(t) * t) where r(t) is the term rate at time t.

Parameters:

t – Time to maturity.

Returns:

The growth factor.