Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
(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. –  kguler Nov 12 '12 at 0:49
    
... and the exponent in the second term should be (-1/eta -1)? –  kguler Nov 12 '12 at 7:16
    
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)) –  user4604 Nov 13 '12 at 15:31
    
And let me add that the demand function is P(Q)=Q^(-1/eta). –  user4604 Nov 13 '12 at 16:27
    
Sorry for the imprecision, the exponent should be (-1/eta)-1. –  user4604 Nov 13 '12 at 18:14

1 Answer 1

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

share|improve this answer
    
You are right. I was following an unnecessary path. Thank you very much. –  user4604 Nov 13 '12 at 15:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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