Thursday, February 27, 2014

Measuring Supply and Demand in a Simulated Economy

Isn't Equilibrium Where Supply Equals Demand?

I was on vacation last week (which is why I haven't posted in a while) and spent some time thinking about where I want to go with the blog. I realized that it would probably be best to focus on basic principles before trying to get too creative with things like variations on the bargaining model. Besides, we can get a lot more mileage out of these key ideas.

So, what's all this talk about competitive equilibrium being the allocation where agents' marginal rates of substitution are equal to each other and their utility curves are tangent? Isn't it a lot easier to just say that equilibrium is where supply equals demand? Well, yes, it is, and actually, that is how we found the competitive equilibrium; we just approached it from another perspective. Recall that we did calculate the agents' demand curves along the way. As we'll see below, we actually found the supply curves as well, even if that isn't obvious right now.

Wednesday, February 12, 2014

Bargaining Power in a Simulated Barter Economy

What about non-competitive equilibria?

In my last post, I went through the process used to derive the competitive equilibrium allocation that I plugged into the trade function in our economic simulator. It wasn't just some arbitrary trade rule; I derived it from the agents' utility functions, making sure to meet certain conditions to define a competitive equilibrium. 

To reach a competitive equilibrium, we must assume that both agents are price takers. That is, they don't set the terms of their trade; the market does, and they just trade according to the market price. In a competitive market, the equilibrium price is the one that satisfies the demand functions of all the agents, even when there are only two of them.

But what if we relax those assumptions? Our model is still using a barter economy, after all, and some people are better negotiators than others. So let's consider trades where the outcome will still be on the contract curve (i.e., the outcome will still be an equilibrium; i.e., there will be no more ways to trade without making someone worse off). But now let's look at what happens when one agent is able to negotiate a better price. The weaker negotiator will still benefit from trade, but not as much as they did in a competitive equilibrium.

Monday, February 3, 2014

Why We Trade: Some Fundamental Economic Principles

How to Slice a Pie

Welcome to economics boot camp.  There are a few key ideas that I'd like to take time to explain, because they're absolutely crucial to building up the models I'll be writing about here. Even more important than the math, though, is getting the intuition behind these concepts. If you understand the rest of this post, you should have a solid grasp on how I am building the models for my simulation, and why they work the way they do.

Friday, January 31, 2014

How to Think Like an Economist

Welcome to Economics 101. Please check your politics at the door.

The best piece of advice I can give anyone who is studying economics for the first time is this: leave your politics at the door. It's hard, I know, because economics is a subject that can have a very personal impact on all of us. When biology works against you, you get sick. It's sad, of course, but you can't exactly go and blame nature for doing its thing. When math works against you, you just need to study harder or get help from someone who has more training. When literature works against you, you just find something better to read. But when economics works against you, you're out of a job, you can't pay your mortgage, and -- here's the kicker -- it's probably because someone else did something that, intentionally or unintentionally, has seriously screwed you over.

Wednesday, January 29, 2014

Peter Norvig's Economic Simulator

Let's build an economy!

I've wanted to do this blog for a while, but I had no idea where to begin.  So I want to thank Peter Norvig for giving me the entry point I was looking for.

Peter Norvig is an artificial intelligence super guru, and a director of research at Google.  He's a very bright guy. Last week he posted an entry on his blog about how to program an economic simulator in Python. This is something I've wanted to do for quite some time, so I was very interested to see how he put it together.  I would recommend you at least skim through his blog post before reading on, if you're interested in understanding how the simulation works.  In his words:
This is a simulation of an economic marketplace in which there is a population of actors, each of which has a level of wealth (a single number) that changes over time. On each time step two agents (chosen by an interaction rule) interact with each other and exchange wealth (according to a transaction rule). The idea is to understand the evolution of the population's wealth over time.
The simulator has four components.  There's a population of people with randomly distributed wealth. There's an interaction model that matches people in the population to trade with each other.  There's a transaction model that determines who gets what when they trade.  And there's a simulation model that ties it all together by creating a population, randomly choosing which people interact, executing their transactions, and reporting on the simulation results.  (In this case, the results are measurements of how the wealth is distributed among the members of the population.)

Monday, January 27, 2014

Why call it "Econometheus"?

Why the funny name?

First things first.  What's with the ridiculous name?  I'm glad you asked, observant reader, because that's probably the best way to introduce what this blog is about.  In Greek mythology, Prometheus and his brother Epimetheus were Titans who were given the responsibility of creating humans and animals to populate the earth.  While Prometheus was teaching the humans things like how to do math and write poetry, Epimetheus was giving all the cool gifts, like fangs and claws and wings and venom, to the animals.  When Prometheus finally was done with our lessons, there were no good physical traits left to give us.  Not wanting to see his beloved humans devoured by lions and tigers and bears, he decided to steal Fire from the gods and give it to us.  I'd love to go more in depth, but if I start talking about mythology here I'll probably never stop, so we'll leave it at that.

Econometheus will be a blog about artificial intelligence and economics; specifically, how to use economic models to design methods useful for artificial intelligence.  Similar to Prometheus teaching humans about reason and culture, it's about my efforts to give computers the gift of thinking according to utility-maximizing behavior.