I have a prior. I have a view black letterman approach or introduction by Asian to MVO. So you remember that last week we were talking about the guy who are thinking about markets in terms of means and variances. And we are talking about the framework that guy developed by hiring markets in 1952. So this guy is. Maximizing his utility which equals to vector of means times portfolio minus Lambda times, portfolio times, sigma covariances, times, sigma transposed times, weights transposed. So this is just decision making framework developed by markets very basic for the investors which are thinking only about means and variances. But last week. We have seen how this framework could be easily extended to more complicated situations, with different measures of risk with taxes, with transaction costs, with multiple follow multiperiod optimization as well, and so forth. Now I want you to think about the same framework simplified framework the other way. So let's assume that we are living in the Magic world which is called CAPM World. In that CAPM world we have plenty of guys which are thinking about market in terms of means and variances. So we have many assets, many users and all of them are the same except for their risk tolerance. So exactly like in Marco same view investor is allowed to have various stories. So a markers framework that resulted in different portfolios on efficiency Frontier. So we have had. Efficiency Frontier and the. Investors with lower risk aversion would select portfolios higher on the frontier. The investors with bigger risk aversion will have this term bigger and. They will select portfolio slower in that frontier and investors with average risk aversion would select portfolios in between. So in CAPM World we have another creature fantastic, actually Beast, which is call it risk free so risk free would be for example. Here in our case and it happens that in. CAPM world. If we have risk free investors could. Combine the risky portfolio which is here with risk free to obtain more efficient portfolio. So this is a straight line, but this is efficiency Frontier. So for example, this investor could invest almost entirely in risk free. So this is risky portfolio and this is risk free, so almost entirety of part four of investor with this risk aversion is invested in risk free. He is here and he is outside the efficiency frontier built on using using only risky instruments. Then this investor is moving. Higher the knew efficiency Frontier, he is adding more like 30 to risky portfolio and 72 risk free. And this guy is having 50,50 allocations. But the idea is actually the same. They have different different proportion of risk, free, too risky portfolio. But the risky portfolio is the same and you know that this. All these risky portfolios have this same composition. So for example, if this portfolio is for example 30% big caps, 30% small caps and the rest which is 40% in commodities. Then probably all these investors would have this same composition of risky portfolio. Only Ryan degrees of risk free instrument. So the unlike the Marquis approach, this CAPM approach is equilibrium which the there is very simple mathematics which could transfer from this expression to the following expression so expected. Return for any asset in this universe minus risk free so investors are not thinking about risk free, actually right? So they're thinking only about risk premiums because risk free is not does not have a risk actually, so expected returns expected risk premiums equal beta times. Expected return for the market portfolio. Right, so this market portfolio. With certain composition, we have three classes here, minus risk free. So this is basic cap, M equation and the idea is capped him that it offers the universe a kind of final state, a kind of state of thermal death, right? So this is equilibrium, which means that in the end, in the long term we all would be there, but in the short term, of course we can have some deviations from equilibrium and in reality we do see that often so in reality. Not everyone have the same views. In reality we have companies where we have different analysts and different analysts may produce different views. So probably we need a framework which would combine these MVNO approach with powerful equilibrium approach of Kuppam and with reality of everyday life in investment companies where we have investment analysts. So that approach was developed by Black Litterman. They using quite simple magic. They told that if we are just looking. In Cup and world, we're looking at the structure of market portfolio. We can look simultaneously at the thoughts all those guys so we can. We can we can find, imply it returns returns which are implied by this structure of capitalizations. How can we do that? Let's see so the quadratic utility of the guy which were discussing previously but. Rewritten in terms of like Letterman framework. Looks like the transpose it waves times vector of π. And then a minus Lambda times. A vector times covariance times vector of weights, so the pie stays for market premiums and not actually our market premiums. But for estimates of prior means of market premiums by the investor. Multi participant. Now using gain, quite simple magic, we can show that prior a return in the access market premiums would be equal to Lambda times Sigma. Times vector of market capitalization. So this is pie chart right now, Lambda again, it could be quite simply shown that it is Sharpe ratio divided by two. Market sigmas. So this is call it the reverse optimization of market priors. We now let's look at how this is done in our so the Black, Linderman approach. We can use systematic investor toolbox to obtain a black measurement posterior estimates. But this is the longest way to do that. I will use the portfolio analytics package and the black Lederman. Function inside that package I would also use library datasets which have the data on European Stock market index returns, so I have the following returns in my data set I have returns for decks, returns for SMI Dax, Germany's semi Switzerland **** Friends Footsie GB I'm calculating returns. Now, number of assets vector of means vector of career metrics of covariances. Now I'm calculating peak metrics. So I'm creating pig metrics, not calculating so big matrix is the most is the trickiest. Actually part in the way? How is implemented in ours pick matrix? Consists of the same number of rows as the number of views which you have and the same number of collapse as the number of assets in your universe. So in my universe there are four assets and I also have two views. First, I think that Cat 40 would be SMI by 5% and I think that decks will have absolute total return. 03.. So this is how this is encoded using peak metrics. And views vector. So pig metrics. Have one row for every view so this view. Is for that decks will have absolute return. 03. so unit in the position of decks and zeros otherwise. Now the second view is that **** would be SMI. So unit in the **** position now minus one in SMI zeros. Otherwise. Now I have the vector of views. Have the Max reviews. 03. corresponds to the first view. So the first element corresponds to the first view. The 2nd element cause corresponds to the second view. Relativ return of calculus in my will be open 05. Now I am supplying all this data as inputs to black Letterman. And I obtain vector of posterior means and vector of posterior risks. We have priors. Now let's consider real world kind of real world example which would allow us to introduce views. So let's say that we have a firm which invests in the following assets. So first of all it invests in Treasurys right? The second asset is AAA's. Then bake caps measured by SNP 500. The small caps measured by Russell and probably commodities, measured by some commodity in this index. So we would analyze only these four asset classes because the Treasury's will be re screen our world. So here we have not returns, but in views not about returns but about risk premiums. So let's say that we have two analysts, the first analyst. Is analyzing equities and the second analyst is analyzing commodities? So first of all, let's start from commodities. Let's say that the first analysts is saying that the absolute return for commodities in the next year, the risk risk premium for commodities would be 10%. This is absolute view, then the second analyst is saying that small caps would beat big caps by two persons in risk premium in risk premium. So this is a kind of related view an every analyst is supplying is their views with confidence levels right? So we have a mega one an Omega 2. Some numbers to characterize somehow the confidence of analysts in their predictions and in the footnotes I'll provide you with detailed information about ideas where you can find those confidence levels now prior to introducing the views into a black leader. One formula we have to formalize these views and decorator on framework. So we formalize that we need to. Use the following structures. The first of all this is pick metrics. Big matrix would have the same number of rows as the number of views we have and the same number of collapse as the number of assets we have. So it will have one tool 3 four clumps right? Then we have. Q metrics so Q metrics would be 4. Numerical expression of views. So the Q matrix will store 10 and two. And two and then we have the Omega metrics. So the a mega metrics would store the Co variance covariance of confidence is so the that would have quite. Interesting structure. Like that now, the pick matrix would looks as follows. So first view covers only the last asset and having it does not cover the 1st three assets, so will have 000 in the first three positions and one in the. Last position. Now, the next you covers these two assets and we know that small caps would be big caps. So in this position, we'll placing one here. We'll place in minus one. And here we have zero and zero. So this is our big metrics. We are allowed to have this same number of views as the number of assets we have in our universe. So, these are our views. Now we're ready to input that use into Black-Litterman formula to obtain posterior distribution and then we're mixing posterior distribution and prior distribution and we are obtaining, vector of returns and metrics of risks. So according to Black-Litterman, they were using Bayesian logic to derive that formula, we have to mix prior and posterior using the following formula. So this is the formula for posterior returns, two tau times sigma P transpose it, multiplied by P tau sigma P transpose it plus on the Ergo. Multiply it by Q minus P times pi. So we have to sound this term with this term to obtain, let's like that top 10 posterior vector of posterior returns. And finally, let's write the expression for metrics, for metrix, covariance matrix. So covariance matrix M equals the. Then we have inverted metrics and we'll have the tau sigma, a minus one, a plus B, tau times the inverted, omega times B. So this is, The expression for covariance matrix and then we'll probably would use those, the vector of returns and matters of covariances as the input to some kind of kind of MBO, optimization approach, to obtain again portfolio.