You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had similar issues with nss (SVD did not converge in Linear Least Squares) but tried adding bounds (there should be two bounds for NSS) and it works now! Thanks a lot for this!
Description
Tau gets negative in optimization-> produces massive values for factors, least squares can't handle
maturities=np.array([ 0.25 0.5 1. 2. 3. 5. 10. 30. ])
yields = np.array([ 7.80846154, 8.16153846, 8.54207692, 9.44315385, 9.78792308,
10.31846154, 10.77930769, 10.92284615])
I recommend supplying bounds in calibrate_ns_ols:
opt_res = minimize(errorfn_ns_ols, x0=tau0, args=(t, y), bounds=((0.01,None),))
The text was updated successfully, but these errors were encountered: