From f276878509ae23721872d1bebe9dde73b88d5938 Mon Sep 17 00:00:00 2001 From: Michael Tiemann Date: Mon, 27 Apr 2026 09:43:53 +1200 Subject: [PATCH 1/3] Move two GE prices to AggVars calculations Neither the government budget nor accidental bequests behave like GE prices as there are no GE prices they balance against. Instead, use AggVar calculations to compute them. This speeds up the remaining GE calculation by more than a factor of 2x. The error check at the end indicates that the concept of capital gains in this particular model is not correct. Likely the problem is that neither the stationary distribution nor the GE have a well-founded concept of who bought and sold stock at what price when in order to make such a calculation. Age is not time. --- OLGModel14.m | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/OLGModel14.m b/OLGModel14.m index e446a1f..10bcb61 100644 --- a/OLGModel14.m +++ b/OLGModel14.m @@ -2,7 +2,7 @@ % We can essentially just think of households and firms as two different % permanent types of agents (the household problem is finite horizon, while the % firm problem is infinite horizon, but this is fine). Obviously a bunch of -% things related to how we set up the general equilbrium change. +% things related to how we set up the general equilibrium change. Names_i={'household','firm'}; PTypeDistParamNames={'ptypemass'}; @@ -124,13 +124,14 @@ % This is relevant to the general equilibrium conditions Params.TargetKdivL=2.03; +Params.AccidentBeq=0.02; % Accidental bequests (this is the lump sum transfer); actual value from AggVars calculation +Params.G=0.1; % Government expenditure; actual value from AggVars calculation + %% Remaining parameters % Some initial values/guesses for variables that will be determined in general eqm Params.pension=0.4; % Initial guess (this will be determined in general eqm) Params.w=1; % Wages, determines (household) labor supply and (firm) demand -Params.AccidentBeq=0.02; % Accidental bequests (this is the lump sum transfer) -Params.G=0.1; % Government expenditure Params.firmbeta=1/(1+Params.r/(1-Params.tau_cg)); % 1/(1+r) but returns net of capital gains tax Params.D=0.2; % Dividends rate expected/received by households Params.P0=1; @@ -193,7 +194,7 @@ ReturnFn.firm=@(d,kprime,k,z,w,D,delta,alpha_k,alpha_l,capadjconstant,tau_corp,phi,tau_d,tau_cg)... OLGModel14_FirmReturnFn(d,kprime,k,z,w,D,delta,alpha_k,alpha_l,capadjconstant,tau_corp,phi,tau_d,tau_cg); -%% Now solve the value function iteration problem, just to check that things are working before we go to General Equilbrium +%% Now solve the value function iteration problem, just to check that things are working before we go to General Equilibrium disp('Test ValueFnIter') tic; % Note: z_grid and pi_z, this will be ignored due to presence of vfoptions.z_grid_J and vfoptions.pi_z_J @@ -224,7 +225,7 @@ StationaryDist=StationaryDist_Case1_FHorz_PType(jequaloneDist,AgeWeightsParamNames,PTypeDistParamNames,Policy,n_d,n_a,n_z,N_j,Names_i,pi_z,Params,simoptions); %% General eqm variables -GEPriceParamNames={'pension','AccidentBeq','G','w','firmbeta','D','P0'}; +GEPriceParamNames={'pension','w','firmbeta','D','P0'}; % We don't need P % We can get P from the equation that defines r as the return to the mutual fund % 1+r = (P0 +(1-tau_d)D - tau_cg(P0-P))/Plag @@ -243,7 +244,7 @@ FnsToEvaluate.S.household = @(h,sprime,s,z,e) s; % Aggregate share holdings FnsToEvaluate.PensionSpending.household = @(h,sprime,s,z,e,pension,agej,Jr) (agej>=Jr)*pension; % Total spending on pensions FnsToEvaluate.PayrollTaxRevenue.household = @(h,sprime,s,z,e,agej,Jr,tau_l,w,kappa_j,Lhscale) (agej Date: Mon, 27 Apr 2026 09:48:44 +1200 Subject: [PATCH 2/3] Change Params.G to G after capital gains error check Since G is no longer part of Params, we calculate it expressly. Use that calculation in the final report (if we ever get there). --- OLGModel14.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OLGModel14.m b/OLGModel14.m index 10bcb61..220f40f 100644 --- a/OLGModel14.m +++ b/OLGModel14.m @@ -346,7 +346,7 @@ fprintf('Total asset value (HH side): P*S=%8.2f \n',P*AggVars.S.Mean) fprintf('Total firm value (firm side): Value of firm=%8.2f \n',TotalValueOfFirms) fprintf('Consumption-Output ratio: C/Y=%8.2f \n',AggVars.Consumption.Mean/Y) -fprintf('Government-to-Output ratio: G/Y=%8.2f \n', Params.G/Y) +fprintf('Government-to-Output ratio: G/Y=%8.2f \n', G/Y) fprintf('Wage: w=%8.2f \n',Params.w) From f37a6f0fb08be18e8147e0dccda67e81ea3d95e5 Mon Sep 17 00:00:00 2001 From: Michael Tiemann Date: Mon, 27 Apr 2026 10:05:12 +1200 Subject: [PATCH 3/3] Fix some typos in comments The usual... --- OLGModel14.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OLGModel14.m b/OLGModel14.m index 220f40f..7920ec3 100644 --- a/OLGModel14.m +++ b/OLGModel14.m @@ -1,4 +1,4 @@ -%% OLG Model 14: Heterogenous households and heterogeneous firms +%% OLG Model 14: Heterogeneous households and heterogeneous firms % We can essentially just think of households and firms as two different % permanent types of agents (the household problem is finite horizon, while the % firm problem is infinite horizon, but this is fine). Obviously a bunch of @@ -51,7 +51,7 @@ Params.beta = 0.95; % Changed to get S to increase nearer to 1 given r=0.05 (ran it with beta=0.99, got S=0.3, so increased this; note that it interacts with sj to give the actual discount factor) % Preferences Params.sigma = 2; % Coeff of relative risk aversion (curvature of consumption) -Params.eta = 1.5; % Curvature of leisure (This will end up being 1/Frisch elasty) +Params.eta = 1.5; % Curvature of leisure (This will end up being 1/Frisch elasticity) Params.psi = 2; % Weight on leisure % Demographics @@ -96,7 +96,7 @@ % Warm glow of bequest Params.warmglow1=0.3; % (relative) importance of bequests Params.warmglow2=3; % bliss point of bequests (essentially, the target amount) -Params.warmglow3=Params.sigma; % By using the same curvature as the utility of consumption it makes it much easier to guess appropraite parameter values for the warm glow +Params.warmglow3=Params.sigma; % By using the same curvature as the utility of consumption it makes it much easier to guess appropriate parameter values for the warm glow % Taxes Params.tau_l = 0.2; % Tax rate on labour income @@ -105,7 +105,7 @@ % Production Params.alpha_k=0.311; % diminishing returns to capital input Params.alpha_l=0.650; % diminishing returns to labor input -Params.delta=0.054; % Deprecitation of physical capital +Params.delta=0.054; % Depreciation of physical capital % Capital adjustment costs Params.capadjconstant=1.21; % term in the capital adjustment cost % Tax @@ -113,7 +113,7 @@ Params.phi=0.5; % Fraction of capital adjustment costs that can be deducted from corporate earnings Params.tau_d=0.2; % Tax rate on dividends Params.tau_cg=0.2; % Tax rate on capital gains -% Idiosyncatic productivity shocks +% Idiosyncratic productivity shocks Params.rho_z_firm=0.767; Params.sigma_z_e_firm=0.211;