README file to describe the set of Matlab programs that accompany the paper 'On the Evolution of the US Consumer Wealth Distribution' by Thomas Hintermaier, hinterma@uni-bonn.de and Winfried Koeniger, w.koeniger@qmul.ac.uk Copyright 2010 Thomas Hintermaier and Winfried Koeniger ======================================================================= These codes will be made available on the World Wide Web at the following sites: http://wiwi.uni-bonn.de/hintermaier/ http://webspace.qmul.ac.uk/wkoeniger/ and they are part of the replication package submitted to the RED. The codes may be used and reproduced for educational and research purposes freely, if all of the following three conditions are respected: 1. the above-mentioned paper is properly cited in all work and publications that rely at least partially on these codes. 2. the copyright notice is reproduced with them, 3. the codes are not included in software sold for profit. If your intended use of these codes stems from commercial, governmental or institutional interest, please contact one of the authors. ======================================================================== We provide two sets of program files for the benchmark case in the paper with rho=0.95: 1. the set of programs for the solution of the problem, where the relevant program output for the computed cases in the parameter space for beta and sigma are stored in a database. and 2. the set of programs which estimate the model for 1983 and compute the predictions for 2004. Make sure to extract the main program and all other programs contained in this replication .zip archive into the same directory and to set this directory as the Current Directory in Matlab. In the following we briefly describe the purpose of each of the programs and provide information that might be helpful to those USERS who want to apply these programs for solving problems of the same type. (Searching the files for the string "USER" will point USERS to the most common problem-specific adjustments required.) Note that the programs contain plenty of comments and that the variable names in the code match closely the notation in the paper. Note that the Matlab programs contain all the data which are necessary to replicate our results. The data appendix in the paper explains how we construct the data. ------------------------------------------------------------------------- 1. Computing the model solution ---------------------------------- The programs are in the folder "compute_cases". We list the main programs first. life_autopilot.m ---------------- The main program: - Specifies the database and directory in which all the output is written. - Specifies the parameter grid and fills the matrix pilot_mat with all parameter combinations. - Sets the number of gridpoints for net worth in the solution. - Calls life_1983_calibration.m for calibration inputs. - Calls life_precaution.m for the solution of the model for each parameter combination. NB: Although in the current set of programs net worth >=0 (as in the paper), the programs allow for negative net worth if USERS change b_ad_hoc_VEC accordingly. The programs specify a spread between the lending and borrowing rate in life_1983_calibration.m which becomes relevant in this case. life_1983_calibration.m ----------------------- This program contains all the required calibration inputs for the model solution. The program calls rouwen_approx.m to approximate the AR(1) process with a Markov chain using the Rouwenhorst method. See Kopecky and Suen (RED, forthcoming). The program also calls markovc3.m and markov_invariant_MF.m. life_precaution.m ----------------- This program solves a life-cycle model with precautionary savings using the endogenous gridpoint method introduced by Carroll (2006). It allows for a spread in the interest rate on financial wealth, according to the sign of holdings. The program calls life_GothVP_long.m and life_save.m. life_GothVP_long.m ------------------ The program is based on program code accompanying the paper by Carroll (2006), modified by Michael Reiter. life_save.m ----------- This program writes parameters and output, in particular the percentiles of the distribution: net worth at the percentiles of the unconditional distribution for prime-age consumers, and net worth at the percentiles of the distribution conditional on being in a specific 10-year age group. The program displays output for each computed model case on the screen which USERS may want to comment out. rouwen_approx.m --------------- Rouwenhorst approximation of an AR(1) stochastic process as described in the paper "Finite State Markov-chain Approximations to Highly Persistent Processes" by Karen Kopecky and Richard Suen (Review of Economic Dynamics, 2010, forthcoming). markov_invariant_MF.m --------------------- Computes the invariant distribution of a Markov chain. Thanks to Miranda and Fackler for making this routine available along with their textbook. markovc3.m ---------- Generates a simulation from a Markov chain. Thanks to Ljungqvist and Sargent for making this routine available along with their textbook. ------------------------------------------------------------------------- ------------------------------------------------------------------------- 2. Estimating the model for 1983 and predicting net-worth distributions in 2004 Programs for the estimation for the SCF 1983 are in the folder "estimate_1983". Programs for the predictions for 2004 are in the folder "predict_2004". Estimation for 1983 ------------------- life_estimate_and_test.m ------------------------ This program loads the previously computed database with the moments for the model cases. It then finds the combination of preference parameters beta and sigma which minimizes the distance between the model moments and the data moments. The estimation proceeds in various steps as explained in the computational appendix of the paper. After the first estimation step the optimal weighting matrix is updated by bootstrapping model moments using the SCF sample size. The program currently only allows for five steps in the estimation since convergence typically occurs until then. USERS should check the convergence of the estimates and adjust the number of steps "total_estimation_steps" upward if necessary. After convergence of the estimates, the standard errors of the estimates and the chi2-statistic for the test of overidentifying restrictions are computed. The program calls life_1983_calibration.m and thus also rouwen_approx.m, markovc3.m and markov_invariant_MF.m. These programs have been described above. The program further calls life_precaution_no_save.m. The program also calls life_precaution.m which has been described above. life_precaution_no_save.m ------------------------- This program is based on life_precaution.m described above without computing net worth percentiles and saving output (but also calling life_GothVP_long.m introduced above). Predictions for 2004 -------------------- life_2004_steady_state.m ------------------------ This program uses the estimates for the preference parameters beta and sigma, obtained from matching moments of the SCF 1983, to predict percentiles of the net-worth distribution in 2004. The program calls life_2004_calibration.m with the calibration values for 2004 (and thus also rouwen_approx.m, markovc3.m and markov_invariant_MF.m which we described above). The program further calls life_precaution.m and thus also life_GothVP_long.m which we described above. life_2004_calibration.m ----------------------- This program contains all the required calibration inputs for the model solution for 2004. life_transition.m ----------------- This program produces predictions for the net worth distribution in 2004, taking the transition to the steady state in 2004 into account. As discussed in the paper, this transition only matters for 9 age cohorts, if we assume that the regime change (with the new parameters in life_2004_calibration.m) occurred in 1984. The program calls life_1983_calibration.m and life_2004_calibration.m (and thus also rouwen_approx.m, markovc3.m and markov_invariant_MF.m which we described above). The program further calls life_precaution.m and thus also life_GothVP_long.m which we described above.