ECON 251: Financial Theory

Lecture 3

 - Computing Equilibrium

Overview

Our understanding of the economy will be more tangible and vivid if we can in principle explain all the economic decisions of every agent in the economy. This lecture demonstrates, with two examples, how the theory lets us calculate equilibrium prices and allocations in a simple economy, either by hand or using a computer. In future lectures we shall extend this method so as to compute equilibrium in financial economies with stocks and bonds and other financial assets.

 
Transcript Audio Low Bandwidth Video High Bandwidth Video
html

Financial Theory

ECON 251 - Lecture 3 - Computing Equilibrium

Chapter 1. Introduction [00:00:00]

Professor John Geanakoplos: Now, the course, just to summarize again, the course is the standard financial theory course that was made popular over the last ten years in a bunch of business schools, and those guys who developed this material basically thought that markets were great and finance was almost a separate part–could be walled off from much of economics. So here at Yale we’ve never taught finance that way.

We’ve always taught it as a part of economics and the crisis recently, I think, has made it clear that that’s probably the way one should really think about the problem. So it’s become very fashionable now to say that financial theorists had everything all wrong and to ask how it is that they got everything all wrong. Why didn’t they anticipate the crash? And the two standard critiques of standard financial economics are a) it didn’t allow for psychology, and you’ll hear about that from Shiller next semester, and b) it didn’t take into account collateral. And it was all done in a very special case, a knife-edge case.

If you looked at it a little more broadly you would realize that the kind of crisis we’ve had now is not such an unfathomable thing. In fact it’s happened many times before. So that’s the perspective I’m going to take in this class. So to put it a different way, Krugman, very recently in the New York Times, you may have read his magazine article, wrote exactly that, that there are two problems. The financial theory has failed us. Why has it failed us? Well, because it didn’t have psychology and it didn’t have collateral.

And he didn’t talk much about the collateral which is obviously something he’s not thought very much about before. But together with the collateral he sort of said it’s too much–how did he put it? He said, “Too much seduction by mathematics. The financial economists were seduced by their own mathematics into believing stuff that a sensible person who didn’t pay so much attention to mathematics wouldn’t do.”

Well, although the critique in this course is going to be partly based on collateral the rest of what Krugman said I completely disagree with. I regard that as a kind of Taliban approach to economics. The more technology and firepower you use the more you’re going to be misled. That’s what the Taliban believe, and they want to get rid of modern technology and return to first principles. So I think, in fact, the problem with modern finance was not too much mathematics, but too little mathematics, and they made these very special simplifying assumptions and didn’t realize how important the assumptions were to the conclusions. So we’re going to reexamine all that and that’s what we’re starting at now.

Chapter 2. Welfare and Utility in Free Markets [00:02:48]

We’re going to consider, first of all, the argument that free markets work best. So we started with a little example. Oh, by the way, the first problem set, if I didn’t mention it, is due Tuesday. So you need to bring it to class and there will be a box with each of your section leaders’ names on it. So supposedly you’ve been able to sign up for sections by now. Is that right? Anyway, it’s on the web, so you pick a section and sign up for it. If you wait too long your section will fill up the time.

So there are eight sections. You ought to be able to find one of them that fits your schedule. And you need to turn it in on Tuesday in class, by the end of class. Maybe you can scribble something during the class, but by the end of the class we’re going to take the problem sets and after that it’s too late to hand them in. So all of you are going to have problems, you’re going to have midnight sessions, all night things that you’re going to have to do for some other course, or grandmothers are going to die. All sorts of things are going to happen, but we don’t take the problem sets late. So there will be ten problem sets.

We’re only going to count nine of the grades so you’ll have one free pass, and that’s what life is. And it’s just too complicated to keep track of people handing them late all the time. The answers are going to go on the web right after the class, and so it’s just in the past we negotiated with every person who was late and it’s just too complicated. And when you make a simple rule grandmothers don’t die anymore. So anyway, that’s how we’re going to work it in the class. You just have to turn it in. And there are ten of them. Only nine count. If you miss one altogether it’s really not going to change your grade anyway. If you miss half of them that’s going to have some effect on your grade, and so I don’t encourage you to do that, but I’m sure you won’t do that. So I think that’s all the preliminaries. There are two midterms, one in the middle of the class and one right at the end.

Anyway, the question we want to spend the whole of the class on today is whether the free market is really such a great idea. And the quintessential example in which it is a great idea is the one we did in class on the very first day. We had a bunch of football tickets and there were buyers each of whom knew his own valuation and sellers each of whom knew her own valuation and we threw everybody together and just very briefly explained the rules. By the way, the only important rule was–there were two important rules. You had to announce publically and loudly what price you were offering. That’s very important. You don’t have any secret deals. That would have screwed everything up.

And secondly, we had a rule about once you make a deal what happens. How does the thing actually get transferred? So one of the TAs stood by and wrote it down, and the two people exchanged the footballs and agreed to it and walked off stage. So the actual mechanics of the transaction to make sure that the person turning over the money actually gets the football ticket, that of course is incredibly important and that’s the thing that gets left out often in finance. That’s the collateral business that we’re going to come to later. How do you know that the guy’s actually going to pay you what he promises? Well, he’s got to put up collateral so that you can trust him. So without that there would have been a big problem, and we’re going to come talk about that later.

In the old days when you bought a stock someone on a bicycle would carry the certificate from one place–someone would carry the check from one guy to another guy and then the bicyclist would get the stock certificates and ride the bike back to the buyer. So it was one broker to another broker. Sometimes it took a couple of hours, so there was a spacing in between when the guy gave over the money and when the guy got the stock back, and you have to allow for that.

Maybe it would take a couple days to process on everybody’s books. So there’s a thing called ex-dividend. When you buy a stock the old buyer continues to get the dividends for a while–the old owner–until a particular date after which the new buyer starts getting the dividends if there are any. And everybody has to understand that, because you have to allow for the actual trading technology. So all those things are going to come up later, and they were in the background of this example.

But never mind that. The point now is that these people, everybody just knew their own valuation, not anybody else’s valuation, and chaos ensued, hardly any rules, and miraculously almost instantly within less than two minutes they figured out what to do and they managed to get the football tickets into the hands of the people who liked them the most. And I’m going to just say that slightly more mathematically. You could model what everybody did as having a utility function for football tickets.

So the top person, Mr. 44 gets utility of 44 for having one ticket and tickets beyond that don’t give him any extra utility, just still utility 44. Similarly Miss 6 there at the bottom she had utility 6 for a football ticket, but there’s also money in the background. So the welfare function depended on the football tickets and money and was U(X) + M. So why does that capture what went on? Because Mr. 44, knowing that the football ticket’s worth 44, he would say to himself, “Should I get a ticket or not get a ticket?” Well, if the price is under 44 the amount of money he gives up and loses is going to be less than the amount of utility he gains for the football ticket so therefore he’ll buy the ticket.

So this utility function U(X) + M captures the idea, represents the goals of the people involved in the experiment. Each of them has a different U of X, but all of them are of the form U(X) + M. And so the conclusion was of the experiment and of the theory, supply equals demand, the conclusion is that the football tickets are going to end up in the hands of the people who like them the best. So what does that mean?

That means that in equilibrium the final allocation maximizes total welfare. Now what does that mean? Well, each person, i, has a different utility function, and so if you add up over all the people i you get the total welfare of every single person, the economy’s total welfare. I’m now about to prove–but it should be obvious–that total welfare is maximized at that equilibrium that you actually found in class, almost. There was just one tiny, tiny deviation from the theory. Nobody made a mistake, by the way. I think I mentioned this many times. I’ve done this experiment before and Mr. 12 gets so upset that he can’t buy any ticket and he’s standing there embarrassed that everyone else has traded and he’s still sitting there with no football ticket–he ends up bidding 30 or something to get a football ticket.

Nobody made a mistake this time, and so it happened almost as the theory predicted. So let’s just think of the theoretical outcome. In the theoretical outcome where the price is 25 and those top eight people have it that final allocation maximizes total welfare. Why is that? Well, whatever the money distribution was you couldn’t change total welfare, because if i gives up some of his money to her, to j, the total amount of money is still the same, and if you add up the welfares of all the people you’re just going to get the total amount of money on the right and it won’t make any difference. So therefore to maximize welfare all you have to do is maximize the sum of–you have to put the football tickets in the hands of the people who want them the most.

That’s going to maximize welfare, because that maximizes the sum of the Ui of X’s and rearranging the M’s doesn’t matter. So we found in equilibrium–that equilibrium maximized total welfare. So that was the original argument for why equilibrium was such a great idea. The greatest good to the greatest number became mathematical. It maximizes the sum of the welfare, so the sum utilities they called it. That was the utilitarian view of economics, utilitarian view. And that’s sort of the view that prevailed in 1871.

All right now, they made one generalization from that–we found before, which is that if you think of not eight different buyers, but one buyer, or maybe two different buyers where the utility functions are this concave function, so they’re UI(X) + M where UI of 1 could be 44 and UI of 2 could be 44 + 40 which is 84. That consolidated person would behave exactly like the individual people who’d buy as many tickets as they would collectively and so nothing would change. The football tickets would still end up in the hands of the people who wanted them the most.

Maybe it would be one guy, who held three tickets, instead of three different people, but the tickets would still be in the hands of the highest valuation holders and so you would get exactly the same conclusion. One last lesson from that example is that the price turned out to have nothing to do with the total value of football tickets. The price turned out to be equal, more or less, to what the marginal buyer and the marginal seller thought it was worth. So Mr. 26 and Miss 24, they’re the ones who controlled the price, what 44 thought was totally irrelevant, so that was why it was called the marginal revolution in economics.

So Adam Smith who was so puzzled because he said water is so valuable and has such a low price, and diamonds are so useless really when it comes down to it and they have such a high price the answer to his puzzle is simply yes. Water, at the beginning Miss 44 would be 44,000, whereas if we had a same model for diamonds, diamonds would also be very big at the beginning. But the point is there’s so much water in the economy that the marginal value of an extra gallon of water is not very high. The marginal value of water is low even though the total value, which is the area under the demand curve, is very high.

So that’s the lesson that we learned in the first class. And now we want to generalize this to a much more sophisticated model, but one you can still compute very easily, and we’re going to see how these special assumptions don’t quite work so well. Yes? Please interrupt me at anytime with questions.

Student: So could you explain again how you said that the welfare function and the utility function somehow involve three or four people together.

Professor John Geanakoplos: Yes. So her question is–I said very quickly which you’ll see later, I pressed the button too soon. If I press down and it’s halfway up does that just break the whole thing? Anyway, so her question is she would like to know, again, why it is that I can sort of combine people into one person and what do I mean by that. So what I meant by that is if I have two people, Mr. 44 and Mr. 40–I’m taking the buyers to be hes and the sellers to be hers–I have two guys, 44 and 40, and I set any price.

If the price is above 44 neither of them will want to buy. If it’s between 44 and 40 just Mr. 40 will buy [correction: just Mr. 44], and if it’s below 40 both of them will buy, but each of those guys is only interested in one ticket. Mr. 44’s utility is UI of 1 is 44. UI of 2 is still 44. He doesn’t get anything out of a second ticket. Suppose now I had a third person, a bigger person whose utility UK of 1 is 44 and UK of 2 is 84, 44 + 40. So that person, now, is a bigger guy. He’s interested in more tickets. That’s what I mean by bigger. He’s going to behave himself exactly the same way the other two separate people behaved collectively. So if the price is above 44 he won’t buy either ticket. If it’s 50 and he buys one ticket he’ll have lost 50 and he’ll have gained 44 in utils, so he will have been worse off than when he started, and he certainly won’t buy two. He would be even worse off.

If the price is between 44 and 40 he’ll say to himself, this is the marginal revolution, “If I buy the first ticket I pay 42 and I get 44 out of it, so I’ve gained two utils, but now if I think about buying a second ticket for 42 and I only get 40 out of it I’m going to start losing, so I’ll stop with one ticket. So that guy will behave exactly the same way the two people separately behave, so whether it’s two guys separately or one guy together it doesn’t make any difference. Their total action’s exactly the same. And in the end the football tickets have ended in the hands of the people who liked them the most.

