# MPT efficient frontier

How does one determine what the ef comprises of? I know this is preached in the cfa text, but how does one discover the optimal portfolio in real life?

is this a philosophical question?

Mostly through optimization software. The software will basically try out different combinations of assets and gravitate to the balance that maximizes return (or minimizes risk).

Here is a rudimentary excel approach using solver and the basic standard deviation and return formulas. The inputs would be the expected returns, standard deviations and correlations of multiple asset classes. Calculate the optimal portfolio by solving for the highest sharpe ratio portfolio. copy and past the risk/return and weights to each asset. Then (this is tedious) plug in a series of progressively higher target returns. For each return, solve (using solver) for the portfolio that yields the minimum standard deviation for each target return. Copy and paste the weights, return and standard deviation of each portfolio. Then do a graph of the returns of each return and standard deviation (returns in y axis). This is the efficient frontier. To get the optimal portfolio (RF combined with risky assets), use algebra to solve for the allocation to risk free rate and the optimal (max sharpe ratio) risky portfolio if given either a target risk or return. This would look simpler if I could attach a spreadsheet.

Thanks everyone. I’m reading through some PM material for Level 2. The efficient frontier comes up again, and a light bulb goes off in my head; how do we find this out in real life? The step by step is not displayed in the CFAI texts. Bchad, do you have information about some ideal optimization software? If it is not too spendy, I may check it out.

Portfolio Optimization appears in the L3 curriculum, so you’ll see it before you’re done with the exams. If you don’t have too many assets in your portfolio, you can build a slightly clunky optimizer in Excel using solver. You need to know how to handle matrix math in Excel, which, if you know the basics of matrix multiplication, you can pick up in an afternoon. That’s probably the cheapest option. You can optimize a portfolio for a specific risk or return level by telling solver to find the Max return (or min risk). To get the frontier though, you’d need to do some VBA to repeat the process for lots of risk levels or return levels. If you have and know how to use Matlab, it has a basic optimizer function built in to it. It’s been a while since I’ve used it, but like excel, to get the efficient frontier, you have to iterate the optimizer through a bunch of different expected returns to trace out the frontier using a for loop or something. I usually found the minimum variance portfolio, and then incremented the risk by some small amount each iteration. You can also do a google search for excel optimizer. I actually did something like this just last weekend and found the Hoadley Portfolio Optimizer, written by this guy in Australia. Look it up if you are interested. Cost is around \$100 US, depending on the exchange rate. I haven’t tried it, but have been considering giving the demo a spin. BTW, there are a bunch of problems with using the simple Markowitz efficient frontier. The main problem is that it only works if you know the true expected returns and true risk and true correlations of assets. In practice, you have to estimate them from historical data, some kind of model, or dead reckoning. It turns out that the little errors that can crop up in estimation can have a big effect on the composition of the efficient portfolio, and it can make the portfolio highly concentrated when perhaps it shouldn’t be (because you don’t have fully accurate inputs). Level 3 talks about a few ways people try to deal with that issue, and there is a whole field of research in finance called “Robust Optimization” that tries to deal with the problem of how to optimize when you only have estimates of expected return, rather than true knowledge of what the expected return is.

Try out the software “VisualMVO” from effisols dot com. I spent a day or two last year trying out all the mean/variance optimizers I could get my hands on and this one is by far the best. It uses some sort of quadratic algebra to determine the frontier (instead of trial & error, as is the standard method) so it’s very fast. The free trial version lets you play with a few assets. I found an annoying format related bug when trying to feed it returns from excel but the tech support is good.

Hey KJH, what do you like about VisualMVO versus the others you tried? Did you do the regular or the plus version?

Bump - Interested in learning more about VisualMVO

Visual MVO rocks! Instead of having some software program create zillions and zillions of portfolio combinations, this program creates an efficient frontier using some sort of fancy math I don’t understand. Apparently, I cannot think in abstract mathematical concepts. Whatever, the result is it is fast and allows you to quickly tinker with expected returns, positions limits, and time frames of your data. I use the software in context of a long/short portfolio so that I can see what kind of volatility to expect and so I don’t accidentally weight positions the wrong way. In other words, so I don’t load up on the long side with financials vs. a short position that is just the broad market (that’s an extreme example). If I didn’t have this software I would wonder about how various positions were correlated and if I’m taking unnecessary risk.