# Mean Variance Portfolio Optimization I  more and investment, invested and hence made a profit, n is less than equal to 1 of course, I have received less can what I have invested So, I make a loss. So, there is rate of return captures both side the up side and down side of a securities market So, what we would be really interested in is called relative rate of return. Let us note this X naught the initial investment is known to me, but how much I will earned in period 1 at time 1 not known to me it can be varied depend on the nature of the market at that time. Nature of what are the prices at that time. So, this X 1 is actually random variable. Thus, making r the total return also random variable which for short I am writing as r v, the relative rate of return which says, that I invested X naught and got X 1. So, how much is a difference between X 1 and X naught and the ratio of that with X naught. So, X 1 minus X 1, X 1 minus X naught divided by X naught, is what is call the relative rate of return. So, this is what is my gain or loss and the rate measures that to what extent how much is the loss or gain it will be with respect to the initial investment So, that is; that means, that is the rate of return. So, change in the investment by the original investment like essential at the concept of the derivative right So, you can very well write down when usually see that capital R is related to this small r in this fashion, but note that r is itself also random variable. So, now, let us here, here we are talking about the return only on, this is I am talking about the total return So, let us see how we can view the total return in terms of relate, we have individual return Because if you are investing in each of these stocks 1 2, 3, 4, 5. N when each of them will have some return. And how can I view the total return as a sum all the individual returns And then form there we would like to compute the means and variances and all those things which would be important to set up what is called the Markov’s port mean variance portfolio model. Markov’s is research economics part of the novel prize in 1994 this for. It is important to remember why we are making this investment The idea on making this investment is to made money. So, you invest, but since you exposed to risk, you do not know whether you would gain whether you would lose. So, what you do that you expect, you expect certain amount return from the market. And you want to have that amount of money at least that amount of money and you want to minimize your exposure to risk in order to get that money. So, Markov is viewed variance of portfolio as the risk associated with the portfolio. Of course, now there are many other ways of looking at risk through way of value at risk and see all and all those things, the convex value at risk So, we will be getting to general study of risk function because that as to take us to something called as infinite dimension of convex analysis. We will not do that, but we will just try to now see how to right the return of the portfolio in terms of the return of these individual assets So, as we were discussing let for each of the individual assets my return is written as R i. So, if I look at X o i as the amount of money I invested in the asset i then this is nothing, but this one, w i is proportion of money invested in the asset i of course, I do not have to remind you writing is down this is 1. So, now, let R i denote the total return on asset i. If this is so, then I can know that R i, X 0 i is the amount of money I generate by trading in the asset i. So, it is a money generated by trading in the asset i physically selling it, of course, the issue of short selling which I am not coming, but I will tell you at the end what that some other facts see also So, R i, money generated by trading an asset i totally is R i w i X naught. So, total money generated by trading in the whole fort portfolio is just nothing, but the sum in over all the assets. So, the rate of return or in the total portfolio, or the total return on the whole portfolio r which is or which we have written is summation i is equal to 1 to n R i w i X i. Sorry this whole thing divided by X naught the total money that I have put it. Sorry this is X naught. So, now, you can divide this whole thing by X naught. So, return is now summation i is equal to 1 to n may w i R i. So, knowing that summation w i equal to 1, since summation w i is equal to 1 you can immediately calculate that the relative return is nothing, but summation omega ri either return on the relative return on the individual assets So, once you have this formula relative return in your hands that the total return nothing, but the vacate some of the individual assets We can now proceed to compute the expectation and the variance of this particular quantity r. This random variable of course, we assume there is follow certain distribution etcetera, which we not may not bother at this stage that what exactly the distribution is, will not bother at all about at this movement, but we assume that it follows in the distribution which has of an expectation variance was without that we cannot work because of them. So, the idea is to minimize variance subject to the fact that I can I will have a certain level of expected return and then the basic certain basic condition like summation 1 is equal to 1 should be there. So, I have to find that optimal w not o may I say w i say find optimal w i here. So, w i is my decision variables of the optimization problem that here only set up So, we start now talking about computing the expected value and the mean and variance of the portfolio of course, I assume that you know what is mean variance what is co-variance we are not going to bother about that So, my relative rate of return r is omega 1 r1 sorry, w 2 r 1, w 2 r 2 plus w and w n r n. So, by the standard formula for expectation which we call r bar, expectation of the return is expectation of r 1 plus, it may be basic factor r expectation and just writing in too much detail which I think I should not really, write say if I call them r 1 bar r 2 bar r 3 bar like that, then r bar is nothing, but weighted sum r the mean. So, mean of the portfolio is weighted sum of the means. Now we will compute. So, this is r bar is something which will fixed. I need this amounted expected return. So, I need say there invest 1000 rupees, I expect 1200 rupees at least are expected return. So, that is whole thing. So, now, will compute, it is a mean of the rate of return relative rate of return. Rate of return or relative rate of return is the same. Actually is the total return that we wrote that is essentially relative rated of return, but we are not bothering we have just defined this small r with the rate of return Now, we when you compute the variance of r We have to very clear that here we have n random variables because individual returns also random variables, and each of these random variables there may not be independent, but there may be correlated. So, you have to take into account that co relation. So, this by definition is expectation of r minus r bar Whole square and this is nothing, but expectation of I write down summation i equal to 1 to n omega i, r i minus summation i equal to 1 to n omega i r i bar. And that can be written as expectation summation i is equal to 1 to n and omega i r i minus r i bar whole square And this can be further decomposed as follows expectation summation i is equal to 1 to n, omega i r i minus i bar sorry r i minus r i bar into summation i is equal to 1 2 n, just here decomposing the square is exactly the way square route be taken Thus remember of formula a plus b plus c whole square that is all. I am sorry the omega j j is 1 to n r j minus r j bar. That is the thing. So, from here from I pick up and write the variance. Variance of r can now we written as I can, because I do the clubbing, I can just take the some in 1. So, usually do the multiplications you can your final layer just one set up sum. So, that can be written as expectation of summation i j equal to 1 to n, because they are the same indices it is omega i, omega sorry w i w j r i minus r bar r j minus r bar. And if you take the expectation tells you summation i equal to 1 2 n omega i omega j expectation r i minus r bar rj minus r bar and this is nothing, but the co-variance between the rate of return for the ith asset and rate of return for the jth asset So, this is nothing, but i equal to i j sorry this is i j i j equal to 1 to n omega i omega j and this is nothing, but the co-variance of r i r j. And that is i equal to 1 to n omega i sorry, w i w j do not forget. I would like excuse you for calling the w omega, but that have been my habit. So, you can call it either omega or w as you feel. So, will have a suntrap symbol for the co-variance which i had sigma j and if you look at this this is nothing, but i linear product is in a single product. And this can be written as, w sigma w. Let us sigma is a variance co-variance matrix. Sigma is a variance co-variance matrix. And this is given in the following Sigma 1, 1, square which is nothing, but sigma 1 square which we are not writing; sigma 1, sigma 12 sigma 1 n, sigma n 1 sigma 2 n, sigma n square, along the diagonal of this n cross n matrix, you have all the matrices and then you all the variance and then these are the co-variances. Of course, this sigma is symmetric matrix, is a real symmetric matrix I should write an over real, but you can understand on line real numbers So, it is a real symmetric matrix and then we need to understand variance of any random is very well always negative. So, whatever we are chosen omega, what is i w this is always greater than equal to 0. This would imply that the variance co heed matrix is positive semi definite matrix. Now we are going to a talk about the importance of the notion of diverse education of portfolio. That tells is the do not put all your eggs in one basket, in the sense that do not invest in less stocks if you invest in less stocks less number of instruments. Then it is actually increase your variance when you invest in more stocks your variance can become lesser and lesser So, let us discus that part what diversification of portfolio. And then we try to settle the Marco is many variance models So, now we are going to talk about something called diversification of the portfolio. So, when we are talking about diversification of the portfolio. Here meaning you should increase your number of assets. So, suppose now I have set of assets n assets which or say un correlated for the time being, then your expected rate of return r bar is, suppose I invest equal in all assets. So, for each asset I invest 1 by n. So, it will be 1 by n summation r i bar. So, that would be your expected return and your variance because you have un correlated asset now. Variance now are being nothing, but 1 by n square So, summation i is equal to 1 to n sigma i square i sigma is suppose constant their all of them have constant sigma m standard deviation And this will give me n sigma square by n square which will give me sigma square by n, and that goes to 0 as n does infinite This can be this this shown for un correlated assets, but you have correlated assets also you can show the same thing. So, it does not matter much So, suppose you have assets, that so, each asset i each asset i has each asset i has mean a say m or fix r bar, mean each asset I has mean. So, sorry r i bar is m and then physically r i bar is a m for this particular case, it will become n m. So, this will become fixed n m by n So, n has variance sigma square. Each asset i that is sigma i square is a sigma square Further let this correlated and a co-variance between r i and r j which is sigma i j is given as say 0.3-time sigma square. So, co-variance in if your, i j is also fixed it is some percentage of some fraction of sigma square. So, once you know that if you calculate the variance what will happen. See you see a slight difference when you un correlated assets and when you correlated assets So, variance of r should a write directly in terms of it is. So, it will become 1 by n summation i is equal to 1 to n, r i minus r i bar whole square. So I am taking the weights to be equal like an expected value 1 by n would now, sorry this by 1 by n whole square So, I will have to take this 1 by now, it will become 1 by n square here expectation of same thing summation r i minus r i bar i equal to 1 to n, this 1 I equal to 1 2 sorry j equal to 1 to n r j minus r j bar. So, once we have done that. So, here we know that this is 1 by n square summation sigma i j, i j equal to 1 2. So, this can be divided into 2 parts 1 by n square summation i equal to 