$TITLE HT3: HALL-TAYLOR OPEN ECONOMY FLEXIBLE EXCHANGE RATE OPTION SYSOUT = OFF; OPTION LIMROW = 0; OPTION LIMCOL = 0; OPTION SOLPRINT = OFF; $OFFSYMXREF OFFSYMLIST *********************************************************************** * This program takes as reference the model: * "agg. demand / price adj. open economy flexible exchg. rate" * as it is defined in Robert Hall and John Taylor's "MACROSOLVE", * the software accompaning their "Macroeconomics" book * (fourth edition, 1993) * * Program developed by Ruben Mercado at the * Department of Economics - The University of Texas at Austin * Austin, TX, June 1996 * *********************************************************************** * Run your experiments on different copies of this program, so you * will always start from the default values for parameters, policy * variables and exogenous variables *********************************************************************** * * This program has 9 sections * As in MACROSOLVE, you are encouraged to modify the values or * policy variables and exogenous variables, and / or the values of * some structural parameters * * The results of interest will be at the end of the GAMS output * in Reports containing simulations' results and also in a * display statement, containing the values of the elements of * the matrices of the state-space representation to be used as * inputs for control experiments with DUALI * * Section 1: definition of parameter values for the original * nonlinear Hall-Taylor model * Section 2: computation of the steady-state (base-case ) values * for the nonlinear model * Section 3: parameters' modification * Section 4: definition of temporal horizon for simulation * Section 5: definition of changes in policy and in exogenous variables * Section 6: computation of solution for the original nonlinear dynamic * model as it is in MACROSOLVE * Section 7: transformation the nonlinear model into a linear * structural model in percentage changes (Johansen's * method) around the steady-state base case * Section 8: transformation of the linear structural model into * its reduced-form * representation * Section 9: transformation of the reduced-form representation into its * state-space representation *********************************************************************** *********************************************************************** *********************************************************************** * * SECTION 1 : DEFINITION OF PARAMETER VALUES FOR THE ORIGINAL * NONLINEAR HALL-TAYLOR MODEL * *********************************************************************** *********************************************************************** *********************************************************************** * The first number indicates "equation number" and the second * indicates "parameter number" in the equation. for example, e2p1 * means "second equation - first parameter (from left to right)" in * the original hall-taylor model * * Do not modify these parameters; below, you will find a special * section to make changes in parameters *********************************************************************** SCALARS e2p1 constant do not modify / 1 / e2p2 tax rate / 0.1875 / e3p1 minimum consumption / 220 / e3p2 marg prop to consume / 0.7754 / e4p1 maximum investment / 1000 / e4p2 interest elast of invest. / 2000 / e5p0 constant / 0 / e5p1 income elast of money dem. / 0.1583 / e5p2 interest elast of mon dem. / 1000 / e6p1 coeff. on 1 lagged inflation / 0.4 / e6p2 coeff. on 2 lagged inflation / 0.2 / e7p1 coeff. on excess aggr dem / 0.8 / e8p1 constant do not modify / 1 / e9p1 constant / 0.75 / e9p2 ppp when us interest rate is 5% / 5 / e10p1 constant / 600 / e10p2 income elast of net exp / 0.10 / e10p3 real ex rate elast of net exp / 100 / e11p1 tax rate (same as e2p2) / 0.1875 / e12p1 elast. of empl. w.r.t. GDP / 0.33 / ; *********************************************************************** *********************************************************************** * * SECTION 2: COMPUTATION OF THE STEADY-STATE (BASE-CASE ) VALUES * FOR THE NONLINEAR MODEL * This steady-state solution is the solution of the * original Hall-Taylor Nonlinear Dnamic Model when * time subscripts are eliminated *********************************************************************** *********************************************************************** * Do not modify the values below *********************************************************************** SCALARS Mss money stock / 900 / Gss Gov. expenditure / 1200 / plevwss foreing price level / 1 / YNss potential GDP / 6000 / UNss natural rate of unemployment / 0.05 / ; VARIABLES Yss GDP Css consumption Iss investment YDss disposable income Rss real rate of interest PEss expected inflation Pss inflation Ess nominal exchange rate Xss net exports plevss price level GDss Government deficit Uss Unemployment rate J1 performance index * Note: the performance index does not play any role in this model or * in the models in other sections. It is just a device for GAMS to * compute a solution EQUATIONS ss1 gdp identity ss2 disposable income ss3 consumption ss4 investment ss5 money demand ss6 expected inflation ss7 inflation rate ss8 price level ss9 real exchange rate ss10 net exports ss11 Government deficit ss12 unemployment rate JD1 ; JD1.. J1 =E= 0 ; ss1.. Yss =E= Css + Iss + Gss + Xss ; ss2.. YDss =E= (e2p1 - e2p2) * Yss ; ss3.. Css =E= e3p1 + e3p2 * YDss ; ss4.. Iss =E= e4p1 - e4p2 * Rss ; ss5.. Rss =E= (e5p0 + e5p1 * Yss - Mss / plevss) * (1 / e5p2) ; ss6.. PEss =E= e6p1 * Pss + e6p2 * Pss ; ss7.. Pss =E= Pess + e7p1 * (Yss - YNss) / YNss ; ss8.. plevss =E= plevss * (e8p1 + Pss) ; ss9.. Ess =E= e9p1 * (plevwss / plevss) + e9p2 * Rss * (plevwss / plevss) ; ss10.. Xss =E= e10p1 - e10p2 * Yss - e10p3 * ( Ess * plevss / plevwss) ; ss11.. GDss =E= Gss - e11p1 * Yss ; ss12.. Uss =E= UNss - e12p1 * (Yss - YNss) / YNss ; plevss.LO = 0.01; MODEL STEADYST / ss1, ss2, ss3, ss4, ss5, ss6, ss7, ss8, ss9, ss10,ss11,ss12, JD1 / ; SOLVE STEADYST MAXIMIZING J1 USING NLP; DISPLAY Yss.L , YDss.L, Css.L, Iss.L, Rss.L, PEss.L, Pss.L, plevss.L, Ess.L, Xss.L , GDss.L, Uss.L ; *********************************************************************** *********************************************************************** * SECTION 3: PARAMETERS' MODIFICATION * You can modify the values within the specified ranges * (notice that all values are in absolute value) * *********************************************************************** *********************************************************************** * MARG PROP TO CONSUME: range > 0.4 and < 1.01 (default value: 0.7754) e3p2 = 0.7754 ; * INTEREST ELAST OF INVESTMENT: range > 100 and < 4000 (default value: 2000) e4p2 = 2000 ; * INCOME ELAST.OF MONEY DEMAND: range > 0.1 and < 0.325 (default value: 0.1583) e5p1 = 0.1583 ; * INTEREST ELAST.OF MONEY DEMAND: range > 100 and < 2000 (default value: 1000) e5p2 = 1000 ; * RESPONSE OF INFLATION TO EXPECT.: range > 0 and < 0.8 (default value: 0.4) e6p1 = 0.4 ; * OUTPUT RESPONSIVENESS OF PRICES: range > 0 and < 1.6 (default value: 0.8) e7p1 = 0.8 ; * INCOME ELAST.OF NET EXPORTS: range > 0 and < 0.2 (default value: 0.10) e10p2 = 0.10 ; * COMPUTATION OF MODIFIED VALUES OF CONSTANT TERMS * To mantain the same steady-state values after modifying parameters, we * re-compute the value of the constant terms of the affected equations. This * is the "trick" played by Macrosolve every time you change parameters * Remember that e3p1 means "equation 3 - parameter 1" and so on e3p1 = Css.L - e3p2 * YDss.L ; e4p1 = Iss.L + e4p2 * Rss.L ; e5p0 = (Mss / plevss.L) - (e5p1 * Yss.L) + (e5p2 * Rss.L) ; e10p1 = Xss.L + e10p2 * Yss.L + e10p3 * ( Ess.L * plevss.L / plevwss) ; DISPLAY e3p1, e4p1, e5p0, e10p1 ; *********************************************************************** *********************************************************************** * SECTION 4: DEFINITION OF TEMPORAL HORIZON FOR SIMILATION *********************************************************************** *********************************************************************** * If you change the extension of the horizon, make the necessary * adjustments in the section of shocks' definition (Section 5) *********************************************************************** SETS T EXTENDED HORIZON / 0*30 / T0(T) PERIOD ZERO T1(T) PERIOD ONE ; T0(T) = YES$(ORD(T) EQ 1); T1(T) = YES$(ORD(T) EQ 2); DISPLAY T0, T1; *********************************************************************** *********************************************************************** * SECTION 5 : DEFINITION OF CHANGES IN POLICY AND IN EXOGENOUS VARIABLES *********************************************************************** *********************************************************************** PARAMETERS * definition of policy and exogenous variables (in percentage changes) M(T) money stock (in % change) G(T) Gov. expenditure (in % change) YN(T) potential GDP (in % change) PW(T) foreign prices (in % change) * definition of policy and exogenous variables (in levels) Mlev(T) money stock (in levels) Glev(T) Gov. expenditure (in levels) YNlev(T) potential GDP (in levels) plevw(T) foreign prices (in levels) ; * default values for policy and exogenous variables M(T) = 0 ; G(T) = 0 ; YN(T) = 0 ; PW(T) = 0 ; Mlev(T) = 900 ; Glev(T) = 1200 ; YNlev(T) = 6000 ; plevw(T) = 1 ; *********************************************************************** * Changes in policy and in exogenous variables * * You can modify the values of the policy and/or the exogenous * variables. You have to define the modifications in % changes. Their * equivalent in levels are automatically computed (these are used in * the simulation of the nonlinear dynamic model) * For example, to increase the money supply by 3%, change the * expression below from M(TS1) = 0.0 to M(TS1) = 0.03 * * You can also modify the duration of the modifications * If you do so, the modifications will have to be compatible with the * simulation horizon defined in Section 4 * Default modifications start in period 4, for you to contrast * the changes introduced by your experiments with the previous steady- * state of the system * * * You can define as many modifications as you want, following * the format below * * As in MACROSOLVE, you can modify the money supply, Gov. expenditure, * the tax rate and potential GDP. Here, you can also modify the foreign * price. However, you will not be able to shock the price level (an * endogenous variable). You will have the opportunity of shocking * endogenous variables when experimentign with stochastic control in DUALI. * *********************************************************************** ****************************** * CHANGE IN MONEY SUPPLY ****************************** SETS TS1(T) periods for shock 1 / 4*30 / ; M(TS1) = 0.0 ; **************************************** * CHANGE IN GOVERNMENT EXPENDITURE **************************************** SETS TS2(T) periods for shock 2 / 4*30 / ; G(TS2) = 0.0; ****************************** * CHANGE IN POTENTIAL GNP ****************************** SETS TS3(T) periods for shock 3 / 4*30 / ; YN(TS3) = 0.0; **************************** * CHANGE IN FOREIGN PRICES **************************** SETS TS4(T) periods for shock 4 / 4*30 / ; PW(TS4) = 0.0; *********************************************************************** * CHANGE IN THE TAX RATE: range > 0.16 and < 0.2 (default value 0.1875) *********************************************************************** * For this parameter, changes in its value will not be steady-state * neutral. If you modify the tax rate alone, you will be able to observe * its effects in the Nonlinear Dynamic model only. Its linearized * representations will not show any change because they work with * variables in percentage changes with respect to a steady-state in * which all their values are, of course, equal to zero. However, if * you modify the tax rate and any other policy or exogenous variable, * both effects will be observable, not only in the Nonlinear Model * solution but also in the solutions of its linear representations e2p2 = 0.1875 ; * Transformation of shocks in % changes into shocks in levels Mlev(TS1) = 900 * (1 + M(TS1)) ; Glev(TS2) = 1200 * (1 + G(TS2)) ; YNlev(TS3) = 6000 * (1 + YN(TS3)) ; plevw(TS4) = 1 * (1 + PW(TS4)) ; * reporting policy and exogenous varialbles values used for the simulation PARAMETER REPORTEX POLICY AND EXOGENOUS VARIABLES VALUES; REPORTEX(T,"Money") = Mlev(T); REPORTEX(T,"Gov. Exp.") = Glev(T); REPORTEX(T,"Pot. GDP") = YNlev(T); REPORTEX(T,"Fgn Price") = plevw(T); REPORTEX(T,"Tax Rate") = e2p2; *********************************************************************** *********************************************************************** * SECTION 6: COMPUTATION OF SOLUTION FOR THE ORIGINAL DYNAMIC * NONLINEAR MODEL AS IT IS IN MACROSOLVE ************************************************************************ *********************************************************************** PARAMETERS UN(T) natural rate of unemployment ; UN(T) = 0.05 ; VARIABLES Ylev(T) gdp Ydlev(T) disposable income Clev(T) consumption Ilev(T) investment Rlev(T) interest rate plev(T) price level P(T) inflation rate Pe(T) expected inflation rate Elev(T) nominal exchange rate Xlev(T) net exports GDlev(T) government deficit U(T) unemployment rate J2 performance index EQUATIONS nd1(T) gdp identity nd2(T) disposable income nd3(T) consumption nd4(T) investment nd5(T) money demand nd6(T) expected inflation nd7(T) inflation rate nd8(T) price level nd9(T) real exchange rate nd10(T) net exports nd11(T) government deficit nd12(T) unemployment rate JD2(T) performance index ; JD2(T).. J2 =E= 0 ; nd1(T+2).. Ylev(T+2) =E= Clev(T+2) + Ilev(T+2) + Glev(T+2) + Xlev(T+2) ; nd2(T+2).. YDlev(T+2) =E= (e2p1 - e2p2) * Ylev(T+2) ; nd3(T+2).. Clev(T+2) =E= e3p1 + e3p2 * YDlev(T+2) ; nd4(T+2).. Ilev(T+2) =E= e4p1 - e4p2 * Rlev(T+2) ; nd5(T+2).. Rlev(T+2) =E= (e5p0 + e5p1 * Ylev(T+2) - Mlev(T+2) / plev(T+2)) * (1/ e5p2) ; nd6(T+2).. Pe(T+2) =E= e6p1 * P(T+1) + e6p2 * P(T) ; nd7(T+2).. P(T+2) =E= Pe(T+2) + e7p1 * (Ylev(T+1) - YNlev(T+2)) / YNlev(T+2) ; nd8(T+2).. plev(T+2) =E= plev(T+1) * (e8p1 + P(T+2)) ; nd9(T+2).. Elev(T+2) =E= e9p1 * (plevw(T+2) / plev(T+2)) + e9p2 * Rlev(T+2) * (plevw(T+2) / plev(T+2)) ; nd10(T+2).. Xlev(T+2) =E= e10p1 - e10p2 * Ylev(T+2) - e10p3 * ( Elev(T+2) * plev(T+2) / plevw(T+2)) ; nd11(T+2).. GDlev(T+2) =E= Glev(T+2) - e11p1 * Ylev(T+2) ; nd12(T+2).. U(T+2) =E= UN(T+2) - e12p1 * (Ylev(T+2) - YNlev(T+2)) / YNlev(T+2) ; *********************************************************************** * In what follows, we will assign initial variables' values and lower bounds * WARNING: The order of declaration of assignments is very important * Succesive assignments to a same variable undo the previous * ones *********************************************************************** * Guess of initial values for the solution algorithm * Without them, the problem will be declared "infeasible" * That is, the algorithm will converge to a solution from some initial * positions but not from others * This is common in nonlinear problems Rlev.L(T+2) = 0.09 ; Ylev.L(T+2) = 6500 ; Elev.L(T+2) = 1.2 ; Clev.L(T+2) = 4500 ; Ilev.L(T+2) = 900 ; Xlev.L(T+2) = -100 ; GDlev.L(T+2) = 75 ; U.L(T+2) = 0.07 ; YDlev.L(T+2) = 4875 ; P.L(T+2) = 0.1 ; Pe.L(T+2) = 0.2 ; plev.L(T+2) = 1.1 ; * lower bound for plev, to avoid division by zero plev.LO(T) = 0.0001 ; * fixing initial steady-state values for lagged endogenous variables plev.FX(T1) = 1 ; P.FX(T0) = 0 ; P.FX(T1) = 0 ; Ylev.FX(T1) = 6000 ; MODEL NONLDYN /nd1,nd2,nd3,nd4,nd5,nd6, nd7,nd8,nd9,nd10, nd11, nd12 , JD2 / ; SOLVE NONLDYN MAXIMIZING J2 USING NLP; * Reporting solution values PARAMETER REPORTY COMPARISSON OF GDP VALUES; REPORTY(T,"YDynNonLin") = Ylev.L(T); PARAMETER REPORTR COMPARISSON OF INTEREST RATE VALUES; REPORTR(T,"RDynNonLin") = Rlev.L(T); PARAMETER REPORTP COMPARISSON OF PRICE LEVEL VALUES; REPORTP(T,"PDynNonLin") = plev.L(T); PARAMETER REPORTE COMPARISSON OF EXCHANGE RATES VALUES; REPORTE(T,"EDynNonLin") = Elev.L(T); PARAMETER REPORTG COMPARISSON OF GOV DEFICIT VALUES; REPORTG(T,"GDynNonLin") = GDlev.L(T); PARAMETER REPORTU COMPARISSON OF UNEMPLOYMENT VALUES; REPORTU(T,"UDynNonLin") = U.L(T); *********************************************************************** *********************************************************************** * * SECTION 7: TRANSFORMATION OF THE NONLINEAR HALL-TAYLOR MODEL * INTO A LINEAR STRUCTURAL MODEL IN PERCENTAGE * CHANGES (JOHANSEN'S METHOD) AROUND THE STEADY- * STATE BASE CASE * We collapse the original 12 equation model * into a 4 equation model with GDP, Real * Interest Rate, Price Level and Nominal Exchange * Rate as endogenous variables *********************************************************************** *********************************************************************** SCALARS * Definition of parameters for GDP equation (equation yeqsf) sa12 sa13 sa14 sb12 sc12 aux * Definition of parameters for Interest Rate equation (equation reqsf) sa21 sa23 sb21 * Definition of parameters for Price equation (equation peqsf) sa131 sa133 sa233 sa333 sc31 * Definition of parameters for Exchange Rate equation (equation reqsf) sa42 sa43 sc42 ; * Computation of new parameters' values from parameters of the original * Hall-Taylor' Nonlinear Dynamic Model aux = (1 - (e3p2 * ( e2p1 - e2p2) - e10p2)); sa12 = (e4p2 * Rss.L) / (aux * Yss.L) ; sa13 = (e10p3 * Ess.L * plevwss * plevss.L) / (aux * (plevwss ** 2) * Yss.L); sa14 = (e10p3 * plevss.L * plevwss * Ess.L) / (aux * (plevwss ** 2) * Yss.L) ; sb12 = Gss / (aux * Yss.L); sc12 = (e10p3 * Ess.L * plevss.L * plevwss) / (aux * (plevwss ** 2) * Yss.L) ; sa21 = - (e5p1 * Yss.L) / (e5p2 * Rss.L) ; sa23 = - Mss * plevss.L / (e5p2 * (plevss.L ** 2) * Rss.L); sb21 = -Mss / (e5p2 * Rss.L) ; sa131 = e7p1 ; sa133 = 1 + e6p1 ; sa233 = e6p2 - e6p1 ; sa333 = -e6p2 ; sc31 = -e7p1 ; sa42 = - e9p2 * plevwss * Rss.L / ( plevss.L * Ess.L) ; sa43 = 1 ; sc42 = 1 ; * Definition of endogenous variables (in percentage changes) VARIABLES Y(T) percentage change in income R(T) percentage change in the real interest rate P(T) percentage change in prices (= inflation rate) E(T) percantage change in the nominal exchange rate J2 performance index * definition of the equations for the four-equation structural form model EQUATIONS yeqsf(T) GDP reqsf(T) interest rate peqsf(T) prices eeqsf(T) exchange rate; yeqsf(T).. Y(T) =E= -sa12 * R(T) - sa13 * P(T) - sa14 * E(T) + sb12 * G(T) + sc12 * PW(T); reqsf(T).. R(T) =E= -sa21 * Y(T) - sa23 * P(T) + sb21 * M(T); peqsf(T).. P(T) =E= sa131 * Y(T-1) + sa133 * P(T-1) + sa233 * P(T-2) + sa333 * P(T-3) + sc31* YN(T); eeqsf(T).. E(T) =E= -sa42 * R(T) - sa43 * P(T) + sc42 * PW(T); * Initial values for endogenous variables (in percentage changes) Y.FX(T0) = 0; R.FX(T0) = 0; P.FX(T0) = 0; E.FX(T0) = 0; MODEL STRFORM / JD2, yeqsf, reqsf, peqsf, eeqsf / ; SOLVE STRFORM MAXIMIZING J2 USING LP; * Computing and reporting solution values in levels PARAMETER YL(T) RL(T) PL(T) EL(T) ; YL(T) = 6000 * (1 + Y.L(T)); RL(T) = 0.05 * (1 + R.L(T)); PL(T) = 1 * (1 + P.L(T)); EL(T) = 1 * (1 + E.L(T)); PARAMETER REPORTY COMPARISSON OF GDP VALUES; REPORTY(T,"YStr.Form") = YL(T); PARAMETER REPORTR COMPARISSON OF INTEREST RATE VALUES; REPORTR(T,"RStr.Form") = RL(T); PARAMETER REPORTP COMPARISSON OF PRICE LEVEL VALUES; REPORTP(T,"PStr.Form") = PL(T); PARAMETER REPORTE COMPARISSON OF EXCHANGE RATES VALUES; REPORTE(T,"EStr.Form") = EL(T); * Computing and reporting solution values for Gov. Deficit and * Unemployment (all in levels). Since these two variables have * no feed-back on the rest of the model, they can be computed * after solving for the relevant endogenous variables PARAMETER GOVDEF(T) UNEMP(T) ; GOVDEF(T) = Glev(T) - e11p1 * YL(T) ; UNEMP(T) = UN(T) - e12p1 * (YL(T) - YNlev(T)) / YNlev(T); PARAMETER REPORTG COMPARISSON OF GOV DEFICIT VALUES; REPORTG(T,"GStr.Form") = GOVDEF(T); PARAMETER REPORTU COMPARISSON OF UNEMPLOYMENT VALUES; REPORTU(T,"UStr.Form") = UNEMP(T); *********************************************************************** *********************************************************************** * * SECTION 8: TRANSFORMATION OF THE LINEAR STRUCTURAL MODEL * INTO ITS REDUCED FORM REPRESENTATION * *********************************************************************** *********************************************************************** SCALARS auxy0 auxy1 auxy2 auxy3 auxy4 auxy5 auxy6 auxy7 auxy8 * Definition of parameters for GDP equation (equation yeqrf) ra111 ra113 ra213 ra313 rb11 rb12 rc11 rc12 * Definition of parameters for the Interest Rate equation (equation reqrf) ra121 ra123 ra223 ra323 rb21 rb22 rc21 rc22 * Definition of parameters for Price equation (equation peqrf) ra131 ra133 ra233 ra333 rc31 * Definition of parameters for the Exchange Rate equation (equation eeqrf) ra141 ra143 ra243 ra343 rb41 rb42 rc41 rc42; * Computation of reduced form parameter values from the structural form * parameters auxy0 = 1 / (1 - ((-sa12) * (-sa21) + (-sa14) * (-sa42) * (-sa21))) ; auxy1 = ((-sa12) * (-sa23) * sa133) + ((-sa14) * (-sa43) * sa133) + ((-sa14) * (-sa42) * (-sa23) * sa133) + ((-sa13) * sa133) ; auxy2 = ((-sa12) * (-sa23) * sa233) + ((-sa14) * (-sa43) * sa233) + ((-sa14) * (-sa42) * (-sa23) * sa233) + ((-sa13) * sa233) ; auxy3 = ((-sa12) * (-sa23) * sa333) + ((-sa14) * (-sa43) * sa333) + ((-sa14) * (-sa42) * (-sa23) * sa333) + ((-sa13) * sa333) ; auxy4 = ((-sa12) * (-sa23) * sa131) + ((-sa14) * (-sa43) * sa131) + ((-sa14) * (-sa42) * (-sa23) * sa131) + ((-sa13) * sa131) ; auxy5 = ((-sa12) * (-sa23) * sc31) + ((-sa14) * (-sa43) * sc31) + ((-sa14) * (-sa42) * (-sa23) * sc31) + ((-sa13) * sc31) ; auxy6 = sb12 ; auxy7 = (-sa14) * sc42 + sc12 ; auxy8 = (-sa14) * (-sa42) * sb21 + (-sa12) * sb21 ; ra111 = auxy0 * auxy4 ; ra113 = auxy0 * auxy1 ; ra213 = auxy0 * auxy2 ; ra313 = auxy0 * auxy3 ; rb11 = auxy0 * auxy8 ; rb12 = auxy0 * auxy6 ; rc12 = auxy0 * auxy7 ; rc11 = auxy0 * auxy5 ; ra121 = ((-sa21) * auxy0 * auxy4) + ((-sa23) * sa131) ; ra123 = ((-sa21) * auxy0 * auxy1) + ((-sa23) * sa133) ; ra223 = ((-sa21) * auxy0 * auxy2) + ((-sa23) * sa233) ; ra323 = ((-sa21) * auxy0 * auxy3) + ((-sa23) * sa333) ; rb21 = ((-sa21) * auxy0 * auxy8) + sb21 ; rb22 = ((-sa21) * auxy0 * auxy6) ; rc21 = ((-sa21) * auxy0 * auxy5) + ((-sa23) * sc31) ; rc22 = ((-sa21) * auxy0 * auxy7) ; ra131 = sa131 ; ra133 = sa133 ; ra233 = sa233 ; ra333 = sa333 ; rc31 = sc31 ; ra141 = ((-sa43) * sa131) + ((-sa42) * (-sa23) * sa131) + ((-sa42) * (-sa21) * auxy0 * auxy4) ; ra143 = ((-sa43) * sa133) + ((-sa42) * (-sa23) * sa133) + ((-sa42) * (-sa21) * auxy0 * auxy1) ; ra243 = ((-sa43) * sa233) + ((-sa42) * (-sa23) * sa233) + ((-sa42) * (-sa21) * auxy0 * auxy2) ; ra343 = ((-sa43) * sa333) + ((-sa42) * (-sa23) * sa333) + ((-sa42) * (-sa21) * auxy0 * auxy3) ; rb41 = ((-sa42) * sb21) + ((-sa42) * (-sa21) * auxy0 * auxy8) ; rb42 = ((-sa42) * (-sa21) * auxy0 * auxy6) ; rc41 = ((-sa43) * sc31) + ((-sa42) * (-sa23) * sc31) + ((-sa42) * (-sa21) * auxy0 * auxy5) ; rc42 = sc42 + ((-sa42) * (-sa21) * auxy0 * auxy7) ; * Definition of equations for reduced form representation. * The endogenous variables were already defined in Section 7 EQUATIONS yeqrf(T) income reqrf(T) interest rate peqrf(T) prices eeqrf(T) exchange rate ; yeqrf(T).. Y(T) =E= ra111 * Y(T-1) + ra113 * P(T-1 ) + ra213 * P(T-2) + ra313 * P(T-3) + rb11 * M(T) + rb12 * G(T) + rc11 * YN(T) + rc12 * PW(T); reqrf(T).. R(T) =E= ra121 * Y(T-1) + ra123 * P(T-1) + ra223 * P(T-2) + ra323 * P(T-3) + rb21 * M(T) + rb22 * G(T) + rc21 * YN(T) + rc22 * PW(T); peqrf(T).. P(T) =E= ra131 * Y(T-1) + ra133 * P(T-1) + ra233 * P(T-2) + ra333 * P(T-3) + rc31 * YN(T); eeqrf(T).. E(T) =E= ra141 * Y(T-1) + ra143 * P(T-1) + ra243 * P(T-2) + ra343 * P(T-3) + rb41 * M(T) + rb42 * G(T) + rc41 * YN(T) + rc42 * PW(T); * Initial values for endogenous variables (in percentage changes) Y.L(T) = 0 ; R.L(T) = 0 ; P.L(T) = 0 ; E.L(T) = 0 ; MODEL REDFORM / JD2, yeqrf, reqrf, peqrf, eeqrf /; SOLVE REDFORM MAXIMIZING J2 USING LP; * Computing and reporting solution values in levels YL(T) = 6000 * (1 + Y.L(T)); RL(T) = 0.05 * (1 + R.L(T)); PL(T) = 1 * (1 + P.L(T)); EL(T) = 1 * (1 + E.L(T)); PARAMETER REPORTY COMPARISSON OF GDP VALUES; REPORTY(T,"YRed.Form") = YL(T); PARAMETER REPORTR COMPARISSON OF INTEREST RATE VALUES; REPORTR(T,"RRed.Form") = RL(T); PARAMETER REPORTP COMPARISSON OF PRICE LEVEL VALUES; REPORTP(T,"PRed.Form") = PL(T); PARAMETER REPORTE COMPARISSON OF EXCHANGE RATES VALUES; REPORTE(T,"ERed.Form") = EL(T); * Computing and reporting solution values for Gov. Deficit and * Unemployment (all in levels). Since these two variables have * no feed-back on the rest of the model, they can be computed * after solving for the relevant endogenous variables PARAMETER GOVDEF(T) UNEMP(T) ; GOVDEF(T) = Glev(T) - e11p1 * YL(T) ; UNEMP(T) = UN(T) - e12p1 * (YL(T) - YNlev(T)) / YNlev(T); PARAMETER REPORTG COMPARISSON OF GOV DEFICIT VALUES; REPORTG(T,"GRed.Form") = GOVDEF(T); PARAMETER REPORTU COMPARISSON OF UNEMPLOYMENT VALUES; REPORTU(T,"URed.Form") = UNEMP(T); *********************************************************************** *********************************************************************** * * SECTION 9: TRANSFORMATION OF THE REDUCED FORM REPRESENTATION * INTO A STATE-SPACE REPRESENTATION * *********************************************************************** *********************************************************************** SCALARS * Defining parameters of the State Space equations. They will be the * elements of matices A, B and C to input in control experiments. * For example: FA11 means "matrix FA row 1 column 1" FA11 FA13 FA17 FA111 FA21 FA23 FA27 FA211 FA31 FA33 FA37 FA311 FA41 FA43 FA47 FA411 FA51 FA62 FA73 FA84 FA95 FA106 FA117 FA128 FB11 FB12 FB21 FB22 FB41 FB42 FC11 FC12 FC21 FC22 FC31 FC41 FC42 ; * Computing State-Space parameter values from reduced form parameters FA11 = ra111; FA13 = ra113; FA17 = ra213; FA111 = ra313; FA21 = ra121; FA23 = ra123; FA27 = ra223; FA211 = ra323; FA31 = ra131; FA33 = ra133; FA37 = ra233; FA311 = ra333; FA41 = ra141; FA43 = ra143; FA47 = ra243; FA411 = ra343; FA51 = 1; FA62 = 1; FA73 = 1; FA84 = 1; FA95 = 1; FA106 = 1; FA117 = 1; FA128 = 1; FB11 = rb11; FB12 = rb12; FB21 = rb21; FB22 = rb22; FB41 = rb41; FB42 = rb42; FC11 = rc11; FC12 = rc12; FC21 = rc21; FC22 = rc22; FC31 = rc31; FC41 = rc41; FC42 = rc42; * Definition of equations for the state-space representation. * The endogenous variables were already defined in Section 7 . EQUATIONS yeqssp0(T) income0 reqssp0(T) interest rate0 peqssp0(T) prices0 eeqssp0(T) exchange rate0 yeqssp1(T) income1 reqssp1(T) interest rate1 peqssp1(T) prices1 eeqssp1(T) exchange rate1 yeqssp2(T) income2 reqssp2(T) interest rate2 peqssp2(T) prices2 eeqssp2(T) exchange rate2 ; yeqssp0(T).. Y(T) =E= FA11 * Y(T-1) + FA13 * P(T-1) + FA17 * P(T-2) + FA111 * P(T-3) + FB11 * M(T) + FB12 * G(T) + FC11 * YN(T) + FC12 * PW(T) ; reqssp0(T).. R(T) =E= FA21 * Y(T-1) + FA23 * P(T-1) + FA27 * P(T-2) + FA211 * P(T-3) + FB21 * M(T) + FB22 * G(T) + FC21 * YN(T) + FC22 * PW(T) ; peqssp0(T).. P(T) =E= FA31 * Y(T-1) + FA33 * P(T-1) + FA37 * P(T-2) + FA311 * P(T-3) + FC31 * YN(T) ; eeqssp0(T).. E(T) =E= FA41 * Y(T-1) + FA43 * P(T-1) + FA47 * P(T-2) + FA411 * P(T-3) + FC41 * YN(T) + FB41 * M(T) + FB42 * G(T) + FC42 * PW(T) ; yeqssp1(T-1).. Y(T-1) =E= Y(T-1) ; reqssp1(T-1).. R(T-1) =E= R(T-1) ; peqssp1(T-1).. P(T-1) =E= P(T-1) ; eeqssp1(T-1).. E(T-1) =E= E(T-1) ; yeqssp2(T-2).. Y(T-2) =E= Y(T-2) ; reqssp2(T-2).. R(T-2) =E= R(T-2) ; peqssp2(T-2).. P(T-2) =E= P(T-2) ; eeqssp2(T-2).. E(T-2) =E= E(T-2) ; * Initial values for endogenous variables (in percentage changes) Y.L(T) = 0; R.L(T) = 0; P.L(T) = 0; E.L(T) = 0; MODEL STATESP / JD2, yeqssp0, reqssp0, peqssp0, eeqssp0, yeqssp1, reqssp1, peqssp1, eeqssp1, yeqssp2, reqssp2, peqssp2, eeqssp2 /; SOLVE STATESP MAXIMIZING J2 USING LP; * Computing and reporting solution values in levels YL(T) = 6000 * (1 + Y.L(T)); RL(T) = 0.05 * (1 + R.L(T)); PL(T) = 1 * (1 + P.L(T)); EL(T) = 1 * (1 + E.L(T)); PARAMETER REPORTY COMPARISSON OF GDP VALUES; REPORTY(T,"YStSpace") = YL(T); PARAMETER REPORTR COMPARISSON OF INTEREST RATE VALUES; REPORTR(T,"RStSpace") = RL(T); PARAMETER REPORTP COMPARISSON OF PRICE LEVEL VALUES; REPORTP(T,"PStSpace") = PL(T); PARAMETER REPORTE COMPARISSON OF EXCHANGE RATES VALUES; REPORTE(T,"EStSpace") = EL(T); * Computing and reporting solution values for Gov. Deficit and * Unemployment (all in levels). Since these two variables have * no feed-back on the rest of the model, they can be computed * after solving for the relevant endogenous variables PARAMETER GOVDEF(T) UNEMP(T) ; GOVDEF(T) = Glev(T) - e11p1 * YL(T) ; UNEMP(T) = UN(T) - e12p1 * (YL(T) - YNlev(T)) / YNlev(T); PARAMETER REPORTG COMPARISSON OF GOV DEFICIT VALUES; REPORTG(T,"GStSpace") = GOVDEF(T); PARAMETER REPORTU COMPARISSON OF UNEMPLOYMENT VALUES; REPORTU(T,"UStSpace") = UNEMP(T); * Reporting State-Space solution values in percentage changes * This report may be used for comparission against simulation * results obtained from DUALI, as a way of checking wheter * the model has been appropriately transferred into DUALI PARAMETER REPORTPC STATE-SPACE SOLUTION VALUES IN PERCENTAGE CHANGES; REPORTPC(T,"GDP") = Y.L(T); REPORTPC(T,"INT.RATE") = R.L(T); REPORTPC(T,"PRICES") = P.L(T); REPORTPC(T,"EXCH.RATE") = E.L(T); * Showing final results DISPLAY REPORTEX; DISPLAY REPORTY; DISPLAY REPORTR; DISPLAY REPORTP; DISPLAY REPORTE; DISPLAY REPORTG; DISPLAY REPORTU; * Printing matrix elements to input in control experiments * For example: FA11 means "matrix A row 1 column 1" DISPLAY FA11 , FA13 , FA17 , FA111, FA21 , FA23 , FA27 , FA211, FA31 , FA33 , FA37 , FA311, FA41 , FA43 , FA47 , FA411, FA51 , FA62 , FA73 , FA84 , FA95 , FA106, FA117, FA128 , FB11 , FB12 , FB21 , FB22 , FB41 , FB42 , FC11 , FC12 , FC21 , FC22 , FC31 , FC41 , FC42 ; DISPLAY REPORTPC;