TimeVaryingNelsonSiegelResult.loadings#
- TimeVaryingNelsonSiegelResult.loadings(t)[source]#
The
(p, 3)Nelson-Siegel loadings at datet’s smoothed decay.- Parameters:
t (
int) – Row of the panel (negative indexing allowed).- Return type:
- Returns:
The loading matrix at
decay[t].
Example
A faster decay at the last date pulls the slope loading down sooner across the same maturities:
>>> import numpy as np >>> res = TimeVaryingNelsonSiegelResult( ... panel=np.zeros((30, 4)), maturities=np.array([1.0, 2.0, 5.0, 10.0]), ... mu=np.zeros(3), ar=np.full(3, 0.9), state_innovation_cov=np.eye(3), ... measurement_var=np.full(4, 0.01), log_decay_mean=np.log(0.6), ... decay_ar=0.9, decay_sd=0.1, factors=np.zeros((30, 3)), ... factor_cov=np.tile(np.eye(3), (30, 1, 1)), ... log_decay=np.linspace(np.log(0.4), np.log(1.0), 30), ... log_decay_std=np.full(30, 0.1), llf=0.0, filter="unscented", nobs=30, ... n_params=19.0, ... ) >>> res.loadings(0).shape, bool(np.all(res.loadings(-1)[:, 1] < res.loadings(0)[:, 1])) ((4, 3), True)