Closed mnwhite closed 5 years ago
Posting this now because one of my students is tackling this for her course project.
Student ultimately did not complete this assignment. This is now available for other people to work on. I can provide a set of notes / guidance for how to tackle this in HARK.
I have a Julia implementation of Cocco, Gomes, Maenhout (2005) in both VFI (derived from their posted Fortran code) and EGM flavors. Porting the EGM code over to python + HARK should be an easy task for anybody familiar with the framework (I'm not a python user myself).
Very cool. Have you made your Julia code available online? If you link it here, that will make it easy for someone else to come in port it to Python. Looking over the CGM paper, the model appears (effectively) identical to the one in CDC's lecture notes (mentioned at the top of this thread), which is what I wrote up HARK solution notes for. This is good.
It lives in a private repo right now, I'll clean it up a little and then paste it in a Gist and link it here later today.
https://gist.github.com/tbeason/105a04a9c476e367894e9d4ca893a826
I first copied the authors' Fortran VFI code over to Julia, and then I changed that code to use EGM. So, the layout is kind of funky and suboptimal. But it works! Please let me know if you find errors.
To put the relevant links in the same issue thread:
These are the lecture notes by CDC that I referred to in the original post. The model we want to do first is in section 7.
These are the programming notes I wrote for this model; they have some links to other potentially useful CDC lecture notes at the end
I'm going to work on this.
Excellent!
Any updates, @ccutsail?
Any updates, @ccutsail?
This is the one I have a PR for @shaunagm . The labels refer to me, not ccutsail.
Great @pkofod. Got confused by ccutsail's comment saying they were going to work on it.
Is #241 the PR?
Yes, yes it is
The PR is merged. Should this issue be closed?
As a small start on incorporating models with multiple assets, we should implement the basic portfolio allocation model with one risky and one riskless asset, as in the latter part of Chris' SolvingMicroDSOPs notes. All of the necessary math is there (except calculation of zero-income-risk risky asset share --> limit as mNrm --> infinity), so this won't be hard. The only annoying bit is that we do need to use a non-linear solver to get risky share at each aNrm gridpoint. Off-the-shelf 1D solvers will be slow as we'll lose fully vectorized form, might need to hand write one if we want reasonable speed.