quantlib.termstructures.yields.piecewise_yield_curve.DiscountBackwardFlatPiecewiseYieldCurve.forward_rate¶
- DiscountBackwardFlatPiecewiseYieldCurve.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
Date
or Time. The start date or time used to calculate the forward rate.
- d2
Date
or 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