$ontext Travis Warziniack, University of Heidelberg March 2009 -- MODEL OVERVIEW ---- A previous program cge_open.gms built a cge model with five industries, two factors of production, two households, two government agents, and savings, investment, and inventory. Two of those industries where not consumed by households but were used as inputs to other sectors of the economy. The power sector, for example, is composed of various types of energy inputs (fossil, wind, etc.). Households do not actually purchase input-specific power, rather, they just consume power. It also included a sector which is produced regionally using traditional inputs and factors, consumed by households, but is not used as an input into any other sector's production process. Recreational activities, such as wildlife viewing, are goods example of such industries. Households spend a considerable amount of money to enjoy this pastime (buying equipment, traveling to desiniations, etc) but wildlife viewing itself is not actually used as an input into other sectors of the economy (one could argue that tourist-related industries actually do use such goods as inputs, but we will leave that discussion for a later time.) Government was introduced by adding a business tax, taxes on households, and factor taxes. It was extended to include another govt (stat) with similiar behavior but that may have different tax rates, etc.. Firms produce using a Leontiff production technology with inputs (intermediates and an aggregrate value added) as a fixed portion of output, where value added is composed of capital and labor, combined through cost minimization of a CES function, VA = gva*(af(f1)*FAC(1)**r + af(2)*FAC(2)**r + ..)**(1/r) where r = 1 - 1/s and s is the elasticity of substitution of factors in the value added function. af is the share of each factor in the production function and gva is an efficiency parameter. All payments to factors first go to a factor 'institution', and are then distributed to the households according to share of the factors that they own. The model was of an open economy with trade with an outside agent. It is now extended to include two entries for trade, domestic trade dt and foreign trade ft. In the program code, capitalized letters indicate a variable or a parameter that serves as the benchmark value for a variables. Lower case indicates parameters, sets, and equations. There are a number of shortcuts or other reading worth reading about CES functions, inlcuding Rutherford (2008), Temple (2008), and XX. $offtext set i industries /agr,pow,fos,ren,wild/ f factors /lab,cap/ h household /hhd1,hhd2/ gov government /fed,stat/ tax taxes /ibt/ row rest of world /dt,ft/; alias (i,ii),(f,ff),(h,hh),(gov,govt),(row,rrow); $ontext -- DATA -------------- Data for CGE models is usually provided through a social accounting matrix, or SAM. Columns of the SAM represent expenses to the sector indicated by the column heading, and rows represent income to the sector indicated by the row heading. Because we will be using equations that are homogenous of degree one in prices (?), a convenient assumption is that all benchmark prices are equal to one, so the SAM represents both quantity and monetary values. The SAM must be balanced, in that the sum of entries in each row must be equal to the sum of entries in the column with the same name. The SAM for this example is exactly alike that used in cge_open (shown below) except the addition of another trade partner. The SAM for the open model was table sam(*,*) agr pow fos ren wild lab cap fed stat ibt hhd1 hhd2 inv ft agr 8 5 7 5 8 3 6 2 pow 8 2 20 10 fos 20 2 ren 20 wild 2 2 2 lab 9 5 10 2 cap 12 5 5 2 ibt 6 fed 1 1 2 5 3 2 1 2 4 stat 1 1 5 3 1 2 hhd1 20 10 2 2 hhd2 3 10 3 1 2 2 inv 5 1 2 2 2 10 2 ft 2 2 2 2 2 2 2 which now becomes $offtext table sam(*,*) agr pow fos ren wild lab cap fed stat ibt hhd1 hhd2 inv ft dt agr 8 5 7 5 8 3 6 2 2 pow 8 2 20 10 fos 20 ren 20 wild 2 2 2 lab 9 5 10 2 cap 12 5 5 2 ibt 6 fed 1 1 2 5 3 2 1 2 3 1 stat 1 1 5 3 1 2 hhd1 20 10 2 1 1 hhd2 3 10 3 1 2 2 inv 5 1 2 2 2 10 1 1 ft 2 1 1 1 2 1 dt 2 1 1 1 1 * from which we again read off the benchmark values parameter Vo(ii,i) intermediate demand by industry i of input ii FACo(f,i) demand of factor f by industry i endow(h,f) endowment of factor f by household h HHXo(i,h) demand of good i by household h QGOVo(gov,i) amount supplied by government XGOVo(i,gov) amount consumed by government HTRNSo(h,gov) government transfers to households QINVo(i) inventory available for supply RENTo(f) factor rents HSAVo(h) household savings GSAVo(gov) government savings or additions to inventory INVADJo inventory adjustments ITo(i) firm investments or additions to inventory HINTINCo(h) household interest income ENTAXo(gov) enterprise taxe - goverment tax on inventory XEo(i,row) exports to trade partner row HEXINCo(h,row) household income from outside EXOSAVo(row) exogenous savings to trade partners QIMPo(row,i) imports to trade partner row FACOUTo(row,f) factor payments out of region FORSAVo(row,h) household foreign savings AIDo(row,gov) government payments to rest of world EXINTo(row) interest payments to rest of world TRDBRWo transfers from rest of world to rest of world; Vo(ii,i) = sam(ii,i); FACo(f,i) = sam(f,i); endow(h,f) = sam(h,f); HHXo(i,h) = sam(i,h); QGOVo(gov,i) = sam(gov,i); XGOVo(i,gov) = sam(i,gov); HTRNSo(h,gov) = sam(h,gov); QINVo(i) = sam('inv',i); RENTo(f) = sam('inv',f); HSAVo(h) = sam('inv',h); GSAVo(gov) = sam('inv',gov); INVADJo = sam('inv','inv'); ITo(i) = sam(i,'inv'); HINTINCo(h) = sam(h,'inv'); ENTAXo(gov) = sam(gov,'inv'); XEo(i,row) = sam(i,row); HEXINCo(h,row) = sam(h,row); EXOSAVo(row) = sam('inv',row); QIMPo(row,i) = sam(row,i); FACOUTo(row,f) = sam(row,f); FORSAVo(row,h) = sam(row,h); AIDo(row,gov) = sam(row,gov); EXINTo(row) = sam(row,'inv'); TRDBRWo = sam('ft','ft'); $ontext -- HOUSEHOLD -------------- Households are heterogenous in preferences and income. Each household maximizes constant elasticity of substitution (CES) preferences U = (ah(agr,h)*HHX(agr,h)**rh(h) + ah(watr,h)*HHX(watr,h)**rh(h))**(1/rh(h)) where rh(h) is a parameter based on the elasticity of substiution rh(h) = 1 - 1/sh(h), subject to a budget constraint. HHI = PD(agr)*HHX(agr,h) + PD(watr)*HHX(watr,h) + household taxes + savings The household owns labor and labor which earn prices PF(f) in the marketplace. Earnings from factors are assumed to go to factor 'institutions' then distributed to the households based on their share of the factor. The household pays taxes to the government and receives transfers from the government. Household disposable income is used for consumption. Households save a fixed percentage of pre-tax income. $offtext parameter HHIo(h) household income HHIDo(h) household disposable income HHXo(i,h) household demand of good i FACPMTo(f) total payments to factor thetaf(h,f) share of factor f owned by household h sh(h) household elasticity of substitution taken from the literature rh(h) parameter based on sh(h) ah(i,h) share of good i in demand function htr(gov,h) household tax rate mps(h) marginal propensity to save mpsf(row,h) marginal propensity to save in foreign sources afout(row,f) portion of factor payments that leave the country; afout(row,f) = FACOUTo(row,f) / sum(i,FACo(f,i)); FACPMTo(f) = sum(i,FACo(f,i))*(1-sum(row,afout(row,f))); display FACPMTo; thetaf(h,f) = endow(h,f)/FACPMTo(f); HHIo(h) = sum(f,thetaf(h,f)*FACPMTo(f)) + sum(gov,HTRNSo(h,gov)) + HINTINCo(h) + sum(row,HEXINCo(h,row)); sh(h) = 0.9; rh(h) = 1 - 1/sh(h); htr(gov,h) = sam(gov,h)/HHIo(h); mps(h) = HSAVo(h)/HHIo(h); mpsf(row,h) = FORSAVo(row,h)/HHIo(h); HHIDo(h) = HHIo(h)*(1-sum(gov,htr(gov,h))-mps(h)-sum(row,mpsf(row,h))); ah(i,h) = ((HHIDo(h)/HHXo(i,h))**(rh(h)/(1-sh(h))))$HHXo(i,h); * once the demand function has been calibrated it can be written as HHXo(i,h) = (ah(i,h)/1)**sh(h) * HHIDo(h) / sum(ii, 1*(ah(ii,h)/1)**sh(h)); $ontext -- FIRMS ------------- Firms cost minimize to meet demand, given a production technology. The production function is assumed to be Leontiff such that the firm uses fixed portions of each input for a given amount of output. Total costs are the sum of expenses on intermediate inputs and value added. Value added is made composed of primary factors of production, combined in a CES production function VA = gva*(af(f1)*FAC(1)**r + af(2)*FAC(2)**r + ..)**(1/r) where r = 1 - 1/s and s is the elasticity of substitution of factors in the value added function. af is the share of each factor in the production function and gva is an efficiency parameter. Industry-specific indices have been omitted, but VA, gva, af, FAC, r, and s vary by industry. Following Sancho 'Calibration of CES functions for real-world multi-sectoral modeling' (No date?), define tva(f) = (gva*af(f))**1/r. VA can be rewritten VA = ((tva(1)*FAC(1))**r + (tva(2)*FAC(2))**r + ..)**(1/r) and tva(i) can be solved to get tva(j) = (VA/FAC(j))**(1/eta) where eta = 1 - s. The unit cost of value added (or any CES production technology) is unit cost = (sum(f,(1/tva(f,i))**eta(i)))**(1/eta(i)); Firms must also pay a constant share of their output to the governments in form of taxes. $offtext parameters CVo(i) total costs VAo(i) value added input DYo(i) output of local firms aint(ii,i) share of i's output produced by using ii ava(i) share of i's output produced using factors FACo(f,i) demand of factor f by industry i tva(f,i) calibration parameter for value added eta(i) parameter for value added function based on elasticity of substitution r(i) parameter based on value added elasticity ibtr(i) business tax rate imposed on industry i s(i) elasticity of substitution between capital and labor /agr 0.61 pow 0.80 fos 0.80 ren 0.80 wild 0.61/; VAo(i) = sum(f,FACo(f,i)); DYo(i) = VAo(i) + sum(ii,Vo(ii,i)) + sam('ibt',i); r(i) = 1 - 1/s(i); eta(i) = 1 - s(i); tva(f,i)$FACo(f,i) = (VAo(i)/FACo(f,i))**(1/eta(i)); aint(ii,i) = Vo(ii,i) /DYo(i); ava(i) = VAo(i) /DYo(i); ibtr(i) = sam('ibt',i)/DYo(i); FACo(f,i)$tva(f,i) = VAo(i) * (tva(f,i)/1)**s(i) * 1/(tva(f,i)*sum(ff, 1**(1-s(i)) * tva(ff,i)**(s(i)-1))); VAo(i) = ava(i)*DYo(i); CVo(i) = sum(ii,aint(ii,i)*DYo(i)) + (VAo(i)*(sum(f,(1/tva(f,i))**eta(i)))**(1/eta(i)))$VAo(i) + ibtr(i)*DYo(i); $ontext -- SAVINGS AND INVESTMENT Savings and investment are represented by the 'inv' entries in the SAM. Reading across the 'inv' row, inventory is available to be added to the total supply pool, factors earn rents or profits that are added to the total amount of investments available, and households and governments save. The (inv,inv) entry in the SAM represents inventory or investment adjustments but does have a large role to play in the model. Reading down the 'inv' column, a portion of total output is added to inventory or IT investments, households earn interest income from investments, governments levy an enterprise tax on investments and inventories, and again are inventory adjustments. Agents' behavior with regard to investments, inventory, and savings are assumed to by myopic. That is, they occur as fixed portions of some other economic activity and not as results of optimization problems. This has modeling implications which one may want to change depending on the problem of interest. For example, households save a fixed percentage of total income, not after-tax income. Any affect changes in tax rates have on household savings behavior will not be captured by this model. One the other hand, increases in government transfers to housholds increase total income, of which a certain percentage of is saved. Because of the difference in effects of the two government actions, this may be a worthy change for future models (one that would require more background reading on influence of taxes on household behavior). Government additions to inventory are assume to be fixed. There are trade entries in the 'inv' column and row of the SAM corresponding to exogenous savings and interest payments to the rest of the world. These are fixed in the model and so will not play a part in this section. It should be noted that these also do not play a role in the goverments' tax rates for enterprise taxes. Because savings and investment decisions are based on total levels of economic activity, those levels are first determined $offtext parameters Qo(i) total supply Xo(i) total demand ainv(i) share of total supply represented by inventory arent(f) portion of factors that go to rents ait(i) share of output that goes to IT entaxr(gov) goverment enterprise tax rate; Qo(i) = DYo(i) + sum(gov,sam(gov,i)) + QINVo(i) + sum(row,QIMPo(row,i)); Xo(i) = sum(ii,Vo(i,ii)) + sum(h,HHXo(i,h)) + sum(gov,sam(i,gov)) + ITo(i) + sum(row,XEo(i,row)); ainv(i) = QINVo(i)/Qo(i); arent(f) = RENTo(f)/FACPMTo(f); ait(i) = ITo(i)/Xo(i); entaxr(gov) = ENTAXo(gov) / (sum(i,QINVo(i)) + sum(f,RENTo(f)) + sum(h,HSAVo(h)) + sum(govt,GSAVo(govt)) + INVADJo); QINVo(i) = ainv(i)*Qo(i); RENTo(f) = arent(f)*FACPMTo(f); ITo(i) = ait(i)*Xo(i); $ontext -- GOVERNMENT The government taxes final goods and factors of production, provides goods in some industries, and consumes goods from some inustries. All its actions are myopic and occur as some fixed portion of other quantities in the model. Government supply QGOV(i) is a constant proportion of total domestic supply, government demand is a fixed proportion of total domestic demand, and the tax rates are fixed. The SAM does not distinguish between business taxes distributed to the various levels of government but does spread the business taxes to various levels of government, implying different tax rates for different levels of government. We could distribute the revenues according to the share represented in this column. Instead we assume that after all business taxes are collected, they are distributed to the levels of goverment based on the shares in the IBT column. Because the SAM is linear, this method is akin to explicitly stating separate tax rates but has the advantage of being more reflective of the SAM and more straightforward for analysis. Government to government transfers are also allowed. The government maintains a balanced budget such that BRW = Government Revenues - Government Expenses = 0; $offtext parameters ags(gov,i) share of good i supplied by government agx(i,gov) share of good i consumed by government ftr(gov,f) factor tax rate aibt(gov) share of bussiness taxes to government agents gmps(gov) government marginal propensity to save GGo(gov,govt) government to government transfers GREVo(gov) government revenues BRWo(gov) net government borrowing -- deficit minus aid for all trade partners; ftr(gov,f) = sam(gov,f)/FACPMTo(f); ags(gov,i) = QGOVo(gov,i)/Qo(i); agx(i,gov) = XGOVo(i,gov)/Xo(i); QGOVo(gov,i) = ags(gov,i) * Qo(i); XGOVo(i,gov) = agx(i,gov) * Xo(i); aibt(gov) = sam(gov,'ibt')/sum(govt,sam(govt,'ibt')); GGo(gov,govt) = sam(gov,govt); GREVo(gov) = sum(i,QGOVo(gov,i)*1 + aibt(gov)*ibtr(i)*DYo(i)) + sum(h,HHIo(h)*htr(gov,h)) + sum(govt,GGo(gov,govt)) + sum(f,FACPMTo(f)*ftr(gov,f)) + entaxr(gov)* (sum(i,QINVo(i)) + sum(f,RENTo(f)) + sum(h,HSAVo(h)) + sum(govt,GSAVo(govt)) + INVADJo); gmps(gov) = GSAVo(gov)/GREVo(gov); BRWo(gov) = sum(i,XGOVo(i,gov)*1) + sum(h,HTRNSo(h,gov)) + sum(govt,GGo(govt,gov)) + GSAVo(gov) - GREVo(gov); $ontext -- TRADE --------------- The model has imports and exports determined by Armington assumptions. Households can buy a good, say good A, from either domestic or foreign sources. The decision is made by minimizing cost of obtaining the good subject to CES preferences for domestic and foreign goods. Let total consumption of A be given by A = AC*(arm*QD**rc + (1-arm)*QIMP**rc)**1/rc where QD is domestic consumption of good A, QIMP are imports of good A and rc is a parameter based on elasticity of substitution for domestic and foreign goods rc = 1 - 1/sc. 'arm' is the share of the domestic good in the benchmark equilibrium. AC is an efficiency. Given sc from the relevant literature, arm and AC becomes a calibrated parameter (referred to as Armington coefficients). Technically each household and firm will have different elasticities and Armington coefficients; however, this would be fairly data-intensive. Instead the ratio of domestic to foreign consumption is determined at the aggregate level. By rewriting Astar = A/AC = (arm1*Q1**rc + arm2*Q2**rc + .. armN*QN**rc)**1/rc we can use similar calibration as found in the demand section for N trading partners. Exports are determined in a similiar manner. $offtext parameter QDo(i) domestically supplied goods armd(i) calibrated Armington coefficient for domestic good armf(row,i) calibrated Armington coefficient for foreign goods AC(i) calibrated Armington coefficient rc(i) parameter for Armington mix based on elasticity of substitution sc(i) elasticity of substitution between domestic and foreign goods /agr 1.42 pow 3.15 fos 3.15 ren 3.15 wild 3.15/; QDo(i) = DYo(i) + sum(gov,QGOVo(gov,i)) + QINVo(i); rc(i) = 1 - 1/sc(i); armd(i) = ((Qo(i) /QDo(i) )**(rc(i)/(1-sc(i))))$QDo(i); armf(row,i) = ((Qo(i)/QIMPo(row,i))**(rc(i)/(1-sc(i))))$QIMPo(row,i); AC(i) = 1; * once the Armington function has been calibrated it can be written as QDo(i) = (armd(i)/1)**sc(i) * (Qo(i)/AC(i)) / (1*(armd(i)/1)**sc(i) + sum(row,1*(armf(row,i)/1)**sc(i))); QIMPo(row,i) = (armf(row,i)/1)**sc(i) * (Qo(i)/AC(i)) / (1*(armd(i)/1)**sc(i) + sum(rrow,1*(armf(rrow,i)/1)**sc(i))); Qo(i) = AC(i) * (armd(i)*QDo(i)**rc(i) + sum(row,armf(row,i)*QIMPo(row,i)**rc(i)))**(1/rc(i)); parameter XDo(i) domestically demanded goods cetd(i) calibrated CET share parameter for domestic demand cetf(i,row) calibrated CET share parameter for trade partners AT(i) calibrated CET efficiency parameter rt(i) parameter for CET based on elasticity of substitution st(i) elasticity of substitution between domestic and foreign consumption goods /agr 3.9 pow 2.9 fos 2.9 ren 2.9 wild 2.9/; XDo(i) = sum(ii,Vo(i,ii)) + sum(h,HHXo(i,h)) + sum(gov,XGOVo(i,gov)) + ITo(i); rt(i) = 1 - 1/st(i); AT(i) = 1; cetd(i) = ((Xo(i) /XDo(i) )**(rt(i)/(1-st(i)))); cetf(i,row) = ((Xo(i) /XEo(i,row))**(rt(i)/(1-st(i))))$XEo(i,row); * once the CET function has been calibrated it can be written as XDo(i) = (cetd(i)/1)**st(i) * (Xo(i)/AT(i)) / (1*(cetd(i)/1)**st(i) + sum(rrow,1*(cetf(i,rrow)/1)**st(i))); XEo(i,row) = (cetf(i,row)/1)**st(i) * (Xo(i)/AT(i)) / (1*(cetd(i)/1)**st(i) + sum(rrow,1*(cetf(i,rrow)/1)**st(i))); Xo(i) = AT(i) * (cetd(i)*XDo(i)**rt(i) + sum(row,cetf(i,row)*XEo(i,row)**rt(i)))**(1/rt(i)); display armd, armf, cetd, cetf, QDo, QIMPo,Qo, XDo, XEo, Xo; $ontext -- EQUILIBRIUM --------- Domestic prices PD(i) adjust until total supply Q(i) equals total demand X(i). Firms are the only sumpplier; demand consists of demand for intermediate inputs for production and household consumption. The firm is also assumed to have zero profits. Prices of factors PF(f) adjust until supply of factors equals demand. Key to equilibrium in a CGE model is the idea of closure. Closure refers to parts of the model that are held constant that other variables adjust to in the model, much like a numeraire. For example, our treatment of savings uses marginal propensity to save for households, firms, and government. This 'closes' the amount of savings in the model. An alternative savings closure would involve fixing the interest rate. Factor markets are closed in the model by specifying a fixed supply. The price factors earn in the market adjusts so factor demand equals the inelastic supply. With the introduction of trade, special attention should be paid to closure rules with the outside world. The factor markets are closed by specifying a fixed percentage of factor payments that go to the rest of the world. Similarly, household were assumed to have fixed marginal propensities to save in foreign markets and received fixed amounts of income from the rest of the world. Because all other government behaviors are fixed percentages of other economic activity, net government borrowing adjusts to maintain the government balanced budget constraint and close the government accounts. Import prices are assumed to be constant (thus the exchange rate is flexible), around which imports and exports adjust to maintain balanced capital accounts through Armington assumptions. $offtext parameters PIo(i) industry profits MKTo(i) market clearing condition FCLEAR(f) factor market clearing condition; PIo(i) = CVo(i) - DYo(i); MKTo(i) = Qo(i) - Xo(i); FCLEAR(f) = sum(i,FACo(f,i))*(1-sum(row,afout(row,f))) - FACPMTo(f)*sum(gov,ftr(gov,f)) - RENTo(f) - FACPMTo(f)*sum(h,thetaf(h,f)); parameter bust; bust = (sum(i,QINVo(i)) + sum(f,RENTo(f)) + sum(h,HSAVo(h)) + sum(gov,GSAVo(gov)) + INVADJo)*(1-sum(gov,entaxr(gov))) - sum(i,ITo(i)) - sum(h,HINTINCo(h)) - INVADJo; display MKTo, PIo, BRWo, FCLEAR, bust; $ontext -- CGE MODEL Now that the model is set up and calibrated with parameters, equivalent equations are created. The model requires prices to solve, which should equal one if the benchmark calibration is write. $offtext variables Q(i), X(i), QIMP(row,i), XE(i,row), QD(i), XD(i); * Prices variables PD(i), PF(f), PM(i); PM.fx(i)=1; * Household variables HHI(h), HHID(h), HTRNS(h,gov), HHX(i,h), FACPMT(f), VA(i), FAC(f,i); equations EQFACPMT(f), EQHHI(h), EQHHID(h), EQHHX(i,h); EQFACPMT(f).. FACPMT(f) =e= sum(i,FAC(f,i)*PF(f))*(1-sum(row,afout(row,f))); EQHHI(h).. HHI(h) =e= sum(f,thetaf(h,f)*FACPMT(f)) + sum(gov,HTRNS(h,gov)) + HINTINCo(h) + sum(row,HEXINCo(h,row)); EQHHID(h).. HHID(h) =e= HHI(h)*(1-sum(gov,htr(gov,h)) - mps(h) - sum(row,mpsf(row,h))); EQHHX(i,h).. HHX(i,h) =e= (ah(i,h)/PD(i))**sh(h) * HHID(h) / sum(ii, PD(ii)*(ah(ii,h)/1)**sh(h)); * Firms variables DY(i), V(ii,i), CV(i), PI(i), QINV(i), IT(i), RENT(f); equations EQCV(i), EQV(ii,i), EQVA(i), EQFAC(f,i), EQDY(i), EQQINV(i), EQIT(i), EQRENT(f); EQCV(i).. CV(i) =e= sum(ii, V(ii,i)*PD(i)) + (VA(i) * (sum(f,(PF(f)/tva(f,i))**eta(i)))**(1/eta(i)))$VAo(i) + DY(i)*ibtr(i); EQV(ii,i).. V(ii,i) =e= aint(ii,i)*DY(i); EQVA(i).. VA(i) =e= ava(i)*DY(i); EQFAC(f,i).. FAC(f,i) =e= (VA(i) * (tva(f,i)/PF(f))**s(i) * 1/(tva(f,i)*sum(ff, PF(ff)**(1-s(i)) * tva(ff,i)**(s(i)-1))))$FACo(f,i); EQDY(i).. PI(i) =e= CV(i) - DY(i)*PD(i); PI.fx(i) = 0; * inventory and savings EQQINV(i).. QINV(i) =e= ainv(i) * Q(i); EQIT(i).. IT(i) =e= ait(i) * X(i); EQRENT(f).. RENT(f) =e= arent(f) * FACPMT(f); * Government variables QGOV(gov,i), XGOV(i,gov), BRW(gov), GREV(gov), GSAV(gov); HTRNS.fx(h,gov) = HTRNSo(h,gov); equations EQQGOV(gov,i), EQXGOV(i,gov), EQBRW(gov), EQGREV(gov), EQGSAV(gov); EQQGOV(gov,i).. QGOV(gov,i) =e= ags(gov,i)*Q(i); EQXGOV(i,gov).. XGOV(i,gov) =e= agx(i,gov)*X(i); EQGSAV(gov).. GSAV(gov) =e= gmps(gov)*GREV(gov); EQGREV(gov).. GREV(gov) =e= sum(i,QGOV(gov,i)*1 + aibt(gov)*ibtr(i)*DY(i)) + sum(h,HHI(h)*htr(gov,h)) + sum(govt,GGo(gov,govt)) + sum(f,FACPMT(f)*ftr(gov,f)) + entaxr(gov)* (sum(i,QINV(i)) + sum(f,RENT(f)) + sum(h,HHI(h)*mps(h)) + sum(govt,GSAV(govt)) + INVADJo); EQBRW(gov).. BRW(gov) =e= sum(i,PD(i)*XGOV(i,gov)) + sum(h,HTRNS(h,gov)) + sum(govt,GGo(govt,gov)) + GSAV(gov) - GREV(gov); * Trade equations EQQD(i), EQQIMP(row,i), EQXD(i), EQXE(i,row); * EQQD(i).. QD(i) =e= (armd(i)/PD(i))**sc(i) * (Q(i)/AC(i)) / (PD(i)*(armd(i)/PD(i))**sc(i) + sum(row,PM(i)*(armf(row,i)/PM(i))**sc(i))); EQQIMP(row,i).. QIMP(row,i) =e= (armf(row,i)/PM(i))**sc(i) * (Q(i)/AC(i)) / (PD(i)*(armd(i)/PD(i))**sc(i) + sum(rrow,PM(i)*(armf(rrow,i)/PM(i))**sc(i))); EQQD(i).. Q(i)=e= AC(i) * (armd(i)*QD(i)**rc(i) + sum(row,armf(row,i)*QIMP(row,i)**rc(i)))**(1/rc(i)); * EQQD(i).. QD(i) =e= (QIMP(i) * ((1 * arm(i))/(1 * (1-arm(i))))**sc(i))$QIMPo(i) + Q(i)$(QIMPo(i) eq 0);; * EQQIMP(i).. Q(i) =e= AC(i) * (arm(i)*QD(i)**rc(i) + (1-arm(i))*QIMP(i)**rc(i))**(1/rc(i)); * XDo(i) = (cetd(i)/1)**st(i) * (Xo(i)/AT(i)) / (1*(cetd(i)/1)**st(i) + sum(rrow,1*(cetf(i,rrow)/1)**st(i))); EQXE(i,row).. XE(i,row) =e= (cetf(i,row)/PM(i))**st(i) * (X(i)/AT(i)) / (PD(i)*(cetd(i)/PD(i))**st(i) + sum(rrow,PM(i)*(cetf(i,rrow)/PM(i))**st(i))); EQXD(i).. X(i) =e= AT(i) * (cetd(i)*XD(i)**rt(i) + sum(row,cetf(i,row)*XE(i,row)**rt(i)))**(1/rt(i)); * EQXD(i).. XD(i) =e= (XE(i) * ((1 * cet(i))/(1 * (1-cet(i))))**st(i))$XEo(i) + X(i)$(XEo(i) eq 0);; * EQXE(i).. X(i) =e= AT(i) * (cet(i)*XD(i)**rt(i) + (1-cet(i))*XE(i)**rt(i))**(1/rt(i)); * Equilibrium equations EQQ(i), EQX(i), EQPD(i), EQPF(f); EQQ(i).. Q(i) =e= DY(i) + sum(gov,QGOV(gov,i)) + QINV(i) + sum(row,QIMP(row,i)); EQX(i).. X(i) =e= sum(h,HHX(i,h)) + sum(ii,V(i,ii)) + sum(gov,XGOV(i,gov)) + IT(i) + sum(row,XE(i,row)); EQPD(i).. Q(i) =e= X(i); EQPF(f).. sum(i,FACo(f,i)) =e= sum(i,FAC(f,i)); HHI.l(h) = HHIo(h); HHID.l(h) = HHIDo(h); HHX.l(i,h) = HHXo(i,h); CV.l(i) = CVo(i); V.l(i,ii) = Vo(i,ii); VA.l(i) = VAo(i); DY.l(i) = DYo(i); Q.l(i) = Qo(i); X.l(i) = Xo(i); PD.l(i) = 1; PF.l(f) = 1; FAC.l(f,i) = FACo(f,i); FACPMT.l(f) = FACPMTo(f); QGOV.l(gov,i)=QGOVo(gov,i); XGOV.l(i,gov) = XGOVo(i,gov); BRW.l(gov)=BRWo(gov); QINV.l(i)=QINVo(i); IT.l(i)=ITo(i); RENT.l(f)=RENTo(f); GREV.l(gov)=GREVo(gov); GSAV.l(gov)=GSAVo(gov); QD.l(i)=QDo(i); QIMP.l(row,i)=QIMPo(row,i); XD.l(i)=XDo(i); XE.l(i,row)=XEo(i,row); model cge /EQFACPMT.FACPMT, EQHHI.HHI, EQHHID.HHID, EQHHX.HHX, EQCV.CV, EQV.V, EQVA.VA, EQFAC.FAC, EQDY.DY, EQQ.Q, EQX.X, EQPD.PD, EQPF.PF EQQGOV.QGOV, EQXGOV.XGOV, EQBRW.BRW, EQQINV.QINV, EQIT.IT, EQRENT.RENT, EQGREV.GREV, EQGSAV.GSAV, EQQD.QD, EQQIMP.QIMP, EQXD.XD, EQXE.XE/; * replicate benchmark options iterlim = 0; solve cge using mcp; options iterlim = 5000; solve cge using mcp; * $offtext