quantlib.termstructures.yields.flat_forward.

FlatForward

class FlatForward(Date reference_date=None, forward=None, DayCounter daycounter=None, Natural settlement_days=0, Calendar calendar=None, Compounding compounding=Compounding.Continuous, Frequency frequency=Annual)

Bases: YieldTermStructure

Flat interest-rate curve

Parameters:
refererence_dateDate or None

Reference date used by the curve. If None, the user must provide the settlement days.

forwardQuote | float

The forward value used by the curve.

daycounterDayCounter

The day counter used by the curve.

settlement_daysint

The settlement days used by this curve. If a reference date is given, this parameter is not used.

calendarCalendar

The calendar used by the curve if created with the settlement days.

compoundingCompounding, default Compounding.Continuous

The type of compounding used by this curve.

frequencyFrequency, default Annual

The frequency used by this curve.

Attributes:
day_counter
extrapolation
max_date
max_time
reference_date
settlement_days

Methods

discount(self, value, bool extrapolate=False)

forward_rate(self, d1, d2, ...)

Returns the forward interest rate between two dates or times.

time_from_reference(self, Date dt)

zero_rate(self, d, ...)

Returns the implied zero-yield rate for the given date.