In [12]:
from IPython.display import Image
Image(filename='Contract-curve-on-edgeworth-box.svg.png')
Out[12]:
"In economics, an Edgeworth box, named after Francis Ysidro Edgeworth, is a way of representing various distributions of resources. Edgeworth made his presentation in his book Mathematical Psychics: An Essay on the Application of Mathematics to the Moral Sciences, 1881. Edgeworth's original two-axis depiction was developed into the now familiar box diagram by Pareto in his book "Manual of Political Economy", 1906 and was popularized in a later exposition by Bowley. The modern version of the diagram is commonly referred to as the Edgeworth–Bowley box." -- Wikipedia
In our agent-based model, we endow our two traders with a certain amount of two goods, and then allow them to make any trades that result in increased utility for the trader. Neither trader knows the other's utility functions, and must make offers and see if they are accepted. Let's look at the properties we are using in our first run. Multiple sets of properties can be stored to disk, so interesting parameters sets can be saved:
In [16]:
!cat edgebox.props
These properties endow Albert with 20 cheeses and 0 bottles of wine, and Beatrice with 0 cheeses and 20 bottles of wine.
In [15]:
Image(filename='Graphics/AlAndBea.jpg')
Out[15]:
(Image from Zo by Arnold H.Q.M. Merkies.)
We can also set separate utility functions for each trader-good combo: here, for instance, we set Beatrice's cheese utility function to 10 - .25 * qty, and Al's to 10 - .5 * qty. And now we'll run with those properties, stepping through a series of "periods" where each trader is allowed to make an offer to the other:
In [1]:
run edgebox_run.py
We end the run by reaching equilibrium (no more mutually beneficial trades) with Albert having 7 cheese and 13 wine, and Beatrice having 13 cheese and 7 wine. Now let's change the utility functions. We'll set them to:
pa.set("al_cutil", "10 - .5 * qty")
pa.set("al_wutil", "10 - .75 * qty")
pa.set("bea_wutil", "10 - .5 * qty")
pa.set("bea_cutil", "10 - .75 * qty")
In [2]:
run edgebox_run.py
We now reach equilibrium sooner, and with different final holdings. Our changed utility functions make each trader "like" their initial good better, and so they wind up with more of it in equilibrium.
In [ ]: