That’s a mantra I need to have drummed into me, and perhaps tattooed on the inside of my car so I’m reminded every morning. But I keep on making the same mistakes.
I seem to think that if I’ve “optimized” my portfolio with a few flashy calculations that I’ve done my due diligence, and the next stop is financial independence. It’s the black box syndrome – trusting the output of a computer program without truly understanding the real issues. Most portfolio analyses, for example, hinge on historical data, which of course doesn’t predict the sub-prime blow-up in the US or whether Brazilian coffee growers are on strike. They’re all backward looking.
However, in the absence of a neighbourhood scryer, historical analyses are a good indication of how to position a portfolio for the long term.
Being a geek (however much I strenuously deny it), I tend leverage my tech skills wherever I can. I wrote the attached worksheet to import stock quotes, including historical data, from Yahoo using the Sockets package. Simply type in the appropriate NYSE stock tickers into the appropriate text boxes, check the quantities you want to download, and click the big gray button.

All the stock quotes and historical data can be manipulated on the command-line and can be accessed via command-completion.

It then finds the best distribution of stocks in a portfolio by maximizing its Sharpe Ratio (through the Optimization package).

The Sharpe ratio quantifies how effectively a portfolio of risky assets utilises risk to maximise return. It’s defined as follows.

It essentially measures how effectively a portfolio uses risk to maximize return – the higher the ratio the better. The expected portfolio return is predicted from historic data, the portfolio standard deviation is traditionally used as a proxy for risk, and the risk free return is the return that can be expected from a zero-risk investment (i.e. the interest on US Treasury Bills or the redemption yield on UK gilts).
What I find particularly fascinating is how Maple is now the centre of my technical desktop. Through the combination of the interface and its math tools, I now use it for everything from the simplest calculations through to making wild guesses about my financial future. If any of the developers are reading this, I want you to know there’s a lot riding on you...