All right, so, let's follow this train of thought to it's logical conclusion. All right, so our goal here is fixed expected return, minimize risk, or fix risk and maximize expected return, okay. So before we get into this, we kind of have to define our term, okay so when I say expected return, remember, expected return, it's a mathematical concept. It's a probability weighted average, right, if there's a half chance of return of 3% chance and half of return 5% then the expected return is 4%. Even though of course, we know 4% isn't going to happen, it's going to be 3 or 5, but expect return is 4, so that's what I mean by expected return. The mathematical concept of a probability witted average, okay. For risk, there's different ways you can measure risk, the way that Harry Markowitz measured it and the way that people continue to measure it to today, for the most part, is with the mathematical concept of variance, okay? Variance is a term of art to a statistician, variance is the expected squared deviation of the outcome from its expectation, okay? So the variance, in our little example there, right, it was three or five, so that variance would be defined by three or five relative to four. If we had instead two or six, all right, two or six, well, same expectation, larger variance, right? So it's the expected squared deviation from that expected return, okay, so that is a standard measurement of risk. I don't want to go deep into the math here, you can sort of look it up on your own if you're curious, but that's what variance is. And then, the other term you'll often hear is not the variance, but the standard deviation, okay? And the standard deviation, well, that turns out to be just the square root of the variance, okay? So, talking about variance, standard deviation, you're talking about the same basic concept. It's just that the standard deviation is the square root of the variance, okay? So, bear in mind when I'm talking about risk and expected return, that's what I'll be talking about. Risk is variance, expected return is this probability weighted average of the possible outcomes, okay? So for a given expected return, we're going to want to minimize variance and for a given variance we're going to maximize expected return. That's why people refer to this whole sort of body of work on this topic as mean variance optimization, mean variance optimization, okay. And the key terminology in this area is an efficient portfolio, okay? We're looking for efficient portfolios, and when someone says efficient portfolio, that means also something very specific, it means what we've been saying, okay. Efficient portfolio is a portfolio with that nice property that of all portfolios with the same expected return it has least variants, okay. So it's the most appealing from this point of view of all portfolios with that expected return, or of course the other way around, right. For all portfolios with it's variants it has the highest expected return, okay? So that's an efficient portfolio, and you can see why people call it an efficient portfolio, because you're efficiently bearing risk, right? You're bearing the risk that you just absolutely has to be born if you want that expected return, all right? So that's an efficient portfolio, by the way, let me just because we could get confused at this point, so I want to be clear. There are two ways that the idea of efficiency shows up all the time in financial economics and they're not the same idea. So you have efficient portfolios, okay, which is what I just said, you also have the concept of an efficient market which I'm sure you've heard about over the years, right our markets efficient. And when people say our markets efficient, what they're saying is, do markets reflect available information? Okay, so another way, is it possible to beat the market by trading on available information? If it is, then you would say markets are not efficient, all right, that there's information out there and that yeah you could use to beat the market so they're not efficient. That's a different idea, okay, that's not something that we're going to be worrying about here in this module, the concept of market efficiency. This is an important concept, but what we care about here is portfolio efficiency, that is the brass ring of the robo advisor. Okay, so what Dr. Markowitz accomplished back in the 50s, and what people have built on over the years, is he laid out how mathematically, you can identify these efficient portfolios. Okay, now I'm not going to walk through all the math here, that's sort of beyond the scope, the actual details of the math would take us a week right? And we don't really have that kind of time, so let me just tell you what the inputs are here to this, the inputs that you need in order to accomplish this. And if you're curious about the actual sort of what's the algorithm, then you can certainly go look that up, it's everywhere on the Internet. But so let's just talk about the inputs here, the inputs you're going to need to put into your sort of optimizer that's going to run Dr. Markowitz's algorithm. Are going to be number one, the expected returns of all of the individual assets that you are optimizing over all the things that might go into your portfolio. You need the expected return of all those things that you might have in your portfolio. Okay, and then on top of that, for the risk part, you're going to need the variants, remember the same idea. The variants of each one of those assets, and also and this is absolutely crucial to the whole thing, what they call the co-variances. The co-variances are how much these assets move with each other. Okay, how much they move with each other and if you think about it, that is going to be crucial to risk reduction through buying a lot of assets, right? If I have two assets and they move opposite to each other, okay, then I'd rather have both of them at once than just one of them, right? Because their risks are going to cancel each other out somewhat. And even if they don't move opposite to each other, as long as they don't move together, holding a lot of them at once. Generally, those those individual movements of the individual assets are going to have a tendency to wash out, to wash out on average, okay? So those covariance, the co-movements between the assets are going to be a crucial input into this algorithm. So you have expected returns, and then the variances of the assets, and also these co-variances that tell you about how much these things are going to move with each other. Okay, so as they say the actual math is a slog, but coming out of the other side of this math is going to be a portfolio with a lot less risk than the individual components that went into it. And it's one of those things that maybe it's obvious once you think about it, but, wouldn't we all want to write one of those papers have some result that no one had thought of and then it's obvious once you think about it. That was an amazing accomplishment of Dr. Markowitz, and it is everywhere in the world that he surveys now. So, if you think about applying this concept of mean variance optimization, Dr. Markowitz's algorithm in your app. Let me just say there's a there's sort of a hard way and easy way, I'll talk about the hard way, the sketch right now, the hard way and then in our next lecture I'll talk about the easy way, okay. So, the hard way is that you take a stand on what the expected returns are of all of the different assets you're putting into your black box here. What the expected returns are and all those variances and co-variances and you run the program, and you calculate these efficient portfolios. But of course, I'm saying it's hard not because it's hard to do the math, I'm saying it's hard because what you get out of that optimization is only as accurate as what you put into it, right? If you really don't know what the expected returns are of the different assets that you were putting into your black box. Then you're just totally guessing, then what the output is only going to be as good as your guess is. Okay, and that can be the tough part, right, you think about well, what might go into this portfolio? Well, maybe shares of Facebook, maybe shares of Apple, maybe shares of Walmart, or Ford, or maybe an IPO that just happened yesterday. Maybe stocks from other countries, other sorts of assets, gold futures, oil futures all sorts of things could go in to this optimization, right? And that can be tough to say what was the expected return of Facebook versus the expected return of Apple, versus the expected return of Ford? All right, that's not so easy, okay, generally speaking it's going to be a lot easier for you to say something intelligent about, not those expected returns, but those co-movements, right. That's something that you actually can say, you can think about with a lot more accuracy. I can kind of understand how Facebook moves with Apple or with Google. I can understand how Facebook might not move so tightly with Walmart or with Ford. And I can go to the data, I can measure those co-movements with a lot of accuracy, okay? So, When I go into this optimization, it's a little hard to say much about the expected returns, it's a lot easier to say things about this co-movement. So you might take an approach to say look, okay, I don't want to put a bunch of guesswork into this optimization. So I'm going to say look, let's just say for argument's sake, expected returns are all the same, but the co-movements. Those are the things that I'm going to estimate from the data and put in the optimization and that is going to give me my optimal portfolio. So what I'm saying here is that, as as a theoretical construct Dr. Markowitz's algorithm is very helpful when you get close to it, you have to start making some judgment calls. And sometimes for some practitioners, the easiest judgment calls is to say look, I'm not going to make sort of wild guesses about expect returns of different stocks. But I do have lots of information to use about their co-movements, and that's going to be the workhorse of the investment advice I'm giving my clients, okay? So that's one of the hard way, and then in the next lecture, we'll talk about he easier way.