Skip to content

camriddell/CGMPortfolio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cocco, Gomes, & Maenhout (2005), "Consumption and Portfolio Choice Over the Life Cycle"

Quick launch: the following link launches a Jupyter notebook with the main results. Binder

Description

This repository corresponds to the Final assignment of the course Advanced Macroeconomics I at Johns Hopkins University, by Professor Christopher D. Carroll.

Location of main files:

  1. A notebook attempting to replicate the paper's main results using HARK can be found at Code/Python/CGMPortfolio.ipynb.

  2. A document going into more detail on our attempt to replicate can be found at CGMPortfolio.pdf.

  3. The code that generates all the figures and results in the previous document can be found at Code/Python. Files can be run independently, or all at once through the script ./do_ALL.py. Additional files ./do_MIN.py and ./do_MID.py are made available to execute subsets of the results.

  • ./do_MIN.py: solves the baseline model plotting its policy functions, and presents mean simulated life-cycle behavior of variables of interest. Runtime: ~400 seconds.
  • ./do_MID.py: additionally compares the policy functions obtained with HARK with those that we obtain from executing the authors' FORTRAN 90 code. Runtime: ~600 seconds.
  • ./do_ALL.py: additionally computes all the results from the apendices, in which we alter the baseline model in HARK to cases in which analytical solutions are available. Runtime: ~1300 seconds.

Note: runtimes are estimated using an Intel Core i7-6700HQ CPU @ 2.60GHz.

  1. The original Fortran 90 code made available by the authors can be found in Code/Fortran.

Package requirements

The following packages are required for executing the REMARK notebook:

  • matplotlib
  • numpy
  • scipy
  • pandas
  • econ-ark >= 0.10.3

For executing do_ALL.py additional requirements are:

  • seaborn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TeX 59.3%
  • Jupyter Notebook 33.8%
  • Python 5.0%
  • Fortran 1.0%
  • Julia 0.6%
  • Shell 0.1%
  • Other 0.2%