$ontext Travis Warziniack, University of Heidelberg March 2009 -- MODEL OVERVIEW ---- A previous program cge_5x2x2x2.gms built a cge model with five industries, two factors of production, two households, and two government agents. 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 framework is now extended to include savings. 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/; alias (i,ii),(f,ff),(h,hh),(gov,govt); $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_5x2x2x2 (shown below) except the addition of savings. The SAM for the 5x2x2x2 model was table sam(*,*) agr pow fos ren wild lab cap fed stat ibt hhd1 hhd2 agr 8 5 7 5 8 3 pow 8 2 20 10 fos 20 ren 20 wild 2 2 2 lab 9 5 10 2 cap 11 5 5 2 ibt 6 fed 1 1 2 5 3 2 1 stat 1 1 5 3 1 hhd1 20 10 2 0 hhd2 5 10 1 1 which becomes $offtext table sam(*,*) agr pow fos ren wild lab cap fed stat ibt hhd1 hhd2 inv agr 8 5 7 5 8 3 6 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 stat 1 1 5 3 1 2 hhd1 20 10 2 0 hhd2 5 10 1 1 2 inv 5 1 2 2 2 10 * 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; 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'); $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 ; FACPMTo(f) = sum(i,FACo(f,i)); thetaf(h,f) = endow(h,f)/FACPMTo(f); HHIo(h) = sum(f,thetaf(h,f)*FACPMTo(f)) + sum(gov,HTRNSo(h,gov)) + HINTINCo(h); sh(h) = 0.9; rh(h) = 1 - 1/sh(h); htr(gov,h) = sam(h,gov)/HHIo(h); mps(h) = HSAVo(h)/HHIo(h); HHIDo(h) = HHIo(h)*(1-sum(gov,htr(gov,h))-mps(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. 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); Xo(i) = sum(ii,Vo(i,ii)) + sum(h,HHXo(i,h)) + sum(gov,sam(i,gov)) + ITo(i); 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) government borrowing; 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 -- 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. $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) = FACPMTo(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); * Prices variables PD(i), PF(f); * 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)); EQHHI(h).. HHI(h) =e= sum(f,thetaf(h,f)*FACPMT(f)) + sum(gov,HTRNS(h,gov)) + HINTINCo(h); EQHHID(h).. HHID(h) =e= HHI(h)*(1-sum(gov,htr(gov,h)) - mps(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); * Equilibrium equations EQQ(i), EQX(i), EQPD(i), EQPF(f); EQQ(i).. Q(i) =e= DY(i) + sum(gov,QGOV(gov,i)) + QINV(i); EQX(i).. X(i) =e= sum(h,HHX(i,h)) + sum(ii,V(i,ii)) + sum(gov,XGOV(i,gov)) + IT(i); EQPD(i).. Q(i) =e= X(i); EQPF(f).. FACPMTo(f) =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) = sum(i,FACo(f,i)); 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); 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/; * replicate benchmark options iterlim = 0; solve cge using mcp; options iterlim = 5000; solve cge using mcp; * $offtext