Say an investor with 1 million dollars want to put his money on several investments.

Say investment outcomes on those investments are $x_1, x_2, x_3, x_4, ... x_n$

The investor need to put w1 on x1, w2 on x2, and so on.

The investments have various expected return m1, m2, m3, m4, ... mn. It has standard deviation s1, s2, s3, s4, ... sn.

It has correlation table p11, p12, ... pij, pnn for i and j running from 1 to n

I want to maximize 2 variables. Namely the expected return and the additive inverse of the standard deviation of the mixed investments.

Basically I want a function that map standard deviation to expected returns and a vector (w1, w2, w3, ... wn) that correspond to the weight of where I should put my money.

How do I do so?

And practically, is anyone doing it?


1 Answer 1


You're talking about modern portfolio theory. The wiki article goes into the math. Here's the gist:

Modern portfolio theory (MPT) is a theory of finance that attempts to maximize portfolio expected return for a given amount of portfolio risk, or equivalently minimize risk for a given level of expected return, by carefully choosing the proportions of various assets.

At the most basic level, you either a) pick a level of risk (standard deviation of your whole portfolio) that you're ok with and find the maximum return you can achieve while not exceeding your risk level, or b) pick a level of expected return that you want and minimize risk (again, the standard deviation of your portfolio). You don't maximize both moments at once.

The techniques behind actually solving them in all but the most trivial cases (portfolios of two or three assets are trivial cases) are basically quadratic programming because to be realistic, you might have a portfolio that a) doesn't allow short sales for all instruments, and/or b) has some securities that can't be held in fractional amounts (like ETF's or bonds). Then there isn't a closed form solution and you need computational techniques like mixed integer quadratic programming

Plenty of firms and people use these techniques, even in their most basic form.

Also your terms are a bit strange:

It has correlation table p11, p12, ... pij, pnn for i and j running from 1 to n

This is usually called the covariance matrix.

I want to maximize 2 variables. Namely the expected return and the additive inverse of the standard deviation of the mixed investments.

Like I said above you don't maximize two moments (return and inverse of risk). I realize that you're trying to minimize risk by maximizing "negative risk" so to speak but since risk and return are inherently a tradeoff you can't achieve the best of both worlds.

Maybe I should point out that although the above sounds nice, and, theoretically, it's sound, as one of the comments points out, it's harder to apply in practice. For example it's easy to calculate a covariance matrix between the returns of two or more assets, but in the simplest case of modern portfolio theory, the assumption is that those covariances don't change over your time horizon.

Also coming up with a realistic measure of your level of risk can be tricky. For example you may be ok with a standard deviation of 20% in the positive direction but only be ok with a standard deviation of 5% in the negative direction. Basically in your head, the distribution of returns you want probably has negative skewness:

negative and positive skewness

because on the whole you want more positive returns than negative returns. Like I said this can get complicated because then you start minimizing other forms of risk like value at risk, for example, and then modern portfolio theory doesn't necessarily give you closed form solutions anymore.

Any actively managed fund that applies this in practice (since obviously a completely passive fund will just replicate the index and not try to minimize risk or anything like that) will probably be using something like the above, or at least something that's more complicated than the basic undergrad portfolio optimization that I talked about above.

We'll quickly get beyond what I know at this rate, so maybe I should stop there.

  • That is precisely what I am seeking. Modern portfolio theory
    – user4951
    Feb 1, 2016 at 14:53
  • 1
    It should be mentioned that while the theory of MPT is sound, the actual "optimal" weights that result are only as good as the expected returns that are put into the model. Expected returns are often very hard to guess making "optimal" portfolios often very poor in practice. MPT is often highly modified when used in practice or merely used as a rough start for portfolio building. Wikipeadia has a good discussion of the limitations. en.wikipedia.org/wiki/Modern_portfolio_theory
    – rhaskett
    Feb 1, 2016 at 23:56
  • Say I want to invest in various index funds all over the world. Is there a hedge fund or mutual fund that do this using MPT? Put the MPT on actual practice? I see very little reason why wou
    – user4951
    Feb 2, 2016 at 0:10
  • 1
    I'm a little confused by the above questions @JimThio. Maybe if you put them in a new stackexchange question you can get more help.
    – rhaskett
    Feb 2, 2016 at 6:19
  • 1
    @JimThio Yep. CAPM is one of the first things you learn in finance classes. The hard part isn't the model; the hard part is finding the appropriate parameters for the model that satisfy both the mathematical requirements and whatever legal/structural requirements the portfolio has. Like I said in the case of MPT, the math is pretty simple at first, but once you start using different measures of risk and getting into the quadratic programming, it gets much more difficult.
    – Michael A
    Feb 2, 2016 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .