πŸ”¬ Fifth and final lab#

πŸ›  Task 5.1: Coding up the stochastic consumption-savings model#

⏱ Expected work time 60 minutes

Let’s implement EGM and a simulator for the consumption-savings model.

  1. β˜‘οΈ Use the Jupyter notebook egm.ipynb

  2. β˜‘οΈ Fill out the gaps in the code to eliminate all run-time errors

  3. β˜‘οΈ Perform all the tests following the tasks in the notebook

πŸ›  Task 5.2: Estimating consumption savings model by MSM#

⏱ Expected work time 60 minutes

In this task you run an MSM estimation exercise for the consumption-savings model.

  1. β˜‘οΈ Use the Jupyter notebook msm_estim.ipynb

  2. β˜‘οΈ Make sure you understand the code in the notebook – correspond different parts of the code to the theory covered in the lecture notes

  3. β˜‘οΈ Fill in the gaps in the code to eliminate all run-time errors

  4. β˜‘οΈ Run the MSM estimation procedure

  5. β˜‘οΈ Experiment with how the estimate changes when you modify:

    • (a) the number of simulated households

    • (b) the number of time periods

    • (c) the weighting matrix

  6. β˜‘οΈ [Optional] Write a Monte Carlo loop to assess the estimator’s performance. On each iteration it should:

    • (a) Simulate a new dataset for the known values of the parameters

    • (b) Estimate the model using MSM

    • (c) Store the estimates for later analysis

    • (d) After completing all iterations, analyze the distribution of the estimates (mean, variance, bias, etc.) to evaluate the estimator’s performance.