// Endogenous and Exogenous Variables var cT cN yT yN hT hN w pT g d phi tau h h_ssT p_ssX; varexo pX; // Parameters parameters a xi alpha gamma r aT aN hbar epsilon W; // Parameter Values a = 0.7; // Cobb-Douglas Utility Weight xi = 0.5; // Substitution parameter between cT and cN alpha = 0.33; // Labour share in production gamma = 0.2; // Government Spending Parameter r = 0.04; // World interest rate aT = 1; // Productivity in the tradable sector aN = 1; // Productivity in the nontradable sector hbar = 1; // Total labour endowment epsilon = 1; // Exchange Rate W = 1; // Nominal Wage Rate // Model equations model; // HOUSEHOLDS // Household Budget Constraint cT + pT * cN + d + tau = w * h + phi + d(+1)/(1+r); // Household Optimality pT = (1-a)/a * (cT/cN)^(1/xi); // FIRMS // Tradable Firm Production Function yT = aT * hT^(1-alpha); // Non-tradable Firm Production Function yN = aN * hN^(1-alpha); // Tradable Labour Demand w = pX * aT * (1-alpha) * hT^(-alpha); // Non-tradable Labour Demand w = pT * aN * (1-alpha) * hN^(-alpha); // GOVERNMENT // Government Budget Constraint tau = g * (gamma + pT); // MARKET CLEARING //Non-tradable Market Clearing cN + g = yN; //Labour Market Clearing h = hT + hN; // External Debt Evolution cT + gamma*g + d = pX * yT + d(+1)/(1+r); // STEADY STATE pT = (1-a)/a * ((cT/((h - hT)^(1-alpha) - g))^(1/xi)); pT = (W/epsilon)/((1-alpha)*(h-hT)^(-alpha)); pX * (1-alpha) * (hT)^(-alpha) = W/epsilon; cT + gamma*r/(1+r) * g = r/(1+r) * pX * (hT)^(1-alpha) + 1/(1+r) * p_ssX * (h_ssT)^(1-alpha); (1-a)/a * ((cT/((hbar - h_ssT)^(1-alpha)))^(1/xi)) = (p_ssX * (1-alpha) * h_ssT^(-alpha))/((1-alpha) * (hbar - h_ssT)^(-alpha)); end; // EXOGENOUS SHOCKS shocks; var pX; stderr 1; end; stoch_simul(order=1, irf=20);