PROGRAM DETAILS 16/09/2008 07:16 The following programs have been used to generate (i) the statistics from time series simulations in Tables 4-10 (ii) the policy functions in figures 1-3 All the programs are in fortran 90, and the IMSL library is used. We used absoft fortran to run the program. If you use an other sofware, and in particular Compaq Visual Fortran you may need to add "use msimsl" in the program, each time the library IMSL is used. A. INPUT FILES FOR ALL PROGRAMS 1-inputs.txt contains all the parameter values of the program, and the directory where the INPUT/OUTPUT files are located for EACH leveraged economy. Note that for each leveraged economy, you have a different directory (see below). Here, rho is set to 0.37. BE SURE TO DEFINE THE RIGHT DIRECTORY. 2-histo1001.txt contains the initial distribution of wealth (in INPUT/OUTPUT DIRECTORY). 3-shock.txt contains time series for aggregate shocks (in INPUT/OUTPUT DIRECTORY). B. PROGRAMS 1-main.f90 is the main program where everything is done. In particular: Part 0 - Set everything up (parameters, files, Transition probabilities, stationary distributions, fraction of agents of each type, and initialize parameters, grids, and the laws for aggregate variables). In particular, specify your own path for inputs.txt, that contains all the parameter values. Part I - Main loop I.1 - Solve the individual problem. I.2 - Get the simulated series for the economy. I.3 - Estimate the new rules for the aggregate state. I.4 - Check convergence of forecasting rules. I.5 - If convergence is reach, generate detailed statistics and figures for individual saving function. 2-foc.f90 defines all the individual foc for which bisection method is implemented 3-Simulation.f90 generate the time series simulation. This file contains subroutines: 3.1 - ini_economy: Initialize the aggregate productivity shock, the aggregate capital, and the wealth distribution. 3.2 - find_rq: Find the rq that clears the market for bonds, that use get get_rq_bounds (find the right interval for rq), and mkt_clearing (define the bond market equilibrium equation) functions. 3.3 - update_sample: Given the equilibrium bond return, compute next period wealth, and prices. If "code" variable equals 1, it calculates detailled statistics. 3.4 - estimate_rules: Estimate the new rules for the aggregate state given the simulated time series. DR2SE, and DRSTAT from IMSL library are used. 3.5 - degree_converg: subroutine that check for convergence for the new rules for the aggregate state. 4-guessed laws.f90 deals with aggregate transition laws for capital and bond return. 5-firm.f90 define the production function, the prices of the economy and the endowment 6-utility.f90 defines the utility function and its derivative 7-saving-loading.f90 allow us to save matrix of output or load matrix of input 8-th_policies.f90 generates saving decision function in function of wealth C. MODULES 1-KSPr.f90 define the global variable, and contains some subroutines to initialize the implementation and others useful subroutines. 2-findq_module.f90 contains subroutines used to find the equilibrium bond return. In particular, "solve_small_prob" solves individual problem given the bond return. 3- stat_module.f90 contains subroutines that generate percentile and gini stats. D. INPUT/OUTPUT DIRECTORY Rh037 results when rho=0.37 (Benchmark case) If you want the result for different value of leverage, create a new directory and change the value of rho in inputs.txt. Used as initial values the solution found for rho=0.37.