The following keys and mouse actions do interesting things:

(NOTE: you may have to click on the applet once before it will accept keyboard input)

Left-click - move an asset (white dot) Middle-click (or ctrl-click or alt-click) - add an asset Right-click (or meta-click) - delete nearest asset 'c' - toggle control panel 'g' - toggle geom mean grid lines (may be very subtle depending on your monitor) 'a' - toggle arithmetic mean grid lines 'm' - toggle minor grid lines (when showing major grid lines) 'G' - switch to using geometric mean returns (default) 'A' - switch to using arithmetic mean returns 'M' - toggle showing correlation matrix in control panel Debugging (stuff you don't care about): ' ' - repaint 'V' - cycle event debug level (output to java console window). 'T' - toggle draw time debugging (output to java console window). 'b' - toggle double bufferingSo, I was reading this book called

What hooked me is that it's easy to quantify and calculate the resulting return and risk, if you define risk as standard deviation. The simplest model of an asset with any given mean return and standard deviation is a coin toss. For example, consider an investment that, in any given year, has 50% chance of giving you +30% return, and 50% chance of giving you -10% return (this is Bernstein's "Uncle Fred's coin toss"). The (geometric) mean return is 8.17% (square root of (1.30 * .90)), and the standard deviation is 20%. If you have two identical but uncorrelated investments A and B with the above behavior, and you split your money 50/50 between them, then there are four equally likely outcomes in any given year:

A B -10% -10% -10% 30% 30% -10% 30% 30%So the expected return of this portfolio is the geometric mean of these four outcomes, i.e.

(.90 * 1.10 * 1.10 * 1.30)i.e. 9.08% (slightly better than the 8.17% you'd get by putting all your money one one or the other coin toss). And the standard deviation is clearly lower than that of a single coin toss; it's approximately:^{1/4}= 1.0908,

sqrt(((-10-10)better than the 20% of either individual coin toss. You can do a similar easy calculation to get the mean and standard deviation of a 25/75 split of A and B, or any other combination.^{2}+ (10-10)^{2}+ (10-10)^{2}+ (30-10)^{2}) / 4) = 14.14%,

This applet illustrates this phenomenon. The vertical axis is (mean) annualized return, and the horizontal axis is risk, measured as standard deviation (calculated in log space, so, for example, a standard deviation of 25% means the deviation is typically +25% or -20%). (The mean annualized return is calculated in log space too, so it's a geometric mean.) (Notice that the axis labels are not evenly spaced, since it's a logarithmic scale on both axes.)

Create new assets (white points) with the middle mouse button
(or alt-left), and move them around with the left mouse button.
The red curves show mixtures of two assets, in increments of 5%.
The blue grids show mixtures of three assets.
The green dots show mixtures of four assets.
The yellow dots show mixtures of five assets (very slow).

You probably don't want to display that many,
since it gets too cluttered and slow; anyway, according to Bernstein,

The upper-left edge of the data (where return is maximized
for a given risk, and risk is minimized for a given return)
is called the
*efficient frontier,*
and is shown delimited by two cyan dots (the minimimum-risk portfolio
and the maximum-return portfolio).
Finding the efficient frontier is called Mean-Variance Optimization.
A guy named Harry Markowitz
came up with this stuff and earned a Nobel prize for it.

William Bernstein's web site is http://www.efficientfrontier.com/ . It includes an on-line version of the aforementioned book through Chapter 2 (unfortunately the interesting stuff begins in chapter 3).

Download source code for this applet (compressed jar file contains class files and source)

?!
Last Modified: Sat Jul 5 23:08:17 PDT 2003 Don Hatch hatch@plunk.org |