Join our community of smart investors

The maths behind investing

Just a few formulae shape the theory and practice of investment. Understanding them - and the maths behind them - is vital for all investors.
September 13, 2013

The hurly burly of a trading pit dealing in financial derivatives - especially when the heat is on - has to be experienced rather than described. To the outsider, the gesticulating, the shouting and the screaming of 'open outcry' trading belongs to Bedlam. And the subtlety of palm and finger movements as traders indicate whether they are buying or selling looks like a mass break-out of Tourette syndrome - especially when traders start knocking their forehead, putting their fingers to their throat and tugging the lapels of their gaudy jackets.

This grotesque pantomime seems to be nothing about finance and all about emotions. And, in a way, it is because all trading of financial instruments is about the emotional confidence of buyers and sellers. Who are the ones with the confidence to take on risk; who are the ones that are anxious to be shot of it?

No financial instrument does a better job of re-distributing risk than traded options. To the buyer of an options contract, who wants to make profits but is scared of big losses, comes the peace of mind of knowing that risk has been eliminated for just the cost of the premium. To the seller of the contract, who has the emotional confidence to take on the risks that so spook his buyer, comes the money upfront although, also, the hope that nothing much will happen.

However, what was lacking for many years was a formula that could price this emotional confidence. Yet the need for such a formula expanded in line with the rising quantity of over-the-counter trading in options in the late 1960s. And, in 1973, when options trading was formalised on a new branch of a major commodities exchange, the Chicago Board of Trade, that need became an imperative.

Meanwhile, progress towards designing an options-pricing formula was being made. Academics had come up with the law of 'one price'. This says that if two assets, or two portfolios of assets, have the same pay off in the future, then they must have the same price now. If they don't, then market traders will arbitrage - ie, buy and sell to make riskless profits - until they do. This principle was extended to options pricing in what's called 'put-call parity'. This says that, for an option, the value of a call (ie, the right to buy underlying stock) minus the value of a put (the right to sell the same quantity of stock) must be the same as the market value of the underlying stock minus the present value of the option's exercise price (the price at which the option can be taken up). And if the value of these two propositions aren't the same, traders will seize the chance to make riskless profits.

 

 

It is rocket science

This was a vital building block in options-pricing theory. It meant that an option's value could be calculated at any point. But 'any point in time' was crucially different from 'every point in time always'. The biggest challenge was to find the formula that could value options continuously.

Enter onto the scene Fischer Black, a young mathematician, and Myron Scholes, an economist. They concluded that in addition to the obvious factors needed to value an option - the stock price, the exercise price and the cost of money - a proxy for the emotional confidence of traders was needed. Not just that, but the two found that this proxy was really the only factor that mattered. As a substitute, they used the volatility of a stock's price movements (a familiar way of mimicking risk in financial theory), but what they still lacked was the mathematics that could package these factors into a real-time pricing model.

Luck came their way when another mathematician, Robert Merton, was introduced to the conundrum. Like Scholes, Merton was doing research at the Massachusetts Institute of Technology and he just happened to know about Itô’s lemma, at that time an obscure bit of calculus devised by a Japanese mathematician, Kiyoshi Itô. Engineers use a similar piece of mathematics to calculate how heat will spread through a metal casing; rocket scientists use it to project the trajectory of a rocket continuously. Intuitively, it's easy to grasp how such a piece of maths could also be used to map the 'trajectory' of an option's price over the course of its life.

 

 

And so it proved. Fischer Black and Myron Scholes published their pricing formula in a paper, 'The Pricing of Options and Corporate Liabilities', in 1973 and within months Texas Instruments was making a hand-held calculator containing the model. Traders punched in the relevant numbers and the calculator gave them a value for the option. For the period, it was unheard of. Never was an academic formula so influential on real-world prices. As Black himself noted with irony a few years later, traders "use it so much that market prices are usually close to formula values even in situations where there should be a large difference".

