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_date
Date
or None Reference date used by the curve. If None, the user must provide the settlement days.
- forward
Quote
| float The forward value used by the curve.
- daycounter
DayCounter
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.
- calendar
Calendar
The calendar used by the curve if created with the settlement days.
- compounding
Compounding
, default Compounding.Continuous The type of compounding used by this curve.
- frequency
Frequency
, default Annual The frequency used by this curve.
- refererence_date
- 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.