Maybe I need a lot more water than you do, but if I need it much more than you do then all those gallons, maybe the first twenty gallons I drank I needed more than your first gallon and after that you started needing water as much as I did, something like that. So the tickets or the water ends up in the hands of whoever needs it most, and it may be that there is more than one unit in each person’s hands. Any other questions before I raise the thing again?

Chapter 3. Equilibrium amidst Consumption and Endowments [00:16:52]

All right, so that sounds all very convincing, but it’s not going to turn out to be quite so convincing. So let’s try and generalize this model to a more sophisticated thing. And so I’m following an example which is in the notes. So you find that if you read the notes–oh, so the textbooks.

Because the approach I take and that we take a Yale is quite different than the standard approach you’re not going to be able to follow a textbook. That’s why I give you a whole list of textbooks. I encourage you to read them. They’re great books. They’re famous people. Most of them are quite good friends of mine so I endorse them all, but they’re differently presented than this course and that’s why you need to rely on the notes a little bit. So let’s just take this first example.

Suppose now that we have two goods, but they’re going to be continuous. You don’t have to have just one football ticket or two football tickets. We have two goods which we’re going to call X and Y, and we’ve got two agents, A & B. And so WA of X and Y, that’s the welfare function like we had before, is going to be whatever I had, 100X - 1 half X squared + Y. And now the endowments of goods, which I was a little bit fast and loose about before, EA of X, EA of Y, that’s the endowment of A, how much he has to begin with of X and Y. I say it’s 4 and 5,000.

And then let’s make another person, WB, his welfare function or let’s say his and her welfare function is 30X - 1 half X squared + Y, and her endowment EB of X and EB of Y equals 80 and 1,000. So this is supposed to be shorthand for an economy in which there are thousands of people, millions of people, every person characterized by the utility they get, the goals they have over the consumption goods, and their starting endowments, and they’re all going to be thrown together and expected to trade.

Another example, we can do another example, let’s say. We’re going to work out both of these, the same kind of examples you’re going to the do in the problem set. Another example, I’m sorry I can’t remember my examples. I won’t need to look at these after I write the examples down. So another one is WC(X, Y) = 3 quarters log X + 1 quarter log Y, and EC, the endowment of C, equals 2 and 1. And meanwhile I have another person D of X and Y whose endowment [correction: utility] is 2 thirds log X + 1 third log Y and her endowment 1, 2.

And of course I could have had an economy in which they were all there at the same time, but I’m just going to do two examples. So you see the economy consists of many people, many goods maybe, many people and each with different endowments and different utilities, and if you throw them all together what’s going to happen? And so we have a theory now, a theory of equilibrium that explains what happens. And we can use a few tricks, which I’m going to teach you now, to actually solve concretely for what’s going to happen in each of these cases, and it’s very simple. And the next step is going to be to add finance to it and financial variables, but at the bottom we still want to have economic variables.

See here we’ve got the consumption of two different goods X and Y and we want to see what’s going to happen. All right, so equilibrium is always defined by turning things into equations. So we said the equations here are going to be that. So what is A going to do? Well, the endogenous variables are going to be PX, PY, XA, YA, XB and YB. That’s what everybody has to decide. In the end A has to decide, the prices have to emerge for X and Y.

We’re assuming, again, that these people, by the way–I have one agent A and one agent B, I really mean there’s a million agents just like A and a million agents just like B and they’re all shouting and screaming at each other and they’re in some kind of market. So if there’s only one agent of each type there’d be bargaining and threats and it’d be very complicated, but with lots of people of each type, that’s what I’m talking about–so in our football ticket example there were sixteen people competing with each other and you don’t really need much more than three, or four, or five on a side, at least four, to get competition.

So with enough competition the theory says the prices are going to emerge and people are going to look at the prices and decide how much they want to buy. What do they want to end up consuming? So A has to make his decisions and B has to make her decisions. And so those are the endogenous variables. The exogenous variables were all of the 80, 1,000, 1 half, 1 times y, 100 times x, all those numbers are exogenous. The utility functions, the endowments, are exogenous. So these are all the exogenous things. So the theory is going to say, how do you go from exogenous to endogenous and it’s going to be just a bunch of equations, so what do they each want to do?

So A is going to maximize WA of X and Y such that, as we said, the critical insight, the budget constraint–[clarification: here, writes but does not say out loud PX] + PY Y is less than or equal to PX times EAX + PY times EAY), but we know what these numbers are. EAX is 4 and EAY is 5,000. So A takes it for granted–theory says this, it’s very shocking–but it says A takes it for granted that he can sell all his endowment if he wanted to, 4 units of X and 5,000 units of Y and get the money from doing that and use the money to spend on his final consumptions–let’s call this XA and YA–of XA and YA. So let’s leave out the A’s here for a minute because those are the choices he has. He’s wants to max over X and Y, so there are many possibilities. It has to satisfy this budget constraint. And similarly Y is going to be maximizing over X and Y, WB of X, Y such that PX X + PY Y less than or equal to PX times 80 + PY times 1,000. I think I remembered the numbers finally.

So, and now what we want to do is we want to solve for these variables so that when A, taking PX and PY as given, maximizes his utility function, he’ll choose XA and XB, and B will choose YA and YB such that demand equals supply. And so I’m going to write, over here, maybe, demand equals supply. So we know that in the end so whatever these choices are they’re going to lead to him choosing XA and YA and her choosing XB and YB. And it’s got to be that XA + XB= EAX + EAX which equals 4 + 80 which equals 84. And it’s got to be that YA + YB has to equal eAY + eBY which equals 5,000 + 1,000, which equals 6,000.

I hope I’ve remembered everything. So all right, so those are two of the equations. Supply has to equal demand, and now let’s just do a little trick here to get some of the other equations. A is going to spend all his money. What’s the point in not spending money–because the more X he has and the more Y he has, certainly the more Y he has, the better off he is. So he’s not going to waste money. So this is going to turn out to be an equality here.

Okay, so that’s actually an equation, not just a variable. So PX times XA (now the actual solution) + PY times YA has to equal PX times 4 + PY times 5,000. That’s an equation, and then similarly Y, she’s not going to waste her money. She’s going to spend it all it she’s optimizing, so this will turn into an equality. And so this will give PX times XB + PY times YB = PX times 80 + PY times 1,000. So we’ve got four equations, and now we have to do the marginal equation, the crucial marginal equation. So what does that say?