Such was the ground-breaking nature of Black-Scholes, so wide is its influence - both for good and bad - that it is one of investment's cornerstones; one of the core pieces of theory that every investor must grasp before he or she can be called a serious investor. It isn't necessary to grasp the inner workings of the differential equation that underlies Black-Scholes. But it is important to understand that the model puts a value on an estimate of the future variability of the price of the underlying stock and how the option's value and the variability of the stock's price are substitutes for each other (see the box, Emotional breakdown, below).

The Black-Scholes model - though now 40 years old - may also be the final cornerstone on which financial theory is built. Arguably nothing that has come since has exceeded in influence what arrived up to and including Black-Scholes. And - very conveniently - Black-Scholes itself draws on three other cornerstones of financial theory; three concepts that are vital for the theory and practice of investment. Understand Black-Scholes plus the three that we are about to explain and an investor won't necessarily make more profit, but he will have a clearer idea of where prices come from and how values are formed.

For the first we need to go back at least 500 years into history and the work of Martin de Azpilcueta, a Spanish theologian who is credited with introducing the concept of the time value of money - that cash paid or received in the future has a different nominal value from money paid or received today. This concept is fundamental to finance. It gives us interest rates - or a 'discount' rate, if a future stream of money needs to be given today's value - and wherever there is a valuation formula there is almost always an interest rate involved, even if it's hidden. The time value of money is sufficiently important to equity investors that it deserves its own box (see Time is money), especially as the Black-Scholes model uses it just in passing as a means to put a value now on a pay off that comes in the future. For its discount rate, Black-Scholes uses the risk-free rate available on government bills or bonds with the same maturity as the option.

 

 

It's a Gauss

For the second cornerstone, Black-Scholes rightly assumes that, while the clock is ticking down on an option, the price of the stock over which it has put or call rights will vary. But vary how and by how much? These questions are unanswerable, so the model does what most financial models do: it draws on the work of a great mathematician from the 19th century, Carl Friedrich Gauss (plus a few others, it has to be said, who were nearly as great).

For 30 years, Gauss mapped the terrain of Bavaria, a task that required maths as much as it needed sticks, flags and many pairs of gum boots. Since mapping every square inch of the terrain was impossible - even for a stickler like Gauss - a lot of estimating was required, based on areas under study. Gauss found that his estimates varied widely, but the more of them that he made, the more they clustered around a central point. Obviously enough, the central point was the average value for all the estimates - the mean - but what was really interesting was that the estimates arranged themselves symmetrically around the mean in what looked very much like the shape of a bell. About two-thirds of the estimates were packed tightly around the mean, with the remaining third tailing off evenly on either side.

 

 

This pattern is now known as a 'normal' distribution and, in a way, rightly so. Wherever there is enough data there is almost always a normal distribution of values around the mean - whether it's the slope of hillocks in Bavaria, the outcome of tossing a coin hundreds of times or movements in stock prices. All these and more conform to what's called the 'central limit theorem'. To take a relevant example, this says that from day to day a share price can make some really odd moves, but in the long run the distribution of an awful lot of random moves will cluster around their average in a neatly symmetrical way - and that happens so often that it's sufficiently stable for predictive theories to be built on it.

So Black-Scholes assumes that, as an option's life wastes away, the price of its underlying stock will follow a random path but will be normally distributed around its mean. This is standard stuff throughout financial theory, including modern portfolio theory (which we'll reach in a minute). The odd thing is, it's standard yet everyone knows - and especially since the financial meltdown of 2008 - that at vital moments it does not apply. So how seriously should we take the assumption of the normal distribution of stock returns?

 

 

Very seriously. The notion is flawed, but you only have to read the small print to know that. Amongst other things, this says that results are normally distributed only when all observations are independent of each other. That might work for the hills of Bavaria; it certainly works for tossing a coin. It does not work for stock-price returns. That's because with stock prices there can be a feedback mechanism - one change in a share price can influence the next one and so on. When that's the case, all sorts of weird things can happen. Statisticians give names such as 'skewness' and 'kurtosis' to these things. In practical terms it means that an extreme annual change in a stock market that, according to normal distribution, would happen just once every 64 years really happens about once every eight years.

