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
{{ message }}
Repository navigation
How to generate whole yield curve term structure tenors results use Hull White model? #13
I found out that ndarray output only contained the very first tenor(3M tenor), may I ask how I can get the whole term tenors generated rates, like 9M, 1Y, 2Y, 3Y,....
Activity
montrixdev commentedon Nov 6, 2023
hi, jojogh
I think your question is about the calculation of SpotRates (9M, 1Y, 2Y, 3Y) using the short rate.
it's formula -> T-maturity discount bond
to add SpotRate associated hw1f model,
define calcs for 9m, 1y, 2y, 3y
hw1f_spot9m = hw1f.spot('hw1f_spot9m', maturityTenor=mx.Period(9, mx.Months), compounding=mx.Continuous)
hw1f_spot1y = hw1f.spot('hw1f_spot1y', maturityTenor=mx.Period(1, mx.Years), compounding=mx.Continuous)
hw1f_spot2y = hw1f.spot('hw1f_spot2y', maturityTenor=mx.Period(2, mx.Years), compounding=mx.Continuous)
hw1f_spot3y = hw1f.spot('hw1f_spot3y', maturityTenor=mx.Period(3, mx.Years), compounding=mx.Continuous)
calcs = [hw1f_spot9m, hw1f_spot1y, hw1f_spot2y, hw1f_spot3y]
update generation code ( add calcs to parameter )
results2 = xen.generate(models=models, calcs=calcs, corr=corrMatrix, timegrid=timegrid1,
rsg=sobol_rsg, filename=filename2, isMomentMatching=False)
I hope my answer is helpful.
thanks.
jojogh commentedon Nov 7, 2023
Many thanks!!!