miabrahams / PricingTermStructure

Pricing the Term Structure with Linear Regressions
35 stars 22 forks source link

Estimating term premia #2

Open urskabele opened 5 years ago

urskabele commented 5 years ago

I have written a code in R and the yields fit very nicely. Once I set the lambda parameters to zero, recalculate As and Bs with recursion and calculate the risk neutral yields, those become way too high (up to 300). What am I missing?

Thanks

ghost commented 5 years ago

Hi, I came here for a similar reason - I have also written the code in R that smoothly replicates the original ACM paper - up to the neutral yield calculation part. In my case the neutral rates are a bit too low (around one p.p. or so), and hence the TP is higher than compared to ACM. Did you manage to solve the problem?

muntumdwara commented 5 years ago

I also adjusted the scaling of the rawYields=rawYields/100

I run separate line for the Risk neutral yield . The issue is that the TP does not reconcile with the daily published ACM TP. What am i missing

Run Risk neutral bond pricing recursions

C = np.zeros((1, n_maturities)) D = np.zeros((K, n_maturities))

lambdaA=np.zeros((5,1)) lambdaB=np.zeros((5,5))

delta = rf.T @ np.linalg.pinv(np.vstack((np.ones((1, t)), X[:, 0:-1]))) delta0 = delta[[0], [0]] delta1 = delta[[0], 1:]

C[0, 0] = - delta0 D[:, 0] = - delta1

for i in range(0, n_maturities - 1): C[0, i+1] = C[0, i] + D[:, i].T @ (mu - lambdaA) + 1/2 * (D[:, i].T @ Sigma @ D[:, i] + sigmasq_ret) - delta0 D[:, i+1] = D[:, i] @ (phi - lambdaB) - delta1

robyvita commented 4 years ago

I have the same problem with risk neutral, anybody has the solution?

fsuarezb commented 4 years ago

same problem, still, anybody found the solution?

maximilianmlr commented 3 years ago

I still have the same problem both in the Python and R implementation. My term premium seems to be to high compared with the published ACM and eventually also the Fed Term Premium (which is calculated by the Kim & Wright 3 Factor model).

I also calculated the NSS parameters on a daily base by myself. The model delivers similar results, but the term premium is to high again. I find it very hard to find a solution for this problem.