quantlib.termstructures.yields.discount_curve.DiscountCurve.forward_rate¶
- DiscountCurve.forward_rate(self, d1, d2, DayCounter day_counter=None, Compounding compounding=Compounding.Continuous, int frequency=Annual, bool extrapolate=False)¶
Returns the forward interest rate between two dates or times.
In the former case, times are calculated as fractions of year from the reference date. If both dates (times) are equal the instantaneous forward rate is returned.
- Parameters:
- d1
Dateor Time. The start date or time used to calculate the forward rate.
- d2
Dateor Time orPeriod The end date, time or period used to calculate the forward rate.
- day_counter
DayCounter The day counter used to compute the time.
- compoundingint
The compounding as defined in quantlib.compounding
- frequencyint
A frequency as defined in
quantlib.time.date- extrapolatebool, optional
Default to False
- d1