Minimum Variance Portfolio
Walks through when diversification reduces individual risk, and finds a minimum-variance mix using a two-stock example with correlation coefficients 0, 1, and -1.
Some original drawings have corrections. Read the notes on those drawings alongside the worked steps.
Picking up right from the previous post. No intro.
Alright so anyway… let’s see how “risk” goes down when you scatter your investments across this and that. More precisely, spreading the weights widely can shrink the individual variance contributions; shared movement can still remain.
When there are 2 stocks in the portfolio, the variance of the portfolio is
![]()
When $n = 3$,
![]()
Up to here I can’t quite feel what’s going on, but if we look at $n = 4$,
![]()
What I’m getting at is… let me write out the case $n = k$.
![]()
There are $k$ terms where the risk from individual stocks affects the overall portfolio risk. But the number of terms where the covariance affects the overall portfolio risk is on the order of
terms. It’s going to be an overwhelming number….
When nonnegative weights are spread thinly and individual variances stay bounded, their separate contributions shrink. Covariances may still matter — but counting terms alone does not tell us how much!
For example, with $k$ independent stocks of equal variance $\sigma^2$ and equal weights $1/k$, every covariance is zero and portfolio variance is $\sigma^2/k$. All the remaining risk is from the individual terms! Shared covariance can dominate in other cases, but not automatically.
So we tweak $w_1, \ldots, w_n$ to reduce the whole portfolio variance — individual and covariance terms together. That is how we look for a ree~~ally excellent portfolio~~!
A two-stock example
So let’s take a very simple example and actually do the calculation ourselves. Let’s say there are 2 stocks, and each takes up 50% of the portfolio ($w_1 = w_2 = 50\% = 0.5$), and let’s say
, and
too.
And we’re going to look at when the correlation coefficient between the two stock returns is 0, 1, and -1. I’m expecting something really interesting to show up, heh heh heh
First, when the correlation coefficient between the two stock returns is 0,

so
![]()
Having seen it calculated this way, I could confirm that it comes out smaller than
, the standard deviations of the two individual stock returns.
But that was just now, with the correlation coefficient being 0, assuming the two stock returns have no correlation at all, so now we’ll look at the cases where there is a correlation. Let’s say they’re in a very extreme relationship. So I’ll do $\rho = 1$ and $\rho = -1$.


Ah… so even if you diversify,
can still be swayed depending on
— that’s what this shows.
What this means is…
“Yoo~~~ I did some investing this time, and I diversified!!~~” “Oh really??? Show me, hehehe — how’d you do it?!?!?!”
“Look at this~~~ Hyundai cars, Kia cars, Renault cars, and Ssangyong!!!~~~” “Yeah, great diversification….;;;;;;”
After seeing this story, take another look at

Doesn’t it seem kinda reasonable that the 0.35 in there comes out as the average of
, the standard deviations of the two individual stocks’ returns??? (since 50% went into each)
Then let’s conclude like this: only for
, $\sigma_p$ is the largest when
and the smallest when
!!!
It came out as 0.35 → 0.25 → 0.05.
Varying the weights and plotting the points
From here on down, I’m going to vary the ordered pair
and watch the trend in how it changes.
Ah, but I didn’t calculate the portfolio’s expected return above. That one,
, is just a weighted sum like this, so I didn’t treat it as a big deal. But from here on down, I’ll calculate the portfolio’s expected return together with the rest.
Anyway, now let’s vary the ordered pair
and see what the expected value of the portfolio return and the standard deviation come out to in each situation. If I wrote out every single step of the calculation, it’d get insanely long, right? So I’ll just throw you a table. Trust me! hehe

It comes out like this, they say.
Then I’ll bundle up the expected value and the standard deviation of the return in each situation as pairs,

and plot them as points, pop pop pop, on coordinate axes like this!! I’ll have the computer plot the points, pop pop pop.

(blue: $\rho = 1$, orange: $\rho = 0$, gray: $\rho = -1$)
When I told it to plot the points, it plotted them like this. So I told it to connect them with lines here and there.

