<p>Two suggestions: </p>

<p>First, try some of the sample code at <a href="http://www.vfitoolkit.com/" rel="nofollow noreferrer">this website</a>. It builds simple Euler equation iteration methods from scratch in Matlab. </p>

<p>Second, try the sample code <a href="http://www.simonmongey.com/teaching--notes.html" rel="nofollow noreferrer">here</a>. You will need to read the associated notes, also. The code makes use of the CompEcon toolbox in Matlab, by Miranda and Fackler (associated with their book:  Applied Computational Economics and Finance).  </p>

CC BY-SA 3.0
2017-08-31T05:47:16.513Z
2017-08-31T12:13:29.793Z
2017-08-31T12:13:29.793Z
James Graham
<p>I wrote some simple Matlab code which solves a stochastic optimal growth model via Euler function (Coleman policy) iteration, and then again with value function iteration. You can find <a href="https://github.com/Flintro/Coleman-Iteration" rel="nofollow noreferrer">here</a>.</p>
<p>I uploaded it because I also noticed that basically the only other source of code for this stuff is QuantEcon.</p>

CC BY-SA 4.0
2020-07-27T11:06:37.220Z
2020-07-27T11:06:37.220Z
Debreu
<p>Where I can find a good Matlab sample code that performs Euler equation iteration with piece-wise linear approximation of policy functions? </p>

<p>The Projection method I have in mind is something like described in the Finite Elements method in Aruoba, Fernandez-Villaverde, Rubio-Ramirez (JEDC 2006) or more generically Chapter 4 in Heer and Maussner "Dynamic General equilibrium models" (the examples in the cited references are either Fortran or Gauss). </p>

CC BY-SA 3.0
2015-08-14T12:59:56.790Z
Where have you tried looking? What did you search for?
BKay
CC BY-SA 3.0
2015-08-14T13:06:49.610Z
Searched mainly on web-resources of textbooks or scholars online shared resources. Need it to learn the method within a simple framework (like stochastic growth model) to apply it to an open-economy bigger model.
MPC
CC BY-SA 3.0
2015-08-14T15:32:23.280Z
When you say Euler equation iteration, what specifically do you mean? I can think of a few different Euler equation type methods... Could you maybe link to a paper (or book/notes) that explains what you have in mind?
cc7768
CC BY-SA 3.0
2015-09-05T01:22:16.973Z
If you mean by 'euler equation iteration' reverse shooting as in Judd (1998, §10.7) I could provide a deterministic continous time example. Projection method does not ring a bell.
clueless
<macroeconomics><computation><software>
Matlab code example for piecewise linear approximation and Euler Equation Iteration
MPC
# Matlab code example for piecewise linear approximation and Euler Equation Iteration

(Asked by: username_0 on 2015-08-14)

Where I can find a good Matlab sample code that performs Euler equation iteration with piece-wise linear approximation of policy functions?

The Projection method I have in mind is something like described in the Finite Elements method in Aruoba, Fernandez-Villaverde, Rubio-Ramirez (JEDC 2006) or more generically Chapter 4 in Heer and Maussner "Dynamic General equilibrium models" (the examples in the cited references are either Fortran or Gauss).

**Tags:** macroeconomics, computation, software

> **Comments:**
> **username_1**: Where have you tried looking? What did you search for?  
> **username_0**: Searched mainly on web-resources of textbooks or scholars online shared resources. Need it to learn the method within a simple framework (like stochastic growth model) to apply it to an open-economy bigger model.  
> **username_2**: When you say Euler equation iteration, what specifically do you mean? I can think of a few different Euler equation type methods... Could you maybe link to a paper (or book/notes) that explains what you have in mind?  
> **username_3**: If you mean by 'euler equation iteration' reverse shooting as in Judd (1998, §10.7) I could provide a deterministic continous time example. Projection method does not ring a bell.  

---

## 2 answers

### Answer by username_4 on 2017-08-31. Score: 2

Two suggestions:

First, try some of the sample code at [this website](http://www.vfitoolkit.com/). It builds simple Euler equation iteration methods from scratch in Matlab.

Second, try the sample code [here](http://www.simonmongey.com/teaching--notes.html). You will need to read the associated notes, also. The code makes use of the CompEcon toolbox in Matlab, by Miranda and Fackler (associated with their book: Applied Computational Economics and Finance).


---

### Answer by username_5 on 2020-07-27. Score: 1

I wrote some simple Matlab code which solves a stochastic optimal growth model via Euler function (Coleman policy) iteration, and then again with value function iteration. You can find [here](https://github.com/Flintro/Coleman-Iteration).

I uploaded it because I also noticed that basically the only other source of code for this stuff is QuantEcon.


---