We talked about this last time. You’ve all seen it before so I can go quickly, but this was the critical insight that took years to develop. Marx couldn’t figure it out. Until his dying day he was trying to understand what these marginalist guys were doing. So the idea is that if you’ve optimized by choosing XA and YA, if he’s optimized choosing XA and YA, it has to be that the last dollar he spent–he was indifferent between where he spent it. Otherwise he would have moved a dollar from one thing to the other thing. So it has to be that the marginal utility of X at XA and YA divided by the price of X, so what is that?

What is the marginal utility of X? That’s the derivative of X, 100 - 2 times 1 half, 100 – X, has to equal the marginal utility to A of Y–divided by the–sorry, I meant to leave room here. Equals the marginal utility of A of Y evaluated at XA and YA, divided by the price of Y. So that equals 1. Marginal utility of Y is just 1. The derivative of Y is 1. And then we have to write the same thing for B. The marginal utility of X for XB and YB divided by the price of X. So what is for B? It’s (30 - X) divided by PX. Not very good board management. Has to equal, and this is also going to turn out to be 1 over PY equals marginal utility of B of Y, at XB, YB, all over PY. So those are the equations.

Now, does that make sense to everybody? I think I need to pause for a minute. I’m going to do exactly the same thing with that other system, but let’s just see if we can figure this out. So equilibrium is this very involved thing. What everybody does depends on what everybody else is going to do because how much should you pay for something depends on how much you think you can get it by offering it to some other guy. If there are a million A’s and a million B’s, you’re dealing with one of the B’s, maybe the other B will give you a better deal. So you have to think about what the other people are doing before you can decide what to do yourself.

All that is captured by the idea of the prices. Somehow people get into their minds what the best deal they can get is. That’s the prices, PX and PY. Given those prices, A, each agent, looks as his budget set or her budget set and decides what to do. And what should they do? They should equate marginal utilities. That’s the key insight. The marginal utility per dollar of X has to equal the marginal utility per dollar of Y. That just says that the budget set is tangent to the indifference curve. That’s what that says.

So you take the ratio of marginal utilities–it equals the ratio of prices. And cross multiplying, it says the marginal utility per dollar, the slope of the indifference curve is marginal utility, let’s say, of X over marginal utility of Y and the slope of the budget set is PX over PY. So if I just put the PX down here and the marginal utility up there that just says the marginal utility of X divided by PX equals the marginal utility of Y divided by PY.

That’s something that you could waste a huge amount of time on. I don’t have to do it because I know that you all have seen it before, and the one guy who hasn’t seen it before is going to figure it out himself. So we have a tremendous advantage here. I can just skip over that immediately and make use of that fact. So that’s the critical insight. You’ve taken this incredibly complicated system and reduced it to a bunch of equations which you can put on a computer, which is about–what I’m about to do, and solve it with a flick of a button.

So are there any questions here–let me pause again–with how I got these equations?

Chapter 4. Anticipation of Prices [00:32:43]

So it’s a little bit complicated, but of course once you’ve understood it it’s not so complicated. Now, who first thought of all this stuff? The amazing thing is, incidentally, these equations always have a solution. If you take typical equations in any field, physics, mathematics, just random equations, they’re not going to be solvable. X squared + 1 = 0, that’s just one equation, doesn’t have a solution. And if you have simultaneous equations why should there be a solution?

The economic system always has a solution. This is an astonishing fact first proved by Arrow, my thesis advisor, Debreu who did it at Yale as an assistant professor, and didn’t get tenure, and later won the Nobel Prize, which has happened several times at Yale–Arrow, Debreu, and McKenzie all separately, although these two guys ended up writing a joint paper, anyway, they found that this system always has a solution. There’s something special about the economic system that has a solution that has to do with diminishing marginal utility, which we’re not going to talk about in this class, but it’s quite a fascinating thing.

And they based their argument on an argument that Nash had given for games. And this whole thing is very related to Nash equilibrium. And I’m sure you’ve heard of Nash and many of you have maybe seen the movie, A Beautiful Mind. Well, about five years ago, a couple of years after the movie came out, Nash is still very much alive and not quite as wacky as he used to be, and so the Indian Game Theory Society opened. It was founded believe it not, just five years ago despite all the brilliant Indian economists. The Game Theory Society was founded about five years ago and they had an opening conference where six people gave talks including Nash.

I was one of the people who gave a talk, and there were thousands of people who showed up, mostly because of the movie, I mean, there was just thousands and thousands of people. So afterwards we went on tour, traveling to a bunch of different cities, and every city we went to we’d get off the train or the limousine or something there’d be a throng of people there waiting to meet Nash and there’d always be a press conference. And after the press conference there’d be a picture on the front page of whatever city, and these were all great cities, a city we’d gone to, and always there was Nash and everybody else was cropped out of the picture.

But anyway, in one of these first conferences, I’m just illustrating Nash equilibrium here, somebody said, some reporter says, “We’ve seen the movie, but can you really tell us in a word what is Nash equilibrium, competitive equilibrium, just say in a word what does it mean, what does it mean for us? And so each of us took a try at trying to explain what Nash equilibrium was including Nash.

It didn’t go too well, the explanations, until they got to Aumann. So he was also one of the people who spoke, and he subsequently won the Nobel Prize. But anyway, at the time he hadn’t won it yet and he’s Israeli. He’s also a great figure. And so Aumann says, “That question reminds me,”–I can’t do his Israeli accent–“that question reminds me of the first press conference Khrushchev”–who you might remember was Premier of the Soviet Union. This was in the time of Kennedy and thumping the table and the Cold War and stuff–“the first press conference Khrushchev gave to western reporters and somebody said, ‘Can you tell me in a word, describe in a word the health of the Russian economy,’ and Khrushchev says, ‘Good.’ And then the reporter says, ‘I didn’t really mean one word. Take two words and tell us, what is the health of the Russian economy?’ And Khrushchev says, ‘Not good.’” So Aumann says, “Equilibrium in one word is interaction, in two words, rational interaction.”