Despite this, because assumptions about normal distribution are ubiquitous in financial theory; because, for the most part, reality links up pretty well with what normal distribution predicts; and because there are alternative models that aim to cope with extreme events then this bit of the statistical canon will remain firmly implanted in financial theory so grasping it is a core aim for every investor.

The third cornerstone is almost certainly simple and elegant, perhaps even more influential than Black-Scholes, and nowadays much derided. It is the capital-asset pricing model (shortened and pronounced 'cap-em'). Fischer Black was in no doubt about its significance. It prompted his work on options pricing and, like the eventual Black-Scholes equation, Cap-M is a model of equilibrium (ie, where arbitrage opportunities are offered if market prices get too far out of line with each other).

Black once said: "The notion of equilibrium in a market for risky assets had great beauty for me." It is also the notion of order within chaos, of rationality within the apparently irrational. It gives purpose to the madness of the open-outcry trading pit. Those traders might seem deranged, but collectively their lunacy has a purpose - they are seeking the equilibrium where risk and return are balanced.

At its simplest, Cap-M says that the return for a portfolio of risky assets is the risk-free rate of interest plus a premium for bearing risk. Nothing more. But it is how it got there that’s educative. To discover that, we have to start by diving back into history - maybe once again to Gauss; alternatively to a French mathematician, Adrien-Marie Legendre.

Gauss and Legendre both mathematically formalised what goes on in a scattergram, where lots of dots quantify two variables - for example, the height and weight of children in a class; the output of widgets and the numbers employed in the factory; more relevant, the return on a stock and the return on a stock market. Scattergrams prompt the generic question: if x, then what's y? If 10,000 widgets a day are produced with 34 workers, then what would the output be with 38 employed? If London's All-Share index rose 2 per cent in a typical month (if only) and a portfolio of shares in Vodafone, GlaxoSmithKline and Diageo rose 1.6 per cent, how much would the portfolio change if the All-Share rose 4 per cent?

Intuitively, you get the answer - or, rather, make the prediction - by finding the line of 'best fit' between all the data points, then extend outwards to make an extrapolation. Gauss and Legendre formalised this in a 'least squares' regression line. Technically, that's the line on a scattergram that minimises the distance between itself and each of the points on which it is based. To get there, its formula uses the idea of 'variance', the value that shows how far each point in a set of data differs from the average of the set. The outcome is the hugely familiar formula to investors:

y = a + bx + e

Here, the 'a' and the 'b' are the same alpha and beta that we hear so much about in the investment world.

 

 

Portfolio foundations

From Gauss and Legendre, let’s fast forward to the early 1960s and California, where William Sharpe, an academic at the University of California Los Angeles, was working on a simplified version of a breakthrough way of constructing investment portfolios.

That innovation had been made in 1952 by Harry Markowitz, a PhD student. He grasped that the ability of stock prices to fall as well as rise made them wonderfully useful in a portfolio. Spotting the importance of that characteristic paved the way for one of the great insights in the history of finance - that, in portfolio building, it is not simplify diversification that matters, but how you diversify. Specifically, Markowitz figured out that the returns on a portfolio would be the sum of each component's weighted return. However, the portfolio’s risk would not be the sum of each component's weighted risk. Overall risk would be reduced the more that the prices of each pair of securities in a portfolio moved in opposite directions.

But there was a snag. To put this insight into practice required prodigious amounts of the steam-driven computing power of the 1960s. It meant finding the 'covariance' - the propensity to move in the same direction - of each pair of securities under consideration. Where just six stocks are in the frame, there are only 15 covariance calculations. But the numbers rise exponentially. So when, say, 250 stocks are involved - quite feasible in serious portfolio building - there are 31,125 covariances. Today computers do that in a trice. Fifty years ago they struggled. Hence the need for a simplified version of Markowitz's idea.

Sharpe was helped by the increasingly accepted notion that stock prices move closely in line with their overall market. And, in a sense, why wouldn't they? After all, a market index is simply the weighted average of the prices of its components. So he applied the Gauss and Legendre least-squares regression formula to stock market investment and the single-index model was born; 'single-index' because the model acknowledged that stock prices and portfolio values would be driven - in Sharpe's words - by "any factor thought to be the most important single influence".

