quantlib.termstructures.yields.piecewise_yield_curve.
DiscountBackwardFlatPiecewiseYieldCurve¶
- class DiscountBackwardFlatPiecewiseYieldCurve(Natural settlement_days, Calendar calendar, list helpers, DayCounter daycounter, BackwardFlat i=BackwardFlat(), Real accuracy=1e-12)¶
Bases:
YieldTermStructure- Attributes:
calendarCalendar: calendardatalist of curve data
dateslist of curve dates
day_counterDayCounter: day counter- extrapolation
max_dateDate: the latest date for which the curve can return valuesmax_timeTime: the latest time for which the curve can return values- nodes
reference_dateDate: the date at which discount = 1.0 and/or variance = 0.0settlement_daysint: number of settlement days used for reference date calculationtimeslist of curve times
- trait
Methods
discount(self, value, bool extrapolate=False)forward_rate(self, d1, d2, ...)Returns the forward interest rate between two dates or times.
from_reference_date(cls, ...)Fixed reference_date yield curve
time_from_reference(self, Date dt)date/time conversion
zero_rate(self, d, ...)Returns the implied zero-yield rate for the given date.