%TVCC_VARIABLES.M function [rL, rH, laL, laH, hL, hH, yL, yH, cL, cH, apL, apH, bettaL, bettaH] = tvcc_variables(laL_o_rL, laH_o_rH, qL, qH, a, DL, DH); %[rL, rH, laL, laH, hL, hH, yL, yH, cL, cH, apL, apH, bettaL, bettaH] = tvcc_variables(laL_o_rL, laH_o_rH, qL, qH, a, DL, DH); Given U(c_t,h_t)/R_t and q_t, this program returns hours output, the marginal utility of consumption, consumption, next-period debt, and the discount factor. The subscripts L and H refer to low and high states of technology. %For a description of the underlying economic model, see ``Individual Versus Aggregate Collateral Constraints and the Overborrowing Syndrome,'' by Martin Uribe, April 2006. %(c) Martin Uribe, April 27, 2006. %Calls tvcc_ss.m %Deep parameters and steady-state values [RSTAR, SIG, OMEGA, BETTA1, ALFA, MU, z, PAIZ, KAPA, Kss, QQss, Css, Hss, LAss, Ass, Yss, BETTAss] = tvcc_ss; %Possible realizations of productivity shock zL = z(1); zH = z(2); %grid length m = length(laL_o_rL); %Assume collateral constraint does not bind rL = ones(m,1)*RSTAR; rH = ones(m,1)*RSTAR; %Marginal utility of consumption laL = laL_o_rL.*rL; laH = laH_o_rH .*rH; %hours hL = ( (1-ALFA) * exp(zL) * Kss^(ALFA) ) .^(1/(OMEGA+ALFA-1)); hH = ( (1-ALFA) * exp(zH) * Kss^(ALFA) ) .^(1/(OMEGA+ALFA-1)); %Output yL = exp(zL) * Kss^ALFA * hL.^(1-ALFA); yH = exp(zH) * Kss^ALFA * hH.^(1-ALFA); %Consumption cL = laL.^(-1/SIG) + hL^OMEGA/OMEGA; cH = laH.^(-1/SIG) + hH^OMEGA/OMEGA; %Next period's external debt apL = RSTAR .* (a + cL - yL); apH = RSTAR .* (a + cH - yH); %Make sure next period's debt is within grid apL = max(apL,DL); apL = min(apL,DH); apH = max(apH,DL); apH = min(apH,DH); %States in which collateral constraint is violated ccvL = find(apL>KAPA*qL*Kss); ccvH = find(apH>KAPA*qH*Kss); %Impose collateral constraint apL(ccvL) = KAPA*qL(ccvL)*Kss; apH(ccvH) = KAPA*qH(ccvH)*Kss; %consumption cL = apL./RSTAR-a+yL; cH = apH./RSTAR-a+yH; %Discount factor bettaL = (1+cL-hL.^OMEGA/OMEGA).^(-BETTA1); bettaH = (1+cH-hH.^OMEGA/OMEGA).^(-BETTA1); %Marginal utility of consumption laL = (cL-hL.^OMEGA/OMEGA).^(-SIG); laH = (cH-hH.^OMEGA/OMEGA).^(-SIG); %Interest rate rL = laL ./ laL_o_rL; rH = laH ./ laH_o_rH;