src/equilibrium.m [96:141]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Solve for Equilibrium wages, given reduction in demand.%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
demand_shift = deployment(year)*multi;

% Loop over wage changes until convergence
LH_wage_lagged = 40000;
SH_wage_lagged = 40000;
step = 100;
while step > 0.001

    % Find equilibrium LH wage
    params = [lh_intercept,lh_demand_e,fe_long,fe_short,fe_other,wage_supply_e,lf,demand_shift];
    w0 = 10000;
    f = @(w) excess_demand_lh(w,SH_wage_lagged,O_wage,params);
    LH_wage = fmincon(f,w0);
    
    % Get LH employment
    lh_employment = lh_demand(LH_wage,params);
    lh_employment_true = lh_employment
    lh_employment = lh_employment + demand_shift;
    
    % Graph LH market
    for i = 1:20
        w1(i) = 1000*(i+35);
        q1(i) = lh_demand(w1(i),params);
        if q1(i) < 0
            q1(i) = 0;
        end     
    end

    for i = 1:20
        w2(i) = 1000*(i+35);
        q2(i) = lh_supply(w2(i),params,30000,30000);
        if q2(i) < 0
            q2(i) = 0;
        end
    end
    
    for i = 1:20
        w3(i) = 1000*(i+35);
        q3(i) = lh_demand(w3(i),params) - 2000000;
        if q3(i) < 0
            q3(i) = 0;
        end    
    end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/equilibrium_with_growth.m [106:151]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Solve for Equilibrium wages, given reduction in demand.%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
demand_shift = deployment(year)*multi;

% Loop over wage changes until convergence
LH_wage_lagged = 40000;
SH_wage_lagged = 40000;
step = 100;
while step > 0.001

    % Find equilibrium LH wage
    params = [lh_intercept,lh_demand_e,fe_long,fe_short,fe_other,wage_supply_e,lf,demand_shift];
    w0 = 10000;
    f = @(w) excess_demand_lh(w,SH_wage_lagged,O_wage,params);
    LH_wage = fmincon(f,w0);
    
    % Get LH employment
    lh_employment = lh_demand(LH_wage,params);
    lh_employment_true = lh_employment
    lh_employment = lh_employment + demand_shift;
    
    % Graph LH market
    for i = 1:20
        w1(i) = 1000*(i+35);
        q1(i) = lh_demand(w1(i),params);
        if q1(i) < 0
            q1(i) = 0;
        end     
    end

    for i = 1:20
        w2(i) = 1000*(i+35);
        q2(i) = lh_supply(w2(i),params,30000,30000);
        if q2(i) < 0
            q2(i) = 0;
        end
    end
    
    for i = 1:20
        w3(i) = 1000*(i+35);
        q3(i) = lh_demand(w3(i),params) - 2000000;
        if q3(i) < 0
            q3(i) = 0;
        end    
    end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



