Question about GE conditions. Sometimes we would like to give more weight to some conditions relative to others. Obviously, it does not matter theoretically as long as the number of GE parameters is equal to the number of GE conditions. In practice, however, when using a minimization routine like fminsearch, you can make convergence faster by giving a larger weight to some conditions that are more difficult to clear.
We have seen that in HeteroAgentStationaryEqm_Case1_subfn.m
there is a variable called heteroagentoptions.multiGEweights
. How does it work? Can the user set it?
GeneralEqmConditions=sqrt(sum(heteroagentoptions.multiGEweights.*(GeneralEqmConditionsVec.^2)));
In our code we have two GE conditions:
GeneralEqmEqns.CapitalMarket = @(K_to_L,A,L,K_entre,N_entre) K_to_L-(A-K_entre)/max(L-N_entre,1e-4);
% - G/Y is equal to the target, where G = TotalTax-Pensions.
% Note that Y_corp = F(K_corp,N_corp), where F(.) is Cobb-Douglas
GeneralEqmEqns.govbudget = @(G_to_Y,Pensions,TotalTax,A,Y_entre,K_entre,N_entre,L,alpha) ...
50*((TotalTax-Pensions)/((A-K_entre)^alpha*(L-N_entre)^(1-alpha)+Y_entre) - G_to_Y);
It turn out that fminsearch was good at setting CapitalMarket
close to zero but govbudget
was stuck at some positive value. So, instead of changing initial conditions for the GE parameters, we multiplied the equation for govbudget
by 50 (!!) and fminsearch converged nicely: both GE conditions got very close to zero.
Is there a way to do this trick with heteroagentoptions.multiGEweights
? For example,
heteroagentoptions.multiGEweights=[1,50]
?