FinancePy

FinancePy API Reference

Nss Discount Curve

financepy.market.curves.nss_discount_curve

Classes

NSSDiscountCurve

NSSDiscountCurve(anchor_dt: financepy.utils.date.Date, beta_0: float, beta_1: float, beta_2: float, beta_3: float, tau_1: float, tau_2: float, curve_dc_type: financepy.utils.day_count.DayCountTypes = <DayCountTypes.ACT_365F: 7>) -> None
Inherits from: DiscountCurve
Implementation of Nelson-Siegel-Svensson parametrisation of the zero rate curve. The zero rate is assumed to be continuously compounded. This can be changed when calling for zero rates. A day count convention is needed to ensure that dates are converted to the correct time in years. The class inherits methods from DiscountCurve.

Methods

nss_cc_zero_rate

nss_cc_zero_rate(self, times: float | numpy.ndarray)
Calculation of zero rates given a single time or a numpy vector of times. This function can return a single zero rate or a vector of zero rates. The compounding frequency must be provided.

df_t

df_t(self, t: float | list | numpy.ndarray)
Return discount factors for scalar or vector times.

bump_parallel

bump_parallel(self, bump_size: float)
Adjust the continuously compounded forward rates by a perturbation upward equal to the bump size and return a curve object with this bumped curve. This is used for interest rate risk.
Generated automatically from the FinancePy source code. Do not edit this file manually.