<p>I am wondering the best way to find a numerical solution to a finite general equilibrium model with Matlab. The model is a basic neoclassical growth model with equilibrium equations:</p>

<p>$c_t+k_{t+1}=k_t(1-\delta)+k_t^{\alpha}$(budget constraint)</p>

<p>$c_t^{-\gamma}=\beta c_{t+1}^{-\gamma}(1-\delta+\alpha k_{t+1}^{1-\alpha})$(Euler equation)</p>

<p>This is on a 500 time step time horizon. I tried to solve this using fsolve, but the program does not like the negative exponents in the expression. Is there another way in Matlab to program these? Also there are boundary conditions, let's just say they are $k_1=1$ and $k_{500}=0$.</p>

CC BY-SA 3.0
2018-02-10T11:09:41.423Z
You can always cheat and linearize around a balanced growth path... (Well, in this case, you can actually linearize around a steady state, since there's no technology growth.)
Ege Erdil
CC BY-SA 3.0
2018-02-10T16:33:26.987Z
Is that ok when dealing with a finite time horizon? I actually just took logs and then did a first order Taylor series expansion of the log of the kt+1 term in the Euler equation, is that essentially what you are talking about?
MathStudent
CC BY-SA 3.0
2018-02-10T16:36:47.753Z
Yes, that's what I am talking about. It's okay when dealing with a finite time horizon - you will just get answers (as in, processes for $ c_t $ and $ k_t $) which are correct to first order approximation. Your $ k_{500} = 0 $ condition just serves as a transversality condition to pin down a unique equilibrium path - this doesn't change in the linearized version of the model.
Ege Erdil
CC BY-SA 3.0
2018-02-11T12:18:42.300Z
Just to make sure I follow this, you want to find $\{\alpha, \beta, \delta, \gamma\}$ s.t. $k_{500} = 0$ and both $k_{t+1}-k_t \to 0$, $c_{t+1} - c_t\to 0$ for $t > 500$?
caverac
CC BY-SA 3.0
2018-02-11T18:38:24.317Z
No, it is simply a 500 time step problem with those two transition equations and the boundary condition $k_{500}=0$ and $k_1=1$. The $\{\alpha,\beta,\delta,\gamma\}$ is given to me, I just did not put it in the problem.
MathStudent
<macroeconomics><numerical-methods>
How To Program Finite General Equilibrium Models
MathStudent
# How To Program Finite General Equilibrium Models

(Asked by: username_0 on 2018-02-10)

I am wondering the best way to find a numerical solution to a finite general equilibrium model with Matlab. The model is a basic neoclassical growth model with equilibrium equations:

$c\_t+k\_{t+1}=k\_t(1-\delta)+k\_t^{\alpha}$(budget constraint)

$c\_t^{-\gamma}=\beta c\_{t+1}^{-\gamma}(1-\delta+\alpha k\_{t+1}^{1-\alpha})$(Euler equation)

This is on a 500 time step time horizon. I tried to solve this using fsolve, but the program does not like the negative exponents in the expression. Is there another way in Matlab to program these? Also there are boundary conditions, let's just say they are $k\_1=1$ and $k\_{500}=0$.

**Tags:** macroeconomics, numerical-methods
> **Comments:**
> **username_1**: You can always cheat and linearize around a balanced growth path... (Well, in this case, you can actually linearize around a steady state, since there's no technology growth.)  
> **username_0**: Is that ok when dealing with a finite time horizon? I actually just took logs and then did a first order Taylor series expansion of the log of the kt+1 term in the Euler equation, is that essentially what you are talking about?  
> **username_1**: Yes, that's what I am talking about. It's okay when dealing with a finite time horizon - you will just get answers (as in, processes for $ c_t $ and $ k_t $) which are correct to first order approximation. Your $ k_{500} = 0 $ condition just serves as a transversality condition to pin down a unique equilibrium path - this doesn't change in the linearized version of the model.  
> **username_2**: Just to make sure I follow this, you want to find $\{\alpha, \beta, \delta, \gamma\}$ s.t. $k_{500} = 0$ and both $k_{t+1}-k_t \to 0$, $c_{t+1} - c_t\to 0$ for $t > 500$?  
> **username_0**: No, it is simply a 500 time step problem with those two transition equations and the boundary condition $k_{500}=0$ and $k_1=1$. The $\{\alpha,\beta,\delta,\gamma\}$ is given to me, I just did not put it in the problem.  

---

## 0 answers

