24#ifndef quantlib_interest_rate_hpp
25#define quantlib_interest_rate_hpp
80 "later than d2 (" << d2 <<
")");
101 const Date& refEnd =
Date())
const {
104 "later than d2 (" << d2 <<
")");
139 "later than d2 (" << d2 <<
")");
171 const Date& refEnd =
Date())
const {
174 "later than d2 (" << d2 <<
")");
Actual/365 (Fixed) day counter.
Time yearFraction(const Date &, const Date &, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date()) const
Returns the period between two dates as a fraction of year.
Concrete interest rate class.
const DayCounter & dayCounter() const
Compounding compounding() const
static InterestRate impliedRate(Real compound, const DayCounter &resultDC, Compounding comp, Frequency freq, Time t)
implied interest rate for a given compound factor at a given time.
InterestRate equivalentRate(const DayCounter &resultDC, Compounding comp, Frequency freq, Date d1, Date d2, const Date &refStart=Date(), const Date &refEnd=Date()) const
equivalent rate for a compounding period between two dates
static InterestRate impliedRate(Real compound, const DayCounter &resultDC, Compounding comp, Frequency freq, const Date &d1, const Date &d2, const Date &refStart=Date(), const Date &refEnd=Date())
implied rate for a given compound factor between two dates.
DiscountFactor discountFactor(Time t) const
discount factor implied by the rate compounded at time t.
InterestRate()
Default constructor returning a null interest rate.
Real compoundFactor(Time t) const
compound factor implied by the rate compounded at time t.
Real compoundFactor(const Date &d1, const Date &d2, const Date &refStart=Date(), const Date &refEnd=Date()) const
compound factor implied by the rate compounded between two dates
DiscountFactor discountFactor(const Date &d1, const Date &d2, const Date &refStart=Date(), const Date &refEnd=Date()) const
discount factor implied by the rate compounded between two dates
Frequency frequency() const
InterestRate equivalentRate(Compounding comp, Frequency freq, Time t) const
equivalent interest rate for a compounding period t.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Frequency
Frequency of events.
@ NoFrequency
null frequency
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates
QL_INTEGER Integer
integer number
Compounding
Interest rate coumpounding rule.
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)
ext::shared_ptr< YieldTermStructure > r