Minimum Variance Portfolio
Walks through how diversifying stocks makes individual risk basically vanish while covariance dominates, with a hands-on two-stock example using correlation coefficients 0, 1, and -1.
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. Well, rather than saying risk goes down, I think what we can really show is that “the risk from individual stocks gets wiped out.”
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….
So the more stocks there are, the more “the risk from individual stocks becomes meaningless.” But the risk related to covariance stays right where it is.
I haven’t checked yet whether the overall portfolio risk gets smaller or larger as the number of stocks grows, so I don’t know. However, in terms of proportion, I have at least confirmed that the covariance terms take up almost 100%. Of course, since this is the risk of a portfolio built with $w_1, w_2, \ldots, w_n$ all taken into account too, it’s somewhat complicated.
But once almost nothing is left except the covariance effect…… if we then tweak $w_1, \ldots, w_n$ to push that covariance risk as low as possible, we can build a ree~~ally excellent portfolio~~ I think that’s how you get the gist of it.
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$)
So I adjusted the data values a bit, and plotted one more point like this, rigging it so the graph gets drawn the way I intended!!!
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$.
That is, the moment the stocks are decided as $i$ and $j$, there should be exactly one pair of “$w_1$ and $w_2$ that make it the minimum variance portfolio”, right?? 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!!!
We just need to differentiate the variance $\sigma_p^2$ with respect to $w_1$ (it has the same minimum as $\sigma_p$), right?!?! All we need is the spot where the derivative hits 0

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

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.
Comments
Discussion happens via GitHub Discussions. You'll need a GitHub account to comment.