So his definition managed to get into the newspapers and none of ours did. So that pretty much summarizes it. It’s interaction, but rational interaction. So, and it’s captured by the idea that everybody anticipates the prices and those prices are going to really lead to the market’s clearing.

So they’re all anticipating the right prices and behaving as optimally as they can, choosing the best thing in their budget sets. I put this on a computer and solved it, which we’re going to do in a second, but there’s a trick to solving this by hand, so I might as well just do the tricks by hand because on an exam, for example, I’m not going to be able to give–you’re going to use the computer, it’s very simple. You’ll see in one minute you can solve this on a computer, but by hand it’s worth knowing how to do and you probably know how to do this, but let me describe it. So the first thing to observe is that the prices don’t really matter up to scalar multiples.

Walras, by the way, was the first who made this argument. So Walras was one of the marginalists in 1871 from Lausanne. So he says, “Look, doubling the prices isn’t going to do anything. It’s just like changing dollars into cents.” If you look at everybody’s budget set and double PX and PY you’re doubling both sides of the equation. You’re not doing anything. So if PX and PY are part of an equilibrium, 2PX and 2PY will also be part of the equilibrium because the prices only appear here in the budget set and doubling them all doesn’t do anything. So really you might as well assume that PX equals 1.

So he says, “Well, that gets rid of one variable. You’ve got six variables and six equations so you can all solve them, but there’s so many it seems too complicated. But now you got rid of one variable, well you can also get rid of one equation,” he says. So how can you get rid of one equation? Well, suppose we clear the X market. We find XA, XB, YA and YB and PX and PY and all the equations are satisfied, one through five. All these equations are satisfied, one, three, four, five and six are all satisfied. We haven’t checked equation two though, whether that market’s going to clear.

And Walras said, “Well, it has to clear. The last market we don’t need to worry about.” Why is that? Because if XA + XB = EA + EB that means collectively all the agents are spending on good X exactly all the money that they’re collectively getting by selling good X. That’s what the top equation says because when you multiply through the whole thing by PXthe total amount people are spending on good X is equal to the total amount agents are getting by selling all the good X. So since everybody’s spending all their money that must mean the rest of their money collectively is just all their money they’re getting from selling good Y. They must be spending it all collectively on buying good Y.

That means the next equation automatically has to hold because everybody spent all his money so therefore all the money collectively that was spent on good X equals to what’s purchased [correction: revenue received in sales] of good X because supply equals demand for good X. So good Y it has to be that all the people, the income that they’re getting on spending [correction; selling] good Y, all of that was spent on buying Y collectively, not any person, each person that’s selling Y and buying X or something, but collectively all the money we’ve just deduced spent on [correction: received by selling] Y had to go to buying Y, so therefore the Y market is clearing too. So once you’ve cleared all the other markets you know that the last market has to clear. So without loss of generality don’t worry about last market.

So that reduced it to five equations and five unknowns, so that helped. We got rid of one equation and we got rid of one unknown. So we got rid of the top equation, let’s say, and PX. One of those two equations, the market clearing equations, doesn’t matter as long as we do all the others, and one of the prices we can fix at 1. So as we can fix PY, let’s say, at 1, we might as well fix PY at 1. This becomes a much simpler equation. This now I can replace with 1, and this I can replace with 1. We already know what the price is of Y, it’s 1.

But now things get very, very simple because you have (100-X) over PX = 1, so I just write that again, (100-X) over PX = 1. So I bring the PX to the other side and I have 100-X = this is XA– equals PX. Another way of writing that is XA = 100-PX. Then from this bottom equation I’ve got 30-PX–30 minus–XB, sorry. These are A’s and this was B. I forgot the superscript. So (30-XB) over PX) has to equal–well, the marginal utility is 1 and the price is 1 so that equals 1. So I just have 30-XB = PX, or, in other words I have XB (just writing this–bring it to the other side) = 30-PX.

So you look at the demand. This is what Walras did. He said, “Forget about all these equations just look at demand and see where demand equals supply.” So here, given the price PX and PY we know without loss of generality PY is 1. So given PX this is how much A is going to demand of X. And given PX this is how much B is going to demand. And we know in equilibrium by that top equation that plus that has to equal 84. So now I can solve it.

So I know that 100-P–well, I’m just going to solve it quickly. So it’s 130-2PX = 84, which implies that 46, 2PX = 46 implies that PX = 23. Once you have PX = 23 then you can figure out what XA is, because 100-XA has to be PX so that implies that XA is 23 and it implies that XB is–no, XA is 77, right, where is XA? XA is 100-PX, so if PX is 23 XA has to be 77. It implies that XB, I can do XB from over here. 30-PX is 7, and sure enough 77 + 7 really do equal 84. So we’ve cleared the top market.

And now we don’t have to worry about the other market. We can figure out what XB is. How do we figure out what XB is? We go into this budget set. At a price of 23 he’s going to consume 77. That’s going to cost a bunch of money, and this is how much income he has, and we subtract if off, and PY is 1, we can figure out what Y is. So we can figure out from this YA and YB, and we know that that’s going to clear the market, so we’ve solved the problem. But we can do this on a computer.

All right, so are there any questions how I did this? I’m going to do it one more time with this model and then I’m going to do it on a computer. And so this is the kind of problem that hopefully will be second nature to you after you do the problem set. It’s a very elementary thing. Of course the first time you do it, it seems very complicated, but it’s a very mechanical elementary thing, but it’s going to give us a lot of insight into the economy, so any questions? Yes?

Student: I was just wondering what those two lines said. I think the first word says assume. I just can’t read it.

Professor John Geanakoplos: Assume, this says, without loss of generality that PX = 1.

Student: And the second line?

Professor John Geanakoplos: Except that I took PY. This is PY not PX. PY = 1. And the second line, this one says, so without loss of generality PY is 1, so having put PY = 1 here I then looked at these equations, (100-XA) over PX = 1 over PY, but I took PY to be one so that’s 1 over 1 which is 1. And I took this equation which is (30-XB) over PX = 1 over PY, so (30-XB) over PX = 1 over PY, but that’s 1/1 which is 1, so I wrote that. So this is how I got my two critical equations. These two equations here, this and that, went down to this. And then I just rewrote this one as XA is 100-PX and this one you can write as XB is 30-PX. So 100-PX, 30-PX and then I added XA to XB and I got 130-2PX = 84 and I got PX. Yeah?

