quantlib.termstructures.yields.piecewise_yield_curve.DiscountLinearPiecewiseYieldCurve¶
- class DiscountLinearPiecewiseYieldCurve(Natural settlement_days, Calendar calendar, list helpers, DayCounter daycounter, Linear i=Linear(), Real accuracy=1e-12)¶
Bases:
YieldTermStructure
- __init__()¶
Floating yield curve
updating evaluation_date in Settings will change the reference_date.
- Parameters:
settlement_days (int) – The settlement date
calendar (quantlib.time.calendar.Calendar) – curve’s calendar
helpers (list of quantlib.termstructures.rate_helpers.RateHelper) – a list of rate helpers used to create the curve
day_counter (quantlib.time.day_counter.DayCounter) – the day counter used by this curve
accuracy (double (default 1e-12)) – the tolerance
Methods
Floating yield curve
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
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
list of curve data
list of curve dates
day_counter
extrapolation
max_date
max_time
nodes
reference_date
settlement_days
list of curve times
trait
- data¶
list of curve data
- dates¶
list of curve dates
- classmethod from_reference_date(cls, Date reference_date, list helpers, DayCounter daycounter, Linear i=Linear(), Real accuracy=1e-12)¶
Fixed reference_date yield curve
- Parameters:
reference_date (quantlib.time.date.Date) – The curve’s reference date
calendar (quantlib.time.calendar.Calendar) – curve’s calendar
helpers (list of quantlib.termstructures.rate_helpers.RateHelper) – a list of rate helpers used to create the curve
day_counter (quantlib.time.day_counter.DayCounter) – the day counter used by this curve
accuracy (double (default 1e-12)) – the tolerance
- times¶
list of curve times