DOCUMENTATION FOR REPLICATION FILES =================================== RE-USE OF COLLETERAL: LEVERAGE, VOLATILITY, AND WELFARE ------------------------------------------------------- JOHANNES BRUMM, MICHAEL GRILL, FELIX KUBLER, KARL SCHMEDDERS ------------------------------------------------------------ This document describes how to replicate the results in Re-use of Collateral: Leverage, Volatility, and Welfare. We first give a rough overview and then describe some important files in more detail. In addition, there are also comments and descriptions in the Mathematica and Matlab files. Section 3 illustrates the leverage effect of collateral re-use and its regulation in a simple two-period model. The presented results are derived using Mathematica and can be replicated running TwoPeriodModel.nb. Section 4 presents an infinite-horizon model and its benchmark calibration (with unrestricted re-use, reuselim=1). The model is solved with Matlab using a time-iteration algorithm that employs Artelys Knitro (trial licences are available for free as of 2022) to solve the system of equilibrium conditions at each step in the time iteration procedure and at each point on the collocation grid. To solve the model for given parameters run Main.m where economic and computational parameters can also be adjusted. Note that the code contains several legacy elements and is certainly not optimized for speed. Solving and simulating the infinite-horizon model for given parameters (i.e. running Main.m) takes several minutes on a laptop. Section 5 presents numerical results for the impact of re-use on leverage and volatility in the benchmark economy, which are generated by varying the re-use parameter $reuselim$ in Main.m. In Section 6 the welfare implications of re-use limits are examined using Welfare.m. The Appendix contains additional results. Appendix B reports results for a higher intertemporal elasticity of substitution, which can be generated by setting ies=[1.5 1.5] and adjusting the time discount factor to b=[0.91 0.91]. Appendix C, using Simpath_nodisaster.m, reports results for simulations in which no disasters occur. Appendix D, using Welfare_Unconditional_Path.m, reports unconditional welfare changes due to regulation. Random numbers are used as follows. In INITIALGUESS.m and also in ZEROSEARCH.m we use random numbers to create various starting points for solving the equilibrium equation system at a given time-iteration step and grid point. To do so we employ the standard Matlab random number generator without fixing the seed. We do the same when generating sequences of exogenous shocks in Simpath.m, Simpath_nodisaster.m or Welfare_Unconditional_Path.m for computing equilibrium statistics or welfare changes, respectively. We only fix the seed (at the value 3) when generating the equilibrium paths shown in Figure 8 and 12, as this ensures that differences between those two graphs stem only from the difference in preferences between the two calibrations, rather than from different shock realizations. In the remainder of this document we describe the major files of the replication package and how they can be used to replicate the results reported in the tables and figures of the paper. TwoPeriodModel.nb ----------------- * Mathematica notebook that carries out the derivations for the analysis of the simple two-period model of Section 3. * Generates Figures 3 and 4. Main.m ------ * For a given set of parameters, running this file first solves the model via time-iteration and then simulates the model. * In the first part of the main file, economic and computational parameters are set and policy and value function are initiated * The second part represents the time-iteration algorithm where policy and value function are updated until the preset error criterion is satisfied. * In each iteration step, the algorithm loops through all discrete exogenous states and grid points along the endogenous state dimension, which is the fraction of wealth held by agent 1. The number of grid points is increased along the time iteration procedure. Note that in our calibration, shocks in the economy are i.i.d., implying that policy functions do not depend on the exogenous state, which the algorithm exploits to save compute time. * At each grid point, the algorithm solves for the equilibrium allocation using Artelys Knitro by finding a solution to the equation system defined in file EQUATIONS.m. Solutions are saved in the array solution. * The file policyanderror.m constructs updated policy functions and evaluates the maximum difference between the policies of the previous and the current iteration. * Once the error falls below a given threshold, the equilibrium policies are used to compute asset price moments using the file Simpath.m and workspaces (called, e.g., ResultsReuselim100percent.mat) are saved for subsequent welfare evaluation. * For the baseline calibration in Section 3, the running time for the entire main.m is approx. 4 minutes on a standard laptop, where most of the time is required for the time-iteration solution and about 15 seconds for the simulation procedure. EQUATIONS.m ----------- * For given policy functions (including prices) and value functions for the subsequent period, this file is used to solve for current policies that solve the equilibrium conditions at a given grid point in the state space. * The equilibrium conditions are represented by an equation system that contains i) equations for collateral parameters (variables that keep track of how much one can borrow using the various assets as collateral), ii) market clearing conditions, iii) equations for next period's endogenous states (fraction of financial wealth), iv) Euler equations, iv) occasionally binding constraints (which are transformed into equations by introducing auxiliary variables). INITIALGUESS.m -------------- * This file is used to produce starting points for solving the system of equilibrium equations in the very first time-iteration step. * It uses randomized educated guesses for consumption choices, prices and other variables. Zerosearch.m ------------ * In all but the very first time-iteration step this file is used to find the solution to the equation system at a given grid point and relevant exogenous state. * It uses the solutions obtained in the previous iteration to create good starting points for Knitro to solve the equation system. Simpath.m --------- * Following either the generation of equilibrium policies via Main.m or loading of a previously computed workspace, Simpath.m simulates for mm periods nn different equilibrium paths and discards the first oo periods. * mm, nn, and oo are set as input parameter to the file. * For the equilibrium computed for a given set of parameters, the file then computes the various statistics reported in Table 2, Table 4, Table 5, Table 7 * The file also generates the STD of asset returns for different re-use-limit parameters shown in Figure 5. * The file is also used to generate the paths shown in Figure 8 and 12. * We are using mm=10000, nn=25, and oo=50 for computing equilibrium statistics. Running the file with these input parameters takes around 15 seconds on a standard laptop. PLOT_MultipleWS_Figure6.m ------------------------- * This file loads several workspaces and generates plots with policies for different equilibria. * It is used to produce Figure 6. PLOTRESULTS_Figure7.m --------------------- * Combining equilibrium bond and asset holdings and constraints, this file computes the slackness of constraints. * It is used to produced Figure 7 showing the slackness of re-use and collateral constraints. PLOT_MultipleWS_histogram_Figure9.m ----------------------------------- * This file loads several workspaces and generates plots with policies for different equilibria. * It also simulates the path of the endogenous state variable (cash at hand of Agent 1) for each of the considered equilibria. * It is used to produce Figure 9, including the histogram of agent 1’s wealth share. Welfare.m --------- * This file computes the change in welfare for both agents when introducing regulation of re-use. * It first computes welfare for the unregulated economy for different values of agent 1’s wealth. * For the asset allocation at a given wealth level, it computes the wealth of agent 1 if regulation is introduced, and then evaluates welfare at this wealth level in the new equilibrium. * It also computes the welfare change of agent 1 after agent 2 is compensated for any welfare change due to the introduction of regulation. * Uses Function FindCahReg.m to solve for the new wealth level of Agent 1 in the regulated economy; the new level depends on the bond and stock holdings she has when entering the period when regulation is introduced. * It is used to produce Figure 10, Figure 11, Table 6, Figure 13, Table 8. * The running time for the code is approx. 3 seconds on a standard laptop. MainReasonableBeliefs.m ----------------------- * Similar to \emph{Main.m}, yet in addition computes agents' value functions under different beliefs. * It is used to generate workspaces needed for results shown in Table 6. These are called, e.g., Results_ReasonableBeliefs_Reuselim100percent.mat. Simpath_nodisaster.m -------------------- * The file simulates equilibrium paths, assuming that disasters do not occur along the equilibrium path. * It is used to generate Table 9. * We are using mm=10000, nn=25, and oo=50 for computing equilibrium statistics. Running the file with these input parameters takes around 15 seconds on a standard laptop. Welfare_Unconditional_Path.m ---------------------------- * This file computes unconditional welfare changes due to regulation—that is, the expected welfare changes when the economy is regulated at a random point in time. * It is used to produce Figure 14. * When setting nrwel=10000 as used for producing the results in the paper, the running time for the code is approx. 20 seconds on a standard laptop. Further m-files --------------- * FindCahReg.m is used in the welfare analysis to solve for the new wealth level of Agent 1 in the regulated economy; the new level depends on the bond and stock holdings she has when entering the period when regulation is introduced. * finddimensions.m is used to determine the size of both the equation system and the different blocks of variables. * int1dim.m and int2dim.m are used for defining the policy and price functions that are updated each period. Both functions rely on spline_linear_val.m for interpolating between grid points. * spline_linear_val.m evaluates a piecewise linear spline at a given point * r8vec_bracket.m is called by spline_linear_val.m and searches a sorted array for successive brackets of a value. * SUBSITUTE.m is used to substitute/replace some variables by functions of other variables thereby reducing the size of the equation system. * varTOv.m takes blocks of variables (representing states today and tomorrow, choices, and prices) and transforms them into one vector. * vTOvar.m reverses the operation of varTOv.m and recovers blocks of variables (representing states today and tomorrow, choices, and prices) from a vector.