Student: So we can set PY to any number?

Professor John Geanakoplos: Any number.

Student: And get the same results?

Professor John Geanakoplos: Yes. You’ll just multiply the pries. If you set PY to be 2 you’d have gotten PX to be 46 and you get the same answer.

Student: So they’re like relative prices?

Professor John Geanakoplos: So the only thing that matters is relative prices. So this is what Walras pointed out. If you change dollars to cents you’re going to multiply every price by 100, but the relative price of oranges and tomatoes is going to be the same as it was before. So the theory only produces relative prices. Any other questions? There was someone else raising their hand. Nope?

All right, let’s just do it one more time so you see you get the hang of this and then we’re going to talk about why the market’s so good and we’re going to see things are getting a little bit more complicated. So let’s do this one. This one is going to work–oh, so I wasn’t very clever here. Aha, maybe I could be clever, more clever.

So how do we do this one? Well, we have to write down all the equations. So what are they going to be? They’re going to be the same as before, XA + XB = EAX + EBX. [correction: as pointed out later, should be XC + XD = ECX + EDX]. That’s supply and demand but this is just 2+1 = 3, and over here we have–it’s not A and B any more. It’s C and D, I guess I called them, C and D. And now we have for the second one, we have YC + YD = ECY + endowment of D of Y = 1+2 = 3. All right, so that’s supply and demand. Then we have to do the budget sets. They’re going to be simple. PX times XC + PYtimes YC has to equal PX times 2 + PY times 1. All right? And then budget set for D is PX times XD + PY times YD = PXtimes 1 + PY times 2. And finally we have to do the marginal business. So what’s the marginal business? So somebody tell me this. So we need the marginal utility of A over the price of X. What’s that? What’s the marginal utility of X to Mr. A?

Student: 3 fourths X.

Professor John Geanakoplos: 3 fourths what?

Student: X.

Professor John Geanakoplos: That’s what you said 3 fourths X, exactly, divided by PX. So how did I do that? I took the derivative of 3 fourths times log X. This is the only thing you have to know. The derivative of log X is 1 over X, and that’s going to be equal to the marginal utility of [clarification: at the point] XA, YA with respect to Y over PY and that’s equal to what?

Student: 1 fourth Y.

Professor John Geanakoplos: 1 fourth Y.

Student: Are your A’s C’s?

Professor John Geanakoplos: Yes, my A’s are C’s. Thank you. I’m glad you pointed that out. Thanks. So it’s embarrassing to make all these mistakes, but you’ll find in 30 years you’ll start making mistakes too. So that’s that equation and then we have to do the same thing for Y. And I should have been more clever and left more room, but I didn’t. But anyway, the last equation is going to be marginal utility. So what is the last equation? Marginal utility of D, of X, over PX = what? 2 thirds times 1 over Y [correction: X] divided by PX = what? I’m not going to write out marginal utility of—Y over PY is what?

Student: <>

Professor John Geanakoplos: [1 third times 1 over] YD, [all] divided by PY. So those are the equations. So now we’re going to put these on a computer, but we can solve these by hand again, and were going to see it’s very useful to be able to do this. Almost, so there’s another trick to doing this. So the trick is we can take one of them to be 1, whichever we want to do. Take PY to be 1 or PX to be 1. So take PX = 1. Here you see things are a little bit more symmetric. There, there was the special Y that had constant margin utility just like in our football tickets example. Here there’s nothing that is constant marginal utility. X and Y are much more symmetric. So this move to more symmetry without the special X if very important, and the guy who first did that was actually Irving Fisher at Yale who you’re going to hear a lot about very soon.

Chapter 5. Log Utilities and Computer Models of Equilibrium [00:52:53]

So it’s a little bit more complicated this time. So here’s the critical equation, this one let’s say. So now I’m going to solve this. So how can I do this? I want to do the same trick as before. I now want to solve–so let’s take PY to be 1 like I did before, take PY to be 1. So let’s just solve this equation, solve for X. It’s not going to be so easy to do this. So now there’s a tremendous trick here. What does this say if I rewrite this? I can bring the X down here and I get PX times X. And I can bring the Y down here and I get PY times Y. So it says that the amount you spend on X relative to 3 quarters is equal to the amount–this is by the way Mr. C–the amount C spends on X relative to 3 quarters is equal to the amount he spends on Y relative to 1 quarter, but the total spending on X and Y has got to be all his income. So basically it says that he spends 3 quarters of his income on X and 1 quarter on Y. That’s the crucial insight. So you can solve these logarithmic examples very easily by that trick. So it’s evident from marginal utility equation that C will spend 3 quarters of his income on X, and D will spend 2 thirds of her income on X. By the same argument she’s going to have 2 thirds–I can bring XDdown and her spending on X relative to 2 thirds is equal to her spending on Y relative to 1 third, but she’s spending all her income on X and Y. So clearly 2 thirds of it is being spent on X and 1 third of it Y. So that property of the log utilities is no accident.

They were invented for exactly that purpose. So this is a story you probably heard, but there is a famous–I’m from Illinois–there was a famous Senator Douglas from Illinois, there have been several Douglas’ from Illinois. One of them debated Lincoln. Maybe he wasn’t from Illinois. Lincoln was from Illinois. There was a famous senator named Douglas from Illinois after the Civil War and he noticed that farmers’ labor tended to get 2 thirds or 3 quarters of all the income and capital the rest. So he said, “What kind of utility function would make me always spend the same fraction of my money on a particular good.”

And so he went to his college math teacher, Cobb, and asked him if he could invent a utility function which had the property that you always spent a fixed proportion of your money on each good, and so Cobb invented the Cobb-Douglas utility function and this is where it is. This is just the sum of logs. So it’s called Cobb-Douglas utility. So it has that property, this property, that each person in this Cobb-Douglas utility spends a fixed proportion of her money on each of the goods, a different proportion on each of the goods and different people have different proportions, but any single person can always spend a given proportion 3 quarters on X and 1 quarter on Y, 2 thirds on X, 1 quarter on Y. And because of that it’s very easy to solve for equilibrium.

