$TITLE M7-3.GMS: Oligopoly with Free Entry, homogeneous good, Cournot * competition. Uses Cobb-Douglas demand $ONTEXT Production Sectors Consumers Markets | X N Y W | CONS ENTRE ---------------------------------------------------------- PX | 100 -100 | PY | 100 -100 | PN | 20 | -20 PW | 200 | -200 PL | 80 -20 -100 | 200 MK | -20 | 20 $OFFTEXT PARAMETERS SIGMA Elasticity of substitution ENDOW Endowment scale multiplier MODELSTAT statistic indicating model solved: 0 = solved XPF X output per firm; SIGMA = 1; ENDOW = 200; POSITIVE VARIABLES X Aggregate X production by all firms N Number of X sector firms Y Activity level of Y output W Activity level for welfare PX Price of an individual X variety PN Price of fixed costs (price of entering) PY Price of Y PW Price index for utility (consumer price index) PL Price of labor CONS Income of the representative consumer ENTRE Inomce of the agent ENTRE = markup revenue MARKUP Endogenous markup rate = 1 over N; EQUATIONS PRICEX MR = MC in X PRICEN Zero profit condition for fixed costs PRICEY Zero profit condition for Y (PY = MC) PRICEW Zero profit condition for W DX Supply-Demand for X DN Supply-Demand for fixed costs DY Supply-Demand for Y DW Supply-Demand for W LAB Supply-demand balance for labor ICONS Consumer (factor owners') income IENTRE Entrepreneur's profits MK Markup equation; PRICEX.. PL =G= PX*(1 - MARKUP); PRICEN.. PL =G= PN; PRICEY.. PL =G= PY; PRICEW.. ((PX/1.25)**0.5)*(PY**0.5) =G= PW; DX.. X*80 =E= 0.5*CONS/PX; DN.. N*4 =G= ENTRE/PN; DY.. Y*100 =E= 0.5*CONS/PY; DW.. W*200 =E= CONS/PW; LAB.. ENDOW =E= Y*100 + X*80 + N*4; ICONS.. CONS =E= PL*ENDOW; IENTRE.. ENTRE =E= MARKUP*PX*X*80; MK.. MARKUP*N =E= 1; MODEL M52 /DX.PX, DY.PY, DW.PW, DN.PN, PRICEX.X, PRICEY.Y, PRICEW.W, PRICEN.N,LAB.PL, ICONS.CONS, IENTRE.ENTRE, MK.MARKUP/; OPTION MCP=MILES; OPTION LIMROW=0; OPTION LIMCOL=0; $OFFSYMLIST OFFSYMXREF OFFUELLIST OFFUELXREF CONS.L = 200; X.L = 1; Y.L = 1; W.L = 1; N.L = 5; PX.L = 1.25; PY.L = 1; PL.L = 1; PW.L = 1; PN.L = 1; ENTRE.L = 20; MARKUP.L = 0.20; PY.FX = 1; M52.ITERLIM = 0; SOLVE M52 USING MCP; MODELSTAT = M52.MODELSTAT - 1.; M52.ITERLIM = 1000; SOLVE M52 USING MCP; MODELSTAT = M52.MODELSTAT - 1.; XPF = 80*X.L/N.L; DISPLAY XPF; * counterfactual: double the size of the economy ENDOW = 400; SOLVE M52 USING MCP; XPF = 80*X.L/N.L; DISPLAY XPF; * show welfare as a function of the economy's size SETS I indexes 25 different size levels /I1*I25/; PARAMETERS SIZE(I) WELFARE(I) WELFCAP(I) FIRMSIZE(I) FIRMNUMB(I) MARKUPO(I) RESULTS(I,*); LOOP(I, SIZE(I) = 5.2 - 0.2*ORD(I); ENDOW = 200*SIZE(I); SOLVE M52 USING MCP; WELFARE(I) = W.L; WELFCAP(I) = WELFARE(I)/SIZE(I); FIRMSIZE(I) = X.L/N.L*5; FIRMNUMB(I) = N.L/5; MARKUPO(I) = MARKUP.L; ); RESULTS(I, "SIZE") = SIZE(I); RESULTS(I, "WELFARE") = WELFARE(I); RESULTS(I, "WELFCAP") = WELFCAP(I); RESULTS(I, "FIRMSIZE") = FIRMSIZE(I); RESULTS(I, "FIRMNUMB") = FIRMNUMB(I); RESULTS(I, "MARKUP") = MARKUPO(I); DISPLAY RESULTS; * Write parameter RESULTS to an Excel file M7.XLS, * starting in Sheet1, $LIBINCLUDE XLDUMP RESULTS M7.XLS SHEET1!A3 Execute_Unload 'M7.gdx' RESULTS execute 'gdxxrw.exe M7.gdx par=RESULTS rng=SHEET2!A3'