quantlib.termstructures.yields.flat_forward.FlatForward¶
- class FlatForward(Date reference_date=None, forward=None, DayCounter daycounter=None, int settlement_days=0, Calendar calendar=None, Compounding compounding=Compounding.Continuous, Frequency frequency=Annual)¶
Bases:
YieldTermStructure
Flat intereste-rate curve
- Parameters:
refererence_date (quantlib.time.date.Date or None) – Reference date used by the curve. If None, the user must provide the settlement days.
forward (quantlib.quote.Quote or float) – The forward value used by the curve.
daycounter (quantlib.time.daycounter.DayCounter) – The day counter used by the curve.
settlement_days (int) – The settlement days used by this curve. If a reference date is given, this parameter is not used.
calendar (quantlib.time.calendar.Calendar) – The calendar used by the curve if created with the settlement days.
compounding (int (default: Continuous)) – The type of compounding used by this curve.
frequency (int (default: Annual)) – The frequency used by this curve.
- __init__(*args, **kwargs)¶
Methods
__init__
(*args, **kwargs)discount
(self, value, bool extrapolate=False)forward_rate
(self, d1, d2, ...)Returns the forward interest rate between two dates or times.
link_to
(self, YieldTermStructure structure, ...)time_from_reference
(self, Date dt)zero_rate
(self, d, ...)Returns the implied zero-yield rate for the given date.
Attributes
day_counter
extrapolation
max_date
max_time
reference_date
settlement_days