(blue: $\rho = 1$, orange: $\rho = 0$, gray: $\rho = -1$)
Ah…. the points aren’t coming out the way I intended….lol
Right now I’ve split the ordered pairs
into 9 cases, but if I subdivide them really, really finely and take lots of cases into account, the gray one should get its points plotted like this:

(blue: $\rho = 1$, orange: $\rho = 0$, gray: $\rho = -1$)
The added point is a rough sketch. For $\rho=-1$, the exact zero-risk weights are $w_1=4/7$, $w_2=3/7$, giving expected return about 24.286%. That is the point the graph is trying to show!!!
I actually nudged the data and added that extra point so the chart would draw the shape I intended!!! That’s a disclosure about my sketch, not a numerical proof; the exact weights above are the calculation to use.
When $\rho$ is 1 or -1, they have the property of being drawn as straight lines!!! But in that gray case, where the backward-bending part is drawn, there’s a point where risk becomes 0???? Let’s just pocket facts like this, so we can pull them out and use them when we need them^^
Anyway, let me summarize.


I think it can be summarized like this.
Finding the minimum variance portfolio
Once the portfolio is decided as one holding $\text{stock}_1$ and $\text{stock}_2$, the correlation coefficient is decided as $\rho_{1,2}$ too. If it had been $\text{stock}_7$ and $\text{stock}_{13}$, we’d have gotten a different correlation coefficient, $\rho_{7,13}$, instead of $\rho_{1,2}$, but our choice was $\text{stock}_1$ and $\text{stock}_2$. So, in other words, right now

on these axes, one particular line has been decided, and now we want to know the investment ratio $w_1$ for $\text{stock}_1$ and the investment ratio $w_2$ for $\text{stock}_2$.
For a unique unconstrained minimum, we need $\operatorname{Var}(R_1-R_2)>0$, the denominator in the formula below. If it is zero, the returns differ only by a constant and every fully invested mix has the same variance. The ratio of $w_1$ to $w_2$ at that minimum variance portfolio will be represented by that blue point.
But where are the levels of $w_1$ and $w_2$ that give us that point!!!!! How do we find that!!!!!!
Since we’ve decided to build the portfolio out of 2 stocks, $\text{stock}_1$ and $\text{stock}_2$, it means $\rho_{1,2}$ has been decided, so the portfolio variance is

and right now, everything in it except $w_1$ and $w_2$ is already decided!!!
Wow, damn, so that’s two variables?????
That’s No No ~~~ we can merge them into 1 hehehe since we have the condition $w_1 + w_2 = 1$
![]()
like this, we’re down to one variable, and since all the other variables are now constants, we can find the $w_1$ that gives the minimum variance portfolio!!!
With that positive denominator and unrestricted weights, we differentiate $\sigma_p^2$ with respect to $w_1$ (it has the same minimum as $\sigma_p$) and set the derivative to 0. If short selling is forbidden, keep $w_1$ between 0 and 1: when the formula falls outside, use the nearest endpoint!

It only looks outrageously complicated — the arithmetic is about 11th-grade level.
Anyway, we found $w_1$ like this, but do we have to find $w_2$ like this all over again????
That’s No NO ~~~~ it’s simple

P.S. Did you know? I converted the blog posts into PDFs and offered those notes for sale :-) PDF copies of my physics and finance notes — original purchase information .
Heads-up. The figures here are the original notes, slips and all. A few things to watch for:
- In the handwritten table, the third group of columns is headed $\rho = 1$ but holds the values for $\rho = -1$: there $\sigma_p = |0.3w_1 - 0.4w_2|$, which is $0.05$ at $w_1 = w_2 = 0.5$.
- In the picture where $w_2$ is replaced by $1 - w_1$, the left side should be just $\sigma_p^2$; the $\frac{d}{d}$ in front of it is a leftover, and the differentiation comes in the next picture.
Questions or corrections?
Did a step lose you, or does a number look off? Email me or use the contact page. Include the note title and the step or figure you mean.
Feedback goes to me privately by email; it is not posted as a public comment.