diff --git a/OLGModel14.m b/OLGModel14.m index e446a1f..f49144c 100644 --- a/OLGModel14.m +++ b/OLGModel14.m @@ -129,12 +129,18 @@ % 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.AccidentBeq=0.02; % Accidental bequests (this is the lump sum transfer received after capital gains taxes and dilution due to population growth, but before estate taxes) 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; -Params.Lhscale=0.21; % Scaling the household labor supply +Params.P0=2.18; % This price is not 1 because we need price for older and younger agents to balance +Params.Lhscale=0.22; % Scaling the household labor supply + +% We build a simple model of acquiring and disposing of stock over a lifetime +Params.S_agej_first=20; % the age at which we start acquiring more stock than noise +Params.S_agej_peak_first=Params.Jr-1; % the age of first peak acquisition +Params.S_agej_peak_last=Params.Jr+5; % the age of last peak acquisition +Params.S_agej_last=Params.J-5; % the age of final disposal %% Grids for household @@ -184,8 +190,8 @@ % For households DiscountFactorParamNames.household={'beta','sj'}; % Notice we use 'OLGModel14_HouseholdReturnFn' -ReturnFn.household=@(h,sprime,s,z,e,sigma,psi,eta,agej,Jr,J,pension,w,P0,D,kappa_j,warmglow1,warmglow2,AccidentBeq,r,tau_l,tau_d,tau_cg)... - OLGModel14_HouseholdReturnFn(h,sprime,s,z,e,sigma,psi,eta,agej,Jr,J,pension,w,P0,D,kappa_j,warmglow1,warmglow2,AccidentBeq,r,tau_l,tau_d,tau_cg); +ReturnFn.household=@(h,sprime,s,z,e,sigma,psi,eta,agej,Jr,J,pension,w,P0,D,kappa_j,warmglow1,warmglow2,AccidentBeq,r,tau_l,tau_d,tau_cg,S_agej_first,S_agej_peak_first,S_agej_peak_last,S_agej_last)... + OLGModel14_HouseholdReturnFn(h,sprime,s,z,e,sigma,psi,eta,agej,Jr,J,pension,w,P0,D,kappa_j,warmglow1,warmglow2,AccidentBeq,r,tau_l,tau_d,tau_cg,S_agej_first,S_agej_peak_first,S_agej_peak_last,S_agej_last); % For firms DiscountFactorParamNames.firm={'firmbeta'}; @@ -224,7 +230,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','G','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,8 +249,28 @@ 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) (agej0.1,1,'first')-1,1); +Params.S_agej_last=min(find(AgeConditionalStats.household.Mean>0.5,1,'last')+1,length(AgeConditionalStats.household.Mean)); % warmglow creates extra long tail we want to ignore +[~,S_agej_peak]=max(AgeConditionalStats.household.Mean); +S_peak_inflection_value=0.95*AgeConditionalStats.household.Mean(S_agej_peak); +for S_agej_peak_first=S_agej_peak:-1:Params.S_agej_first + if AgeConditionalStats.household.Mean(S_agej_peak_first)=s + agej_bought=agej; + cg=0; % We are holding or buying, so no capital gains +else + if agej<=S_agej_peak_first + agej_bought=agej-1; + Plag=P0*(1-2*r); % Dispose of shares presumably acquired recently + elseif S_agej_peak_last==S_agej_last % Bulk liquidation + % Sell all remaining shares from first acquisition to buy-point (using geometric mean to average acquisition cost) + agej_bought=S_agej_peak_first-sqrt(S_agej_peak_first-S_agej_first); + Plag=P0*(1-2*r)^(agej-agej_bought); + at_death=0; % Don't bulk liquidate twice + else + % Estimate where we are past peak accumulation and mirror around to + % proportional acquisition point + agej_selling_pct=(agej-S_agej_peak_last)/(S_agej_last-S_agej_peak_last); + agej_bought=S_agej_peak_first-agej_selling_pct*(S_agej_peak_first-S_agej_first); + Plag=P0*(1-2*r)^(agej-agej_bought); + end + cg=tau_cg*(P0-Plag)*(s+AccidentBeq-sprime); +end + +if at_death && agej_bought>=S_agej_first + % Sell all remaining shares from first acquisition to buy-point (using geometric mean to average acquisition cost) + Plag=P0*(1-2*r)^(agej_bought-sqrt(agej_bought-S_agej_first)); + cg=cg+tau_cg*(P0-Plag)*sprime; +end + + +end diff --git a/OLGModel14_HouseholdConsumptionFn.m b/OLGModel14_HouseholdConsumptionFn.m index 2dfbfd6..de983be 100644 --- a/OLGModel14_HouseholdConsumptionFn.m +++ b/OLGModel14_HouseholdConsumptionFn.m @@ -1,4 +1,4 @@ -function c=OLGModel14_HouseholdConsumptionFn(h,sprime,s,z,e,agej,Jr,pension,w,P0,D,kappa_j,AccidentBeq,r,tau_l,tau_d,tau_cg) +function c=OLGModel14_HouseholdConsumptionFn(h,sprime,s,z,e,agej,Jr,pension,w,P0,D,kappa_j,AccidentBeq,r,tau_l,tau_d,tau_cg,S_agej_first,S_agej_peak_first,S_agej_peak_last,S_agej_last) % Replace assets with 'share holdings' % Get rid of progressive taxes % Add Lhnormalize @@ -7,16 +7,36 @@ % 1+r = (P0 +(1-tau_d)D - tau_cg(P0-P))/Plag % We are looking at stationary general eqm, so % Plag=P; -% And thus we have -P=((1-tau_cg)*P0 + (1-tau_d)*D)/(1+r-tau_cg); +% And thus we have P=((1-tau_cg)*P0 + (1-tau_d)*D)/(1+r-tau_cg); -Plag=P; % As stationary general eqm +P=P0; +if sprime>=s + agej_bought=agej; + Plag=P0; % We are holding or buying, so no capital gains + cg=0; +else + if agej<=S_agej_peak_first + agej_bought=agej-1; + Plag=P0*(1-2*r); % Dispose of shares presumably acquired recently + elseif S_agej_peak_last==S_agej_last % Bulk liquidation + % Sell all remaining shares from first acquisition to buy-point (using geometric mean to average acquisition cost) + agej_bought=S_agej_peak_first-sqrt(S_agej_peak_first-S_agej_first); + Plag=P0*(1-2*r)^(agej-agej_bought); + else + % Estimate where we are past peak accumulation and mirror around to + % proportional acquisition point + agej_selling_pct=(agej-S_agej_peak_last)/(S_agej_last-S_agej_peak_last); + agej_bought=S_agej_peak_first-agej_selling_pct*(S_agej_peak_first-S_agej_first); + Plag=P0*(1-2*r)^(agej-agej_bought); + end + cg=tau_cg*(P0-Plag)*(s+AccidentBeq-sprime); +end if agej=0 is being implicitly imposed by grid on s diff --git a/OLGModel14_HouseholdIncomeFn.m b/OLGModel14_HouseholdIncomeFn.m index 11f1daf..ea25b79 100644 --- a/OLGModel14_HouseholdIncomeFn.m +++ b/OLGModel14_HouseholdIncomeFn.m @@ -1,4 +1,4 @@ -function income=OLGModel14_HouseholdIncomeFn(h,sprime,s,z,e,agej,Jr,pension,w,P0,D,kappa_j,AccidentBeq,r,tau_l,tau_d,tau_cg) +function income=OLGModel14_HouseholdIncomeFn(h,sprime,s,z,e,agej,Jr,pension,w,P0,D,kappa_j,AccidentBeq,r,tau_l,tau_d,tau_cg,S_agej_first,S_agej_peak_first,S_agej_peak_last,S_agej_last) % Replace assets with 'share holdings' % Get rid of progressive taxes % Add Lhnormalize @@ -7,17 +7,36 @@ % 1+r = (P0 +(1-tau_d)D - tau_cg(P0-P))/Plag % We are looking at stationary general eqm, so % Plag=P; -% And thus we have -P=((1-tau_cg)*P0 + (1-tau_d)*D)/(1+r-tau_cg); +% And thus we have P=((1-tau_cg)*P0 + (1-tau_d)*D)/(1+r-tau_cg); -Plag=P; % As stationary general eqm +if sprime>=s + agej_bought=agej; + Plag=P0; % We are holding or buying, so no capital gains + cg=0; +else + if agej<=S_agej_peak_first + agej_bought=agej-1; + Plag=P0*(1-2*r); % Dispose of shares presumably acquired recently + elseif S_agej_peak_last==S_agej_last % Bulk liquidation + % Sell all remaining shares from first acquisition to buy-point (using geometric mean to average acquisition cost) + agej_bought=S_agej_peak_first-sqrt(S_agej_peak_first-S_agej_first); + Plag=P0*(1-2*r)^(agej-agej_bought); + else + % Estimate where we are past peak accumulation and mirror around to + % proportional acquisition point + agej_selling_pct=(agej-S_agej_peak_last)/(S_agej_last-S_agej_peak_last); + agej_bought=S_agej_peak_first-agej_selling_pct*(S_agej_peak_first-S_agej_first); + Plag=P0*(1-2*r)^(agej-agej_bought); + end + cg=tau_cg*(P0-Plag)*(s+AccidentBeq-sprime); +end if agej=0 is being implicitly imposed by grid on s diff --git a/OLGModel14_HouseholdReturnFn.m b/OLGModel14_HouseholdReturnFn.m index 058948a..22f166f 100644 --- a/OLGModel14_HouseholdReturnFn.m +++ b/OLGModel14_HouseholdReturnFn.m @@ -1,23 +1,57 @@ -function F=OLGModel14_HouseholdReturnFn(h,sprime,s,z,e,sigma,psi,eta,agej,Jr,J,pension,w,P0,D,kappa_j,warmglow1,warmglow2,AccidentBeq,r,tau_l,tau_d,tau_cg) +function F=OLGModel14_HouseholdReturnFn(h,sprime,s,z,e,sigma,psi,eta,agej,Jr,J,pension,w,P0,D,kappa_j,warmglow1,warmglow2,AccidentBeq,r,tau_l,tau_d,tau_cg,S_agej_first,S_agej_peak_first,S_agej_peak_last,S_agej_last) % Replace assets with 'share holdings' % Get rid of progressive taxes % Add Lhnormalize + % 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 % We are looking at stationary general eqm, so % Plag=P; -% And thus we have -P=((1-tau_cg)*P0 + (1-tau_d)*D)/(1+r-tau_cg); +% And thus we have P=((1-tau_cg)*P0 + (1-tau_d)*D)/(1+r-tau_cg); + +% But in fact the price does not meaningfully represent the acquisition +% cost by a younger generation that is now older in this stationary +% distribution. However, we can use the history of acquisition and +% disposals to impute when agents are buying and selling, and thus what +% capital gains they should pay. We imagine that stocks earn 2x the +% risk-free rate of return (i.e., 2*r) and that if we are selling before +% they peak, we are selling recently acquired stocks, whereas if we are +% selling at or after the peak of acquisition, we are selling long-term +% gains in a LIFO fashion. -Plag=P; % As stationary general eqm +% We take P0 as the price of the current stationary distribution, and we +% back-calculate what the price Plag may have been in the past. + +P=P0; +if sprime>=s + agej_bought=agej; + Plag=P0; % We are holding or buying, so no capital gains + cg=0; +else + if agej<=S_agej_peak_first + agej_bought=agej-1; + Plag=P0*(1-2*r); % Dispose of shares presumably acquired recently + elseif S_agej_peak_last==S_agej_last % Bulk liquidation + % Sell all remaining shares from first acquisition to buy-point (using geometric mean to average acquisition cost) + agej_bought=S_agej_peak_first-sqrt(S_agej_peak_first-S_agej_first); + Plag=P0*(1-2*r)^(agej-agej_bought); + else + % Estimate where we are past peak accumulation and mirror around to + % proportional acquisition point + agej_selling_pct=(agej-S_agej_peak_last)/(S_agej_last-S_agej_peak_last); + agej_bought=S_agej_peak_first-agej_selling_pct*(S_agej_peak_first-S_agej_first); + Plag=P0*(1-2*r)^(agej-agej_bought); + end + cg=tau_cg*(P0-Plag)*(s+AccidentBeq-sprime); +end F=-Inf; if agej0