DynamicNelsonSiegelResult.slope#

property DynamicNelsonSiegelResult.slope: NDArray[float64][source]#

The smoothed slope factor, (nobs,).

In this parameterization the slope loading is one at the short end and zero at the long end, so a negative slope is an upward-sloping curve.

Example

>>> import numpy as np
>>> paths = np.column_stack([np.zeros(30), np.full(30, -1.5), np.zeros(30)])
>>> res = DynamicNelsonSiegelResult(
...     panel=np.zeros((30, 4)), maturities=np.array([1.0, 2.0, 5.0, 10.0]),
...     decay=0.6, decay_fixed=True, mu=np.zeros(3), ar=np.full(3, 0.9),
...     state_innovation_cov=np.eye(3), measurement_var=np.full(4, 0.01),
...     factors=paths, factor_cov=np.tile(np.eye(3), (30, 1, 1)),
...     llf=0.0, nobs=30, n_params=16.0,
... )
>>> res.slope.shape, float(res.slope[0])
((30,), -1.5)