So when would you ever use this type of knowledge? I'd like to give you a very practical example, which comes from the world of finance, which is something called Markowitz Portfolio Optimization. We're going to have two stocks. So we have stock number 1. And we have stock number 2. And we want to create a combined portfolio that is optimal in a very specific way. So, first I'm going to explain what it is we're trying to optimize. And then I'm going to show you how to apply the formula. I'm interested in a portfolio return. So I am using my Y axis to represent the combined return of some weighted combination of stock number 1 and stock number 2. So the return is going to be a weighted combination of their two expected returns. So stock 1 has an expected return, and stock 2 has an expected return. And the expected return of the portfolio is simply w1 times expected return of r1 + w2 times expected return of the second stock. And remember we're saying here that these ws sum to 1. So I'm going to be moving up and down the y-axis, based on the weighting of these two returns. So, you can think of the two returns as representing the top and bottom of some range. And if I weight 100% of one, I'll be at one point. If I weight 100% of the other, I'll be at the other point. If I weight 50/50, I'll be in the middle, 75/25, 25/75, and so on, okay? On this picture is a special point. This is what I can earn in interest on a short-term government bond that essentially carries no volatility. So this is a special value. We call this the risk free rate of return. Let's just say for purposes of our exercise that this is equal to 1%, okay? Our y-axis here represents the volatility of return, and so what we're going to do is we're going to calculate the standard deviation of our combined two assets. And we're gonna plot that on the x-axis, okay? So, if you imagine for a minute that our stock number 1 has an expected return, Here and an expected volatility of return here. You can think of this point as standard deviation of stock number 1 and the value for the expected return of stock number 1. And you can think of some point here as the volatility. Volatility being the standard deviation of returns, usual annual returns of a stock. And it's expected return on the y-axis. And what we are interested in doing is creating a weighted combination of these two assets. So that a line from the point represented by their weighted combination return, and standard deviation of return has the highest slope when connected to our risk free return point. So let me show you what I mean by that. What I mean is that there might be several different ways of combining these assets together from w1 = 1, w2 = 0. All the way to w1 = 0, w2 = 1, and they're going to be distributed on our graph like this. Assuming that they have a correlation less than one, [COUGH] there should be points in the weighted combination that have lower variance than either of the stocks individually. And so, the weighted combination may be more attractive in terms of the slope of this line, the slope of this line versus the slope of any other line, and certainly the slope of the original lines that reach these points. So what is it that we're optimizing? We're optimizing something called the Sharpe Ratio. Which was discussed in course one, which is the return, expected return of the portfolio, minus the risk free rate of return, divided by the volatility of the combined portfolios. I've redrawn our diagram to give us some room here. We've got our risk free rate at 1%. And what we're interested in doing is identifying the weighted combination of these two stocks so that the slope of the line coming up from the risk-free rate is at a maximum, okay. We know that weighted combinations of these two stocks are going to have points that look something like this. And our idea, our goal is to optimize the slope of this line. So this will be a line that is just tangent to the curve, and what we want to know is from that point, we want to solve for w1 and w2. So the name of this slope is the Sharpe Ratio. It's equal to our expected portfolio return, minus the risk free rate of return, divided by the standard deviation of our portfolio return. So, what is this going to look like? It's going to look like w1 times expected return 1 + w2 times expected return 2- the risk-free rate- that 1%. Divided by the square root of w1 squared sigma 1 squared + w2 squared sigma 2 squared + 2 times w1 w2 times the covariance of 1 and 2. But more typically we are given the correlation. And in the sample problem that I provided in the spreadsheet, we have a correlation of -0.35. So you can plug into this formula R times sigma1 times sigma2. And what we want to do is find the values for w1, w2, each must be greater than or equal to 0. And w1, w2, each must be less than or equal to 1. And w1 + w2 needs to be = 1. So this is a perfect problem for Microsoft Solver. We set it up to find the maximum of this value while changing one of our weights, and you can set the other weight equal to 1-w1. We subject the weights to the little constraints here that they're between zero and one and sum to one and Microsoft solver will simply spit out the answer for us. And if we go back and look at our picture here, we'll find out that the correct answer is a weighting of about 0.52. 0.525, 0.475. And it will give us a standard deviation of, 5.05% for our portfolio standard deviation. And our expected portfolio return would be equal to 10.9%, which would give us a slope of this line of 1.97. And what I'd like you to do is try using solver to find an optimum combination for stocks with a different correlation with each other. Or, you could try plugging in different returns and standard deviations for the stocks, and you can observe for yourself how these different things interact. And what you'll find is a strong negative correlation is highly desirable. Low correlation is almost as desirable. And what is less desirable is a high correlation. And we see again and again in investing that investors do wish to maximize the Sharpe Ratio, which is one of the reasons why they're always searching out alternative asset classes that have low correlation to the major investment vehicles like the major stock markets.