# Term structure of interest rate and yield curve?

Hi all,

I have a question regarding the computation of the yield curve or the term structure of interest rates using Dynare solution.

Typically, the interest rate of a one-period zero coupon bond can be computed as:

1/exp(r) = exp(m(+1));

where m is the stochastic discount factor. If we want to compute the interest rate of a two-period zero coupon bond, it can be computed as:

M2 = m(+1);
1/exp(r2*2) = exp(m(+1)+M2(+1));

However, this gives r2 = r, despite the model being solved using 3rd order in Dynare, which should result in a term structure of interest rates.

My question is: is it possible to compute the yield curve or the term structure of interest rates correctly in Dynare?

In addition, I am wondering if there are any differences between Dynare and Dynare++ for version 5.3. I have the impression that Dynare++ has been fully incorporated into Dynare, is that correct? Could the above issue be related to the differences between the two programs?

Thanks!

1. Dynare 5 replaces Dynare++. You should get the same results.
2. Are you sure the recursive formulation is correct? The first line implies there is only one period uncertainty in this model.

Thanks! How should one set up the term structure variables then?

My approach is as follows: given that `m` represents the SDF, the one-period bond yield can be calculated using the formula `1/exp(r) = exp(m(+1))`.

For a two-period bond, `M2 = m(+1)` where `M2` takes the SDF one period forward and `r2` is the two-period yield. In this case, the formula for the two-period bond yield is `1/exp(r2*2) = exp(m(+1)+M2(+1))`.

Does this seem like the correct approach?

But then M_2=E_t(m_{t+1}) such that 1/e^{2r_2} = E_t e^{m_{t+1}+E_{t+1}(m_{t+2})}. Is that what you want?

You are right, that’s not good.
What I want is

1/e^{2r_2} = E_t e^{m_{t+1} + m_{t+2}}

Would you suggest some references on how to do it correctly? Dynare does not seem to support m(+2), thanks!

Dynare should support `m(+2)`.

Great to know that the updated version support m(+n), and m(-n), thank you!

Is there any paper or reference that I can learn how to do it correctly? i.e., any papers that have an upward-sloping or downward-sloping yield curve with dynare solution?

I am asking because I have implemented

1/e^{r_n} = E_t e^{m_{t+1}+m_{t+2}+...+m_{t+n}}

And then, I feed zero shocks to run the model simulation and obtain the yield curve. But I notice that the yield curve slope disappeared at period 3. That is

r_1 < r_2 \approx r_3=r_4= r_5=..

But in theory, it should be upward-sloping, it is because I solve the model with order 3? Or something I did run?

comes to mind