$ontext Travis Warziniack, University of Heidelberg March 2009 -- MODEL OVERVIEW ---- A previous program cge_5x2x2x1ibt.gms built a cge model with five industries, two factors of production, and two households. 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 ibt, and is now extended to include taxes on households. 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. 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/ 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_5x2x2x1ibt (shown below) except the addition of government and tax activities as described above. The SAM for the 5x2x2x1ibt model was table sam(*,*) agr pow fos ren wild lab cap fed ibt hhd1 hhd2 agr 8 5 8 8 3 pow 8 2 20 10 fos 20 ren 20 wild 2 2 2 lab 8 5 10 2 cap 8 5 5 2 ibt 6 fed 2 6 hhd1 20 10 hhd2 5 10 which becomes $offtext table sam(*,*) agr pow fos ren wild lab cap fed ibt hhd1 hhd2 agr 8 5 8 8 3 pow 8 2 20 10 fos 20 ren 20 wild 2 2 2 lab 8 5 10 2 cap 8 5 5 2 ibt 6 fed 2 6 2 2 hhd1 20 10 2 hhd2 5 10 2 * 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; 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); $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 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. $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(f,h) 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 ; FACPMTo(f) = sum(i,sam(f,i)); thetaf(f,h) = endow(h,f)/FACPMTo(f); HHIo(h) = sum(f,thetaf(f,h)*FACPMTo(f)) + sum(gov,HTRNSo(h,gov)); sh(h) = 0.9; rh(h) = 1 - 1/sh(h); htr(gov,h) = sam(h,gov)/HHIo(h); HHIDo(h) = HHIo(h)*(1-sum(gov,htr(gov,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 government 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 -- GOVERNMENT The government taxes final goods, 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 rate is fixed. With this in mind, we first determine the total amounts of domestic supply and demand in the economy. The government maintains a balanced budget such that BRW = Government Revenues - Government Expenses = 0; $offtext parameters Qo(i) total supply Xo(i) total demand ags(gov,i) share of good i supplied by government agx(i,gov) share of good i consumed by government BRWo(gov) government borrowing; Qo(i) = DYo(i) + sum(gov,sam(gov,i)); Xo(i) = sum(ii,Vo(i,ii)) + sum(h,HHXo(i,h)) + sum(gov,sam(i,gov)); 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); BRWo(gov) = sum(i,XGOVo(i,gov)*1 - ibtr(i)*DYo(i) - QGOVo(gov,i)*1) + sum(h,HTRNSo(h,gov) - HHIo(h)*htr(gov,h)); $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; Qo(i) = DYo(i) + sum(gov,QGOVo(gov,i)); Xo(i) = sum(ii,Vo(i,ii)) + sum(h,HHXo(i,h)) + sum(gov,XGOVo(i,gov)); PIo(i) = CVo(i) - DYo(i); MKTo(i) = Qo(i) - Xo(i); FCLEAR(f) = sum(i,FACo(f,i)) - sum(h,endow(h,f)); display MKTo, PIo, BRWo; $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(f,h)*FACPMT(f)) + sum(gov,HTRNS(h,gov)); EQHHID(h).. HHID(h) =e= HHI(h)*(1-sum(gov,htr(gov,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); equations EQCV(i), EQV(ii,i), EQVA(i), EQFAC(f,i), EQDY(i); 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; * Government variables QGOV(gov,i), XGOV(i,gov), BRW(gov); HTRNS.fx(h,gov) = HTRNSo(h,gov); equations EQQGOV(gov,i), EQXGOV(i,gov), EQBRW(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); EQBRW(gov).. BRW(gov) =e= sum(i,XGOV(i,gov) - QGOV(gov,i)*PD(i) - ibtr(i)*DY(i)) + sum(h,HTRNS(h,gov) - HHIo(h)*htr(gov,h)); * Equilibrium equations EQQ(i), EQX(i), EQPD(i), EQPF(f); EQQ(i).. Q(i) =e= DY(i) + sum(gov,QGOV(gov,i)); EQX(i).. X(i) =e= sum(h,HHX(i,h)) + sum(ii,V(i,ii)) + sum(gov,XGOV(i,gov)); EQPD(i).. Q(i) =e= X(i); EQPF(f).. sum(h,endow(h,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); 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/; * replicate benchmark options iterlim = 0; solve cge using mcp; options iterlim = 5000; solve cge using mcp; * $offtext