However, examination of the single-index model revealed a disturbing truth. To explain, we must put the formula into its familiar investment notation. It says:

R = a + ßM + e

Here, 'a' - or alpha - represents that part of the return from a stock or a portfolio that is independent of the market. Then there is 'ßM', where 'M' stands for the market, or the biggest single influence. Then, crucially, M's returns are modified by 'ß', or beta, which measures the sensitivity of the stock's (or portfolio's) returns to the market. If, for example, the market returned 10 per cent for a period and beta had a value of 0.5 then that part of the stock’s returns that depended on the market would be 5 per cent. If beta's value was 1.5, then ßM would be 15 per cent.

Lastly in the regression formula there is 'e', which, in statistician's jargon, is an error term. This means it corrects for difference between the returns predicted by a + ßM and actual returns. In the single-index model, Sharpe assumed that 'e' stood for the covariance between each pair of securities - a vital factor in Markowitz's model - and that it had a value of zero. Typically the covariance between the returns on each pair of securities is not zero but a positive number, which means that stock prices tend to move in the same direction. However, it did not seem to matter that covariances were effectively excluded from the portfolios built by the single-index model. Or, at least, tests comparing the risk/return characteristics of portfolios constructed from the single-index model with those formed from Markowitz's fully-scaled variance/covariance model showed little difference. All that seemed to matter was the market and the sensitivity of the stock (or portfolio) to the market.

And therein lay the disturbing truth. From that, it was a short step to say that only the market mattered. And, if only the market mattered, then why bother selecting portfolios at all? Instead, each investor could combine cash - either borrowed or lent - with an exposure to the market to find the combination of likely risk and return that would suit his aims. Cautious investors would have most of their assets in low-risk/low-return cash (savings accounts or government bonds) and just a little in the market. Adventurous investors might even borrow cash to add to their own resources and put all of it into the market. And between the most cautious and the most adventurous there is a continuous spectrum that caters for all shades of investment outlook, but none of it involves the messy, unpredictable business of selecting stocks.

This is not as alien as it sounds. Arguably it happens in every investor's portfolio anyway and understanding that largely involves adjusting the perception of what is the 'market'. Note that the word has just gone into inverted commas because now the market is no longer something with which we are readily familiar; say, the FTSE 100 index or the All-Share. In reality, each investor's market is everything to which his wealth is exposed - stocks and shares, certainly; but also house prices, the UK economy, global growth, you name it. Given that, then invariably investors do combine borrowing and lending with their own equity capital to form a portfolio of everything they own.

So, by extending the logic of the single-index model, Sharpe was able to explain that investors get rewarded for just two things. First, for choosing to save rather than spend - a low-risk activity for which they receive only the time value of money. Second, they are rewarded for taking on risk. Together, these are formalised in the equation of the capital-asset pricing model:

ER = RF + ß(ERm – RF)

This says that the expected return from a portfolio equals the risk-free rate plus a premium for risk, which is defined as the market's expected return minus the risk-free rate multiplied by the portfolio's beta.

Prospectively the returns from taking on risk must always be greater than the time value of money. If they weren't, no sensible investor would buy risky assets. Of course, prospects don't always turn out as expected. In other words, risk might be priced too expensively and investors end up being penalised for buying it, rather than rewarded. Sometimes that has to be so otherwise there would be no risk.

The Cap-M issues this warning chiefly because - like the other financial formulae we have discussed - it exposes and questions the assumptions that lie behind market prices. If a financial formula achieves that, it is doing its job; that's all it can really do.

Sure all these cornerstones of finance have weaknesses, some of which lie in their simplicity, even - to use Fisher Black's word - in their "beauty". But that just prompts recollection of Albert Einstein's famous - if slightly garbled - warning about the dangers of elegant mathematical formulae: "If you are out to describe the truth, leave elegance to the tailor." For investors, our warning would be more prosaic: if you are out to find bargains in financial markets, use these financial formulae, but understand that they supply just the first step of the investment process.