|
Solving for an economic equilibrium |
Top Previous Next |
|
Economists often wish to solve problems that characterize economic equilibria. The simplest of these is the single good, single market problem. Suppose we wish to solve the equilibrium problem
where P is the market clearing price, Pd the demand curve, Qd the quantity demanded, Ps the supply curve and Qs the quantity supplied. This is a problem in 3 equations and 3 variables (the variables are P, Qd, and Qs - not Pd and Ps since they can be computed afterwards from the equality relations). Ordinarily one would use all equality constraints for such a set up. However, I use this more general setup because it relaxes some assumptions and more accurately depicts a model ready for GAMS. In particular, I permit the case where the supply curve price intercept may be above the demand curve price intercept and thus the market may clear with a nonzero price but a zero quantity. I also allow the market price to be above the demand curve price and below the supply curve price. To insure a proper solution in such cases I also impose some additional conditions based on Walras' law.
P*(Qs-Qd)=0
which state the quantity demanded is nonzero only if the market clearing price equals the demand curve price, the quantity supplied is nonzero only if the market clearing price equals the supply curve price and the market clearing price is only nonzero if Qs=Qd. The simplest GAMS formulation of this is below (econequil.gms). Note in this case we needed to rearrange the Ps equation so it was expressed as a greater than to accommodate the requirements of the PATH solver.
POSITIVE VARIABLES P, Qd , Qs; EQUATIONS Pdemand,Psupply,Equilibrium; Pdemand.. P =g= 6 - 0.3*Qd; Psupply.. ( 1 + 0.2*Qs) =g= P; Equilibrium.. Qs =g= Qd; MODEL PROBLEM /Pdemand.Qd,Psupply.Qs,Equilibrium.P/; SOLVE PROBLEM USING MCP;
Below after introduction of the other example I will dissect this formulation explaining its components. |