README.txt Author: Klaus Reiner Schenk-Hoppé (klaus@iew.unizh.ch) http://www.iew.unizh.ch/home/klaus Last update: February 1, 2000 This file gives a brief overview on the C and MATLAB files which have been developed to carry out the numerical simulations in the paper "Is T here a Golden Rule for the Stochastic Solow Growth Model?" Working Paper No. 33, Institute for Empirical Research in Economics, University of Zurich, January 2000 by Klaus Reiner Schenk-Hoppé. The scripts are available at the web page http://www.iew.unizh.ch/home/klaus/numerics The data can be plotted with MATLAB http://www.mathworks.com Compile the files with gcc -lm filename to include the math library At the end of this text you can find the calls to reproduce the figures of the paper. Filename Task Output golden_rule.c calculate average consumption MATLAB file golden_rule.mat as a function of the saving rate Usage a.out production-function s_min s_max steps stochastic-case pre-iterations iterations production-function (1=Cobb-Douglas, 2=CES) s_min s_max steps (saving rate takes values in [s_min, s_max] on an equidistant grid with steps+1 vertices) stochastic-case ( 0=deterministic, 1=production shocks, 2=stoch. population growth rate, 3=stoch. depreciation) pre-iterations (number of iterations to get close to the sample path of the random fixed point) iterations (number of iterations to approximate average consumption) start MATLAB and give the commands load golden_rule.mat plot(s,Ec) to plot average consumption as a function of the saving rate average_cons_prob.c calculate average consumption MATLAB file average_cons_prob.mat as a function of the transition probability p of the stochastic parameter (two-state Markov process with p_11 = p_22 = p) Usage a.out production-function stayprob_min stayprob_max steps stochastic-case pre-iterations iterations saving-rate production-function (1=Cobb-Douglas, 2=CES) stayprob_min stayprob_max steps (transition probability p_11 = p_22 = p in [stayprob_min, stayprob_max] on an equidistant grid with steps+1 vertices) stochastic-case ( 0=deterministic, 1=production shocks, 2=stoch. population growth rate, 3=stoch. depreciation) pre-iterations (number of iterations to get close to the sample path of the random fixed point) iterations (number of iterations to approximate average consumption) saving-rate (fixed in (0,1)) start MATLAB and give the commands load average_cons_prob.mat plot(stayprob,Ec) to plot average consumption as a function of the transition probability p_11 = p_22 = p dyn_ineff_cond.c check condition (10) in Section 5 stderr and MATLAB file dyn_ineff_cond.mat the saving rate has to be the golden rule saving rate! Usage a.out production-function s_min s_max steps stochastic-case pre-iterations iterations production-function (1=Cobb-Douglas, 2=CES) s_min s_max steps (saving rate takes values in [s_min, s_max] on an equidistant grid with steps+1 vertices) stochastic-case ( 0=deterministic, 1=production shocks, 2=stoch. population growth rate, 3=stoch. depreciation) pre-iterations (number of iterations to get close to the sample path of the random fixed point) iterations (number of iterations to approximate average consumption) the output on stderr is the saving rate and the corresponding left-hand side of (10) the condition (10) is satisfied if the expression is larger than or equal to zero plot_cobb_douglas.m MATLAB file Call: plot_cobb_douglas(k1,k2) plots the function h with Cobb-Douglas production function and n = 0, delta = 0.5, alpha = 0.75, s = 0.75 for the two values xi = 0.95 and xi = 1.05 and the identity map The figures in the paper can be generated as follows: Figure 1 golen_rule 1 0.0 1.0 400 0 1000 10000 (deterministic) golen_rule 1 0.0 1.0 400 1 1000 1000000 (production shocks) golen_rule 1 0.0 1.0 400 2 1000 1000000 (stochastic population growth rate) golen_rule 1 0.0 1.0 400 3 1000 1000000 (stochastic depreciation rate) (It is a good idea to calculate each stochastic case in 4 steps, e.g. golen_rule 1 0.0 0.25 100 1 1000 1000000 mv golen_rule.mat golden_rule_xi_1.mat and so forth, because run-time is quite long) Figure 2 golen_rule 2 0.0 1.0 400 0 1000 10000 (deterministic) golen_rule 2 0.0 1.0 400 1 1000 1000000 (production shocks) golen_rule 2 0.0 1.0 400 2 1000 1000000 (stochastic population growth rate) golen_rule 2 0.0 1.0 400 3 1000 1000000 (stochastic depreciation rate) Figure 3 (start MATLAB first) plot_cobb_douglas(0,65000) gives the picture on the left plot_cobb_douglas(35000,65000) gives the picture on the right Figure 4 average_cons_prob 1 0.0 1.0 400 1 1000 2000000 0.75 (production shocks in {0.95,1.05})