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).

  • $\begingroup$ Where have you tried looking? What did you search for? $\endgroup$ – BKay Aug 14 '15 at 12:59
  • $\begingroup$ 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. $\endgroup$ – MPC Aug 14 '15 at 13:06
  • 2
    $\begingroup$ 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? $\endgroup$ – cc7768 Aug 14 '15 at 15:32
  • $\begingroup$ 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. $\endgroup$ – clueless Sep 5 '15 at 1:22

Two suggestions:

First, try some of the sample code at this website. It builds simple Euler equation iteration methods from scratch in Matlab.

Second, try the sample code here. 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).


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.

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.