%Description of the Alvarez-Lucas algorithm
%It is used to solve for the changes in the equilibrium wages and prices.
%1) Start with the equation for the change in prices (equation 8 in the paper). Line 130 in the matlab code defines this equation.
%Express the price equation in logs. pf and wf express the change in prices and wages. We can put all the price equations
%together as ln(pf)=h(ln(pf),ln(wf)). If we fixed ln(wf) then h(.,ln(wf)) maps g(ln(wf)) into (Tg)(ln(wf))=h(g(ln(wf)),ln(wf)),
%with a fixed point ln(pf)(ln(wf))=(Tln(pf))(ln(wf)).This mapping T is a contraction.
%Thus, to find the vector of normalized price changes, given a vector of
%relative wage changes, simply iterate on the mapping T .
%2)Having solved for ln(pf)(ln(wf)),solve for the counterfactual
%expenditure share matrix (lines 137 to 139 in the matlab code) as a function of ln(wf).
%3)Line 142 in the matlab code defines the excess of demand equation Z(wf).
%We have that Z(wf)=0 evaluated at the equilibrium relative wage changes.
%For some v in the interval (0,1] define the mapping T as in line 143 in
%the matlab code. A fixed point of T satisfies the equilibrium condition of
%zero excess demand. It maps a change in wages vector into a new change in
%wages vector.
%4) Having solved for the equilibrium change in wages, we can now solve for
%the equilibrium change in prices and the counterfactual expenditure share
%matrix.