<p>I'm new to economics and thinking about graduate study. My background is mathematics. </p>

<p>I started reading a book on microeconomics by Mas-Colell, Whinston and Green. My goal is to understand how groups of buyers and sellers arrive at a equilibrium. </p>

<p>I understand the three criteria satisfying the definition of a competitive equilibrium with the assumption of price-taking firms: clearing markets, maximized profits for the firms, and and maximized utility for the consumers subject to some wealth constraints. </p>

<p>What I would like to do is make a simple python program which has firms, and consumers that (perhaps according to some distribution) decide their own ask and bid prices respectively (that would self adjust after some trial and error to transact) which tend to the situation of having an equilibrium (I'm not sure if a competitive equilibrium applies here since the firms are no longer price-takers). </p>

<p>For the consumers, I was going to use the Cobb-Doulglas utitlity funtion for all consumers for an easy first simulation.  </p>

<p>What I would like to know is: Is there some sub-area that deals with consumers and firms battling it out which arrives at equilibrium? Are there any resources that axiomatically treat this scenario?</p>

<p>I tried looking at bayesian games, but it seemed that it was geared toward something a little different. </p>

<p>My inspiration for this project was this video: <a href="https://www.youtube.com/watch?v=PNtKXWNKGN8" rel="nofollow noreferrer">https://www.youtube.com/watch?v=PNtKXWNKGN8</a> </p>

CC BY-SA 4.0
2019-09-02T09:35:51.050Z
The idea is good and there is a lot to learn form such an exercice. I would begin with the perfect competitive case because everything can be calculated analytically. It becomes quite involved in imperfect competition, because the long-run equilibrium cannot be characterized but not computed explicitely. You need to specify on the output demand side, how consumer substitute one product for the other. Do they all buy the cheapest product, or do they accept some higher prices...
Bertrand
CC BY-SA 4.0
2019-09-02T09:36:05.060Z
If you consider identical firms (homogenous technologies) and the static framework (without sunk cost of entry and exit), you could code a loop saying that N <- N+1 as long as profit is positive and N <- N-1 otherwise, with a stopping rule if you go from one case to the other (no integer solution to the probem).
Bertrand
<microeconomics><competitive-equilibrium><simulations>
Simulating a simple economy with ... price-makers? arriving at competitive equilibrium
Ceeerson
# Simulating a simple economy with ... price-makers? arriving at competitive equilibrium

(Asked by: username_0 on 2019-09-01)

I'm new to economics and thinking about graduate study. My background is mathematics.

I started reading a book on microeconomics by Mas-Colell, Whinston and Green. My goal is to understand how groups of buyers and sellers arrive at a equilibrium.

I understand the three criteria satisfying the definition of a competitive equilibrium with the assumption of price-taking firms: clearing markets, maximized profits for the firms, and and maximized utility for the consumers subject to some wealth constraints.

What I would like to do is make a simple python program which has firms, and consumers that (perhaps according to some distribution) decide their own ask and bid prices respectively (that would self adjust after some trial and error to transact) which tend to the situation of having an equilibrium (I'm not sure if a competitive equilibrium applies here since the firms are no longer price-takers).

For the consumers, I was going to use the Cobb-Doulglas utitlity funtion for all consumers for an easy first simulation.

What I would like to know is: Is there some sub-area that deals with consumers and firms battling it out which arrives at equilibrium? Are there any resources that axiomatically treat this scenario?

I tried looking at bayesian games, but it seemed that it was geared toward something a little different.

My inspiration for this project was this video: <https://www.youtube.com/watch?v=PNtKXWNKGN8>

**Tags:** microeconomics, competitive-equilibrium, simulations

> **Comments:**
> **username_1**: The idea is good and there is a lot to learn form such an exercice. I would begin with the perfect competitive case because everything can be calculated analytically. It becomes quite involved in imperfect competition, because the long-run equilibrium cannot be characterized but not computed explicitely. You need to specify on the output demand side, how consumer substitute one product for the other. Do they all buy the cheapest product, or do they accept some higher prices...  
> **username_1**: If you consider identical firms (homogenous technologies) and the static framework (without sunk cost of entry and exit), you could code a loop saying that N <- N+1 as long as profit is positive and N <- N-1 otherwise, with a stopping rule if you go from one case to the other (no integer solution to the probem).  

---

## 0 answers

