2
$\begingroup$

I'm trying to determine reaction functions of a Cournot equilibrium for $n$ firms using the same optimal condition, using the fixed point method.

This is the method I'm using:

fixedPoint[Gs_, X_, X0_, tol_, nmax_] := 
 Module[{G, sol, oldsol, iter, n, i},
  (*Vectors Gs and X must have the same length*)
  n = Length[X];
  G[s_] := Gs /. Table[X[[i]] -> s[[i]], {i, 1, n}];
  infNorm[s_] := Max[Abs[s]];
  sol = X0;
  oldsol = sol + 2*tol;
  iter = 0;
  While[And[iter <= nmax, infNorm[sol - oldsol] > tol],
   oldsol = sol;
   sol = G[sol];
   iter++];
  Print["Performed ", iter, " iterations"];
  If[iter >= nmax, Print["WARNING: Maximum number of iterations was reached"]];
  sol]

The equilibrium condition is (the derivative of profit with respect to quantity):

(((qt)^(-1/eta)) - (1/eta)*((qt)^(-1/(eta - 1)))*qi )-ai*q1 == 0

Where eta and ai are parameters, qt is the sum of the quantities produced by the $n$ firms, and qi is the quantity produced by a single firm.

So, my problem is determining the Gs argument of my method for $n$ firms. How do I generate $n$ optimal functions, each assuming its corresponding values for ai and qi?

$\endgroup$
  • $\begingroup$ (1) In your last equation, should q1 be qi, or vice versa? (2) Is ai a firm-specific parameter in firm is cost function, or is it a scalar parameter of inverse demand? (3) you should check the docs on built-in functions FixedPoint and NestWhile, and (4) Welcome to Mma.SE. $\endgroup$ – kglr Nov 12 '12 at 0:49
  • $\begingroup$ ... and the exponent in the second term should be (-1/eta -1)? $\endgroup$ – kglr Nov 12 '12 at 7:16
  • $\begingroup$ 1) you are right, q1 should be qi. 2)Exactly, ai is a firm-specific cost parameter. The cost function i'm using is (1/2)*ai*(qi^2) 3)I'll do that. Thank you. Yes, the exponent is (-1/(eta-1)) $\endgroup$ – 42afac Nov 13 '12 at 15:31
  • $\begingroup$ And let me add that the demand function is P(Q)=Q^(-1/eta). $\endgroup$ – 42afac Nov 13 '12 at 16:27
  • $\begingroup$ Sorry for the imprecision, the exponent should be (-1/eta)-1. $\endgroup$ – 42afac Nov 13 '12 at 18:14
3
$\begingroup$

It is unclear why you are going down this path. The wikipedia link contains all the derivations and for $n$ firms, using your variables, the solution, for all q's, is

$q=ai/eta*(n+1)$

and for the industry:

$Q=n*ai/eta*(n+1)$

ls = {1, 2, 3, 5, 8, 20};
ls1 = (10.*#)/(1 + #) & /@ {1, 2, 3, 5, 8, 20};

xy = {#, 10. - #} & /@ ls1;

lines = {{0, 10. - #}, {#, 10. - #}, {#, 0}} & /@ ls1;

txt = MapThread[
   Text[Row[{Style["N", FontSize -> 8, Italic], 
       Style[" = " <> ToString[#1], FontSize -> 8]}], #2 + {0.4, 
       0.2}] &, {ls, xy}];

Plot[10. - Q, {Q, 0, 10},
 Axes -> True,
 AxesStyle -> AbsoluteThickness[1],
 AxesLabel -> {Style["Q", FontFamily -> "Times", Italic], 
   Style["P", FontFamily -> "Times", Italic]},
 Epilog -> {AbsoluteThickness[0.5], Line /@ lines, txt},
 Frame -> False,
 PlotStyle -> {Blue, AbsoluteThickness[1]},
 PlotRegion -> {{0, 1}, {0, 1}},
 PlotRange -> {{0, 11}, {0, 11}},
 Ticks -> None
 ]

enter image description here

For the case of duopolies you can graphically compare Bertrand and Cournot:

For Bertrand $Q$ is defined as constant and firms compete on price so taking a diagonal slice across quantities shows why there is a horizontal demand curve for each firm

pc = Plot3D[10 - q1 - q2, {q1, 0., 10.}, {q2, 0., 10.},
   AxesEdge -> {{-1, -1}, {1, -1}, {-1, -1}},
   AxesLabel -> {label1, label2, label3},
   ClippingStyle -> None,
   Exclusions -> {10 - q1 - q2 == 0},
   ImageSize -> 400,
   PlotRange -> {{0., 10.}, {0., 10.}, {0., 10.}},
   Ticks -> None
   ];

Show[pc, Graphics3D[{ 
   Polygon[{{0., 6., 0.}, {0., 6., 10.}, {6., 0., 10.}, {6., 0., 
      0.}}]}]]

enter image description here

For Cournot $Q$ is not defined as constant, but rather the $q$ of other firm(s) is constant so there is never a horizontal demand at the firm level under this model, even for very large $n$

pc = Plot3D[10 - q1 - q2, {q1, 0., 10.}, {q2, 0., 10.},
   AxesEdge -> {{-1, -1}, {1, -1}, {-1, -1}},
   AxesLabel -> {label1, label2, label3},
   ClippingStyle -> None,
   Exclusions -> {10 - q1 - q2 == 0},
   ImageSize -> 400,
   PlotRange -> {{0., 10.}, {0., 10.}, {0., 10.}},
   Ticks -> None
   ];

Show[pc, Graphics3D[{Polygon[{{0., 2., 0.}, {0., 2., 10.}, {10., 2., 
      10.}, {10., 2., 0.}}]}]]

enter image description here

$\endgroup$
  • $\begingroup$ You are right. I was following an unnecessary path. Thank you very much. $\endgroup$ – 42afac Nov 13 '12 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.