So we go, XA is going to be 3 quarters. What is her income? Her income is PX times 2 + PY times 1. So her income has to be that. She’s going to spend 3 quarters of her income on X, so I could write XA as that. So this is C. And XD is going to be, she’s spending 2 thirds of her income on X and 1 third on Y, so her endowments are 1 unit of X and 2 units of Y. So this is her income, PX times 1 + PY times 2, and so she’s spending 2 thirds of it on X so therefore PX times XD, that’s the amount of money she spends on X, that’s what she spends on X, has to be that, so XD is that. And if I add these two, when I add them up I have to get 2+1 = 3. So I can just now solve this.

Well, I can do a trick and pick one of my–either PX or PY to be 1, so either one. I keep going back and forth. It doesn’t make any difference. Let’s try PY as 1, can take that to be 1. And now I can solve it. So this is just 3 quarters, times (PXtimes 2 + 1 divided by PX. Then the other one is 2 thirds (PX times 1 + 2) divided by PX. So I can add those, and when I add those it equals 3. So I know that 3PX, if I multiply through by PX I get 3PX = 3 halves–hopefully I did this right–3 halves PX–this’ll be very embarrassing if I didn’t–3 halves PX + 3 quarters + 2 thirds PX + 4 thirds = 3PX. Oh, is this right? So who can do this in their heads? 3 halves PX from that is 3 halves PX, so 3 halves - 2 thirds, 3 halves is 9 sixths - 4 sixths is 5 sixths. It looks like 5 sixths PX. Does anyone believe that? If I do this in terms of 6 that’s 9 sixths and that’s 4 over 6, that’s 13 over 6 and that’s 18 over 6, so it’s 5 over 6 PX. That looks right, and 3 quarters + 4 thirds if I go to 12ths that’s 9 twelfths and 16 twelfths is 25 twelfths, so this looks like 5 halves.

So that means PX = 5 halves. So there I’ve got the answer. Does that look right to you? Is this clear what I did here? I just took for this trick all I did was I solved for–so let’s just repeat what I did. Just like over there I reduced it to simultaneous equations in a mechanical way, in a very simple straightforward mechanical way which the first time you see looks very complicated, but it’s very simple, in fact, after you’ve done it once. Then it allows you to take these very complicated models and say something concrete.

So I’ve got all the peoples’–their welfare functions and their endowments. So I say in equilibrium what has to happen. Whatever they decide to eat C and D what he eats plus what she eats has to be the endowment. The total endowment is 3. So the total consumption of X has to be 3. The total consumption of Y between what he eats and what she eats also has to be three. Now each of them is going to spend all their money. He’s going to spend all his money. She’s going to spend all her money.

Because it’s Cobb-Douglas, because it’s logarithmic, and you do this marginal utility stuff you find out, and this was the only trick, so this is a non-obvious trick which some senator and professional mathematician had to invent, Cobb-Douglas is designed so that you can say right away with those utility functions D is clearly going to spend 2 thirds of her money buying X, and C is going to spend 3 quarters of his money buying X. It’s just obvious from the first order conditions, from this marginal utility conditions, they’re called first order conditions, from this equating marginal utilities.

That was the crucial trick. So that’s a trick that you have to internalize and from now on that’s all you have to know that C’s going to spend 3 quarters of his money on X, 1 quarter of his money on Y and D’s going to spend 2 thirds of her money on X and 1 third on Y, but supply has to equal demand. So what is C? What is he actually buying? Here’s his total money. He has two units of X and one unit of Y. So he’s selling his units of X at the price PX, and his units of Y at the price PY, and he’s spending 3 quarters of it on X. So how much X is he actually buying?

This is the amount of money he’s spending on X. Divide by the price of PX, that’s how much money he buys of X. She, D, she’s going to spend, here’s her income which is not quite the same as his, because her endowment is different, that’s her income. She spends 2 thirds of it on X, so the amount of X she wants to buy is the amount of money she spends on it divided by the price. That’s how much she wants to buy. Now I just have to add XC + XD and it’s very hard for me to do at the board and you to follow there, but of course if you stare at the page for a minute at home it’ll be very simple to follow.

I do Walras’ trick. I said I can always take PY to be 1, and if I take PY to be 1 I’m going to get this income is PX [times] 2 times [correction: plus] 1 times 1 which is just 1, so 3 quarters of this divided by PX, that’s what he’s buying. She’s buying 2 thirds of her income which is PX times 1 + 1 times 2 which is plus two, divided by PX, that’s what she’s buying, and I just add this to this and do a little algebra. So I just add and do a little algebra and lo and behold PX is equal to 5 halves. So I happened to remember that’s the right number so I actually did this right. So PX is equal to 5 halves, and we’ve solved the whole problem.

So if PX is equal to 5 halves how much is she actually buying of X? Well, I could always plug this back in, plug in PX is equal to 5 halves and find out that’s 5 + 1 is 6, times 3 quarters, divided by 5 halves. That would tell me how much XCshe was buying. So and I could plug in 5 halves for PX and I’d get how much D was buying of X and I could also plug PX= 5 halves and PY = 1, and find out what they were doing of good D. So you can solve it by hand very easily, but let’s just solve it by computer instead unless there’s a question. Ha, I stopped it. Any questions about what I did here? Yes?

Student: So we just maximized utility so there’s no other allocation of utilities any greater?

Professor John Geanakoplos: Well, now we haven’t gotten here yet. I’ve run over a little bit, so I’m going to finish the class by repeating this calculation on a computer just by pressing a button and you’ll see what the answer is. But then we have to examine the question, have we really maximized utility here, and to give away the punch line, that utility was very special. It was constant marginal utility of 1 in a particular good Y. That’s what made this example as almost identical to the football ticket example. The final equilibrium is going to maximize the sum of utilities.

Here, this equilibrium is not going to maximize the sum of utilities. There’s no reason it should maximize the sum of utilities. And so you need a different definition of why the free market is such a good thing. So economists made a tremendous mistake. They thought that the original criterion for a good market is you maximize the sum of utilities. That’s not even true in an example like this one, so we need a different definition which we call Pareto efficiency that illustrates why the market’s good.

But if they made a mistake once it stands to reason they could make a mistake another time. So there’s something special even about this example. When we put in financial variables I’m going to argue you shouldn’t expect to get the optimal outcome all the time, but that’ll be next class. Yes?

Student: Beyond like arithmetic use is there any reason you would choose to assume PY or PX is 1 or it’s arbitrary?

Professor John Geanakoplos: No. There’s no reason to pick PX or PY to be 1, whichever one you want you can choose to be 1, and I keep going back. I can never make up my mind which one to do, so yeah, just whatever it works out. This one it clearly worked out arithmetically easy to take PY = 1 because the marginal utility of Y was 1 and that canceled everything out. Here I could have taken either one price to be 1 and it wouldn’t have helped. So I picked PY to be 1 again.

In the last five minutes let’s just show how to solve this by computer. So this is something you also are going to be able to do. And it sounds like, “Oh, there’s so many complicated things. There’s these new equations,” if you do this for the problem set, after you’ve done it once for the problem set–you may have a little trouble with the problem set, the TAs will help you, but after you do it once this will be very simple.

Now, doing it by computer is also very simple. And it’s going to sound complicated, but as all you young people know if any old guy can figure out how to work a computer you can do it vastly quicker. So let’s just take the second example here. And we have five minutes left. That’s all it’ll take. So this is Excel. Now, Excel is this program that’s made zillions of dollars. The inventor of Excel, by the way, was the inventor of Lotus. Oh, what was the guy’s name? His sister was in my class at Yale. He was two years ahead of me. Not Gabor, Mitch Gabor, [correction: Mitch Kapor] something like that was his name. Anyway, she was in my class, and he was two years ahead of me. And he invented this thing called Lotus, which made a lot of money. And then it got bought out by a few people.

And then Excel just basically copied the entire thing, Microsoft, and made a fortune and had to pay him off for plagiarizing the thing. But anyway, it’s basically Mitch Gabor was the inventor, a Yale undergraduate two years ahead of me. So he’s a billionaire now. So let’s just solve the problem. Let’s do the second one because I may not have time for the first one. So what did I do? I said let’s write down the exogenous variables first, sorry let’s just go up a little. So the exogenous variables are the endowment of X, of the two goods, A and B, that’s 2 and 1, and B is 1 and 2. Now what are the variables? PX, PY, XA, YA, XB and YB, we don’t what those are.

So I’ve plugged in PX and PY. I’ll guess both of them are 1, which is obviously going to be wrong, and I’ll guess that people just end up with their endowments, which is obviously not right. So then I look at the budget set. So those are my guesses. These are the endogenous variables and wild guesses about the solution. Now, what are the equations?

Well, we wrote them down. There’s the budget set of A, so that’s just the budget set of A. So how do you write these equations down? You simply name the–it’s up here if you haven’t used Excel before, up here. You write down the letter, say B35 that’s PX, so B35 times B31. That’s PX, is B35 times endowment XA. That’s the income. I wrote the income first. That’s the income A has minus how much she spends or he spends. B35 times B37, B35 remember is the price of X, B37 is how much he buys. So that’s just the budget set.

So for each of these equations, the marginal utility, I just did the same thing. Remember the 3 quarters, over PX times X = 1 quarter over PY times Y, so this [difference] should be equal to zero.

Instead of saying this equals that I subtract the right hand side from the left hand side. So you want all these equations to be equal to zero. I just wrote down the six equations. And so Excel now tells me that of course the budget set is going to be satisfied automatically because people are consuming their endowments. And the budget set of B is automatically satisfied because I just had them choosing their endowments. And markets are going to clear, of course, because everybody’s choosing their endowments, but they’re not optimizing. So this marginal utility stuff is all screwed up.

So what do I do on the right? For every error in the equation I square it. So I’ve squared all the errors. So these are my equations I need to satisfy, one, two, three, four, five, six equations. One, two, three, four, five, six, and I summed the squares. So if I make the sum of the squares zeros each of those has to be zero. So Excel, now, can minimize the sum of squared errors. Excel is going to search over all endogenous variables, PX through YB to find the things that makes this number as small as possible. Once this number becomes zero it means all the ones above it have to be zero because they’re all squared numbers adding up to that, and so I will find the solution. So you see that all you have to do–if you’ve done this before of course it’s obvious, if you haven’t it’s just so simple to write the equation.

Supply and demand I just name the box, B32 that’s the endowment of YA + the endowment of YB equals the consumption of A plus the consumption of B. That’s the difference we want to make zero. So here’s how you solve it. There’s a thing called solver. So you go to tools and you hit solver, and now solver says you want to take a target cell. I cheated. I already knew what it was, C47. So it’s the target cell. I hit minimize, so I want to minimize that. And now what cells do I change? Well, I have to tell Excel what to search over. So now Excel, what are the cells?

I could say PX, PY, you know, all the endogenous variables, but I know I can fix PX to be 1 so I’m going to forget that one and I’m going to say just these five, right? I don’t need all six of them, just five because I can always take PX to be 1. So the solver now knows it wants to minimize this number, which is the squared errors of all the equations I want to hold equal, it’s going to minimize that by searching over all those numbers. It’s not very smart about searching for it, and sometimes it never finds an answer. We know there always is an answer, and so how do you solve it? You just hit solve and it’s going to search and do it.

And what should the answer be? If I fix PX to be 1, remember the answer was when PY is 1, X turns out to be 5 halves. If I fix PX to be one, what should PY be? The solution we got before was PX = 5 halves and PY is 1. Now I’m going to fix PXto be 1, so what should Y be? X was 5 halves times Y, so Y should be .4, so if this solves right we should get PY to be .4. So I just hit solve and voilà I get PY to be .4. I find XA is 1.8. I find all the numbers. I just solved it just like that instantly. So you can see how useful it’s going to be to use solver and do these problems.

Student: If you change the endowments does that change it?

Professor John Geanakoplos: Of course. If I change the endowments I’ll get a different answer, and if I increase the endowments yes it does and that’s very important.

Student: <> increasing it <>.

Professor John Geanakoplos: If I double everybody’s endowment?

Student: If you double one endowment.

Professor John Geanakoplos: If I double one endowment that’s going to change things around. If I double everybody’s endowment it won’t change anything, yeah.

[end of transcript]

Back to Top
mp3 mov [100MB] mov [500MB]