## 2011/10/23

### "Just a little longer": the curse of finite capital

Warning: this post contains some mathematics. However, non-technical readers may ignore the equations and focus on the concepts, which are far more important in any case.

One thing that hit me about LTCM’s failure is this: they failed not because their models were wrong, but because they ran out of capital. I came across a simple mathematical example of a strategy which illustrates a strategy that runs out of capital and will share it with you.

The double or nothing strategy

We consider a discrete time market which is both fair and efficient. There is, however, a way of making a guaranteed profit. What is the catch? You need an infinite amount of capital.

Consider the shares of Fairness Company. The company has an equal (and independent) chance of doing well (in which case the share price goes up) or poorly (in which case it falls) every period. We take out a derivative which pays 2 if the shares go up and 0 if they go down in the next time period. Naturally, the cost of one unit of this derivative is 1, the expected gain. So if we buy one unit of this derivative we will make a profit of 1 with probability ½ and a loss of 1 with probability ½. The expected profit is zero.

Let us call the profit on the derivative at time t (which we buy at time t-1) dt. So
$Pr(d_t = 1) = Pr(d_t = -1) = \frac{1}{2}.$

Suppose we hold Yt units at time t, which we buy at time t-1 and we start off by buying one derivative. So with probability ½ we gain or lose Yt units at each period. Our accumulated loss/gain at time n is then
$S_n = \sum_{t=1}^{n} Y_nd_n.$

If the share goes up after the first period, we stop and get a profit of 1. If it goes down we bet more, so that when the share does go up we recover our loss and make a profit. That is we invest 1 (our original holding), plus what we lost, also 1. So we invest 2.

So we set
$Y_n = 1 – S_{n-1}.$

It is important that Yn depends only on n-1, which is something we already know when we buy our next set of derivatives.

Note that if dn = 1 then
$S_n = 1\times (1-S_{n-1}) + S_{n-1} = 1$
and Yn = 0. So we naturally stop when we make a profit.

If we do not make a profit, but a loss, we get
$S_n= S_{n -1}– Y_n = S_{n-1} – (1 – S_{n-1}) = 2S_{n-1} – 1.$

So for our next bet we need to invest
$Y_{n+1} = 2(1-S_{n-1}) = 2Y_n = 2^n.$

So after each period we double our bet, as long as we are losing. Let us call the time when we stop T.
$T= \inf{\{n | S_n = 1\}}.$

T is finite with probability 1. Which can be seen because
$Pr(T = n) = P(d_1 = -1, d_2 = -1, … d_{n-1} = -1, d_n = 1) = 2^{-n}.$

Adding up for all n gives
$Pr(T < \infty) = 1.$

So eventually the strategy will stop and you will get your guaranteed reward of 1. An example of how this happens is shown in the following graph. Note how large your losses become before you eventually make your (by that time miniscule) profit.

But how much money should you have, exactly?. Well your last bet has value
$Y_T = 2^{T -1}$
and the expected amount you need, just for this last bet, is then
$E[Y_T] = E[E[Y_T| T]] = \sum_{t=1}^{\infty} Y^{t-1}P(T=t) = \sum_{t=1}^{\infty}1 = \infty.$

The moral

This example is, of course, very simple and somewhat contrived. It does illustrate one salient point: A strategy that must “eventually” work can fail if you cannot stay solvent long enough to see it through.

In this case the problem is, of course, that the market is fair. If markets actually are fair you cannot beat them. Another reason your strategy may fail is because of market irrationality. The market may be completely irrational in the short term. LTCM was waiting, quite reasonably, for the prices of Royal Dutch and Shell to converge (they WERE shares in the same company after all). However, they just did not have the ability to wait long enough.

Doubling your bet at each period may seem insane, but there are many investors out there who believe that if a stock they hold goes down, this is a sign to buy even more of it as it is now even more undervalued. Of course, if markets are mean-reverting and the stock truly is undervalued then this may be legitimate.

The problem comes when you borrow in order to buy the stock, then you may be expected to repay your debt before your profits have come. And no one has unlimited borrowing capacity.

Never devise a strategy without considering how much capital you might need. Never assume that you will not need to make a (dis)graceful exit. I leave you with the words of John Maynard Keynes, whose wisdom mocks us even today:

"Markets can remain irrational a lot longer than you and I can remain solvent."

Some references

## 2011/10/10

### Pair Trading: a two-horse bet

Pair trading is a very popular strategy in quant finance. This is a simple form of statistical arbitrage that relies on there being some link, on average, between the prices of certain stocks. Of course, this assumes that markets are not efficient.

The basic idea

Pair trading involves buying one stock and selling (going short) another stock. Essentially this is a bet on one stock vs another stock. For simplicity, suppose we buy one share of X and sell one share of Y at the same price, so we have a net position of zero. At any point in time our profit is X – Y. So we are hoping that the gap between X and Y share prices will increase. Note that it does not actually matter if the market falls or goes up. Both X and Y can go down and we will still make money if Y goes down more. Conversely both X and Y can go up and we can lose money if Y goes up more. We need some means of deciding on two stocks to trade, a means of predicting in what direction they will move relative to each other and also some means of deciding when to exit the trade.

Pair traders often search for pairs of stocks that tend to move together. Say we find that when stock X goes up, stock Y tends to go up as well. That is they are positively correlated. The basic assumption behind pair trading is that if this relationship should break down temporarily, say stock Y tumbles a bit and X is not affected, the market will move in such a way as to restore the relationship. This is one form of mean reversion. If there is some long-term average spread between the prices of stocks X any Y we would expect any deviation from it to be only temporary. That is, we would expect stock Y to go up (relative to X) in order to restore the balance. So we would go long (that is, buy) Y and short (that is, sell) X. When the spread has returned to its average level we can end the trade.

The two companies traded are often in the same sector, say they are both widget makers. Companies in the same sector tend to experience the same risk factors and react to the same news and so their shares are correlated. Of course we do not only need to look for some average spread. If one has reason to believe that, say, Ford will outperform General Motors (because it more innovative, perhaps), one can short General Motors and go long Ford.

Market neutral

Pair trading is one of a class of strategies called market neutral. This means that it (should) make profits (or losses) that are uncorrelated with the market. This means it should be able to make profits (or losses) whether the market goes up or down. In the Ford/GM example, it does not matter how the car industry performs (both shares can do terribly or extremely well) or even the market as a whole. All that matters is whether you were right that Ford would outperform GM.
This can be contrasted with another common, non-quant strategy, of buying an index fund, which mimics the market. This strategy is 100% correlated with the market. Whatever the market return, that is what you get.

Pros

• Risk is reduced by reducing dependence on market movements. Profit can be made in any market conditions, even where the market or the sector you are looking at crashes.
• The strategy is self-funding. In principle, the short trade can be used to finance the long trade.
• There is lots of data available for finding pairs to trade and this can (and is) done algorithmically.

Cons

• Of course, there is a risk that your bet is wrong. Essentially, you have exchanged market or sector risk for a new risk. If the securities move in the opposite direction (relative to each other) to that you assumed you will lose money.
• In a trending market you will always lose money on one half of your trade. If you trade two technology stocks, say, and technology has a good period, both stocks may go up substantially, whereas the spread between them may remain small. You could have made more money by buying both stocks, or just one. However, now you lose money on the stock that you shorted.
• In the above cases and where deviations from long-term spreads are not very large, the strategy will only result in moderate profits (if any).
• If you analyse enough data, you WILL find a pair of correlated stocks. This correlation may be spurious (that is, illusory). Correlations and spreads between stocks change. Using the past to predict the future is always a risky business.
• In a small market, there may not be enough truly correlated stocks for pair trading to be a strategy worth pouring much capital into. Notably, in South Africa only the top 40 stocks are usually considered by large funds.

A notable pair trader was the fund LTCM, back in the 90’s. The petrol company Royal Dutch Shell had shares listed on two exchanges. One set of shares was for Shell, the other for Royal Dutch. However, Royal Dutch traded at a nearly ten percent premium to Shell. This is strange because these represent identical claims on the same company – common sense dictates they should have the same price. LTCM assumed the premium would disappear: they sold Royal Dutch and bought Shell.

All LTCM had to do was wait for the prices to converge. Unfortunately, that is exactly what it could not do. The premium widened to 22% in a short period. LTCM was forced to close its positions because of lack of liquidity in its other operations. It lost more than $100 million dollars on this trade alone. Some references Pair trading • Goodby, D. (2008). A Basic Introduction to Pairs Trading. TradingMarkets.com. Retrieved from http://www.tradingmarkets.com/.site/stocks/how_to/articles/-76543.cfm • Investopedia. (2011). Pairs trade. Investopedia. Retrieved from http://www.investopedia.com/terms/p/pairstrade.asp#axzz1Zkm97SeJ • Junge, C. (2011). A simple pair trading example. www.christoph-junge.de. Retrieved from http://www.christoph-junge.de/pairstrading.php • Preston, T. (2005, November). Pairs Trading. Traders Mag, 40 - 44. Retrieved from http://www.google.nl/url?sa=t&source=web&cd=1&ved=0CBwQFjAA&url=http%3A%2F%2Fmediaserver.thinkorswim.com%2Farticles%2FTPPairsTradingArticle.pdf&ei=ZMqSTsj_Ds3sOf6mzKgO&usg=AFQjCNET8DDNLyk7rI_RTsymC5opuBvbng&sig2=OsjJCEKVGDyDJEgAdj2QUQ • Skiena, S. (2008). Lecture 23: Pairs Trading. Retrieved from http://www.cs.sunysb.edu/~skiena/691/lectures/lecture23.pdf • Stone, C. (2011). The Secret to Finding Profit in Pairs Trading. Investopedia. Retrieved from http://www.investopedia.com/articles/trading/04/090804.asp#axzz1Zkm97SeJ • The Hedge Fund Guide. (2011). Pair trading. www.thehedgefundguide.com. Retrieved from http://www.thehedgefundguide.com/pairstrading.html • Wikipedia. (2011). Pairs trade. Wikipedia. Retrieved from http://en.wikipedia.org/wiki/Pairs_trade LTCM • Wikipedia. (2011). Dual-listed company. Wikipedia. Retrieved from http://en.wikipedia.org/wiki/Dual-listed_company • Wikipedia. (2011). Long-Term Capital Management. Wikipedia. Retrieved from http://en.wikipedia.org/wiki/LTCM ## 2011/08/31 ### The Full Monty (Hall) Warning: this post contains some mathematics. Please do not be afraid of it. The so-called Monty Hall problem is fascinating in its simplicity coupled with a completely unobvious answer. It is a very good example of how people make probabilistic errors in making decisions. Even after confirming the maths, I still could not quite get it. My intuition is fighting with my reason and I cannot help but wonder if people routinely make these errors, whether I do. Statement The Monty Hall problem is based on a game show hosted by Monty Hall. The problem can be stated as follows (my own wording): You are shown three boxes and must pick one. One of them contains a prize, the others are empty. The box containing the prize has been chosen randomly. After you have chosen a box the host will show you the contents of one of the other two boxes (it will be empty). You are then given the option of either changing your choice (and choose the remaining closed box) or sticking to your original choice. What is the probability of winning if you switch versus if you do not? Assume that if both of the unchosen boxes are empty one will be chosen at random to be opened. The answer(s) The “obvious” answer, the one most people choose, is a half. That is, does not matter whether you switch or stay, the prize surely has an equal probability of being in either box. Wrong. The probability of winning if you switch is two thirds and only one third if you do not. This is counter-intuitive. I myself, believing and having seen the maths, still find it hard. By showing the contestant one of the boxes Monty gives the contestant extra (useful) information. However, it would appear that this is information that our brains were not made to process very well. Preparatory Before we solve the problem, let us set up some things we will need. Let P be the box with the prize. P is 1,2 or 3 with probability one third. Let C be the box initially chosen (we will assume this is box 1). Let S be the box that Monty chooses to show to the contetant. As I phrased the problem above, the solution is the probability of winning if you switch, given that box S was shown, which can be put in maths as (assuming box 2 is shown) $Pr(P=3 |S=2).$ One thing to note is that the solution is NOT the probability of the prize being in box 3 given that is is not in box 2 or $Pr(P=3 | P \neq 2)$ This is, in fact, a half, but we have been given more information than just that the prize is not in box 2 (even if we have trouble seeing it). We could also decide to calculate the probability of winning given that the contestant will always switch. That is, we find the probability of winning before we know which box is shown to be empty, knowing the contestant will switch. This is the probability of winning with box 3 (if box 2 is shown) plus the probability of winning with box 2 (if box three is shown) Remember the contestant switches away from box 1. This can be shown in maths as $Pr(P = 3 | S = 2) Pr(S = 2) + Pr(P = 2 | S = 3)Pr(S = 3).$ There is a subtle difference between these two formulations, which adds to the confusion. Lets call the first problem A and the second one B. Given the way I formulated the problem, most crucially the very last line, the two answers are the same. However, A’s answer will change if I modify the last line and B will remain at two thirds. Solution 1 A very simple solution to problem B is given by drawing a table of the variables. We have P for prize and E for empty. Remember we assume the contestant chooses box 1 initially.  Box 1 Box 2 Box 3 S Result on switch P E E 2 or 3 lose E P E 3 win E E P 2 win Each of the three configurations of the boxes is equally likely and thus it must be that, if you switch (always) you win with probability two thirds. Solution 2 A, perhaps, simpler way to solve B is to observe that the contestant loses if and only if they initially choose the car. This happens with probability one third. So the probability of winning must be two thirds. Solution 3 An intuitive explanation for the result is to consider the two unchosen boxes together. These boxes must, together, contain the prize with probability two thirds. So switching will give the combined contents of the two boxes with probability two thirds (as one box will be revealed and the other can then be chosen). Note that this does NOT mean that by revealing that one of the two boxes is empty, the other must therefore now contain the prize with the same (two thirds) probability. This explanation is appealing, but it is incorrect. Merely revealing which of the two remaining boxes is empty is not enough. We also need to know how the empty box was chosen (the last sentence of my problem statement). I will demonstrate this in the next solution. Solution 4 Let us try a somewhat longer and comprehensive algebraic solution that will allow us to fully distinguish between A and B. First let us solve problem A. By Bayes Theorem: $Pr(P = 3 | S= 2) = \frac{Pr(S = 2 | P = 3)Pr(P = 3)}{Pr(S = 2)}.$ We know $Pr(S = 2 | P = 3) = 1$ as Monty must show the empty box if there is a prize in three and $Pr(P = 3) = \frac{1}{3}$ by definition. Now to get the probability that box 2 is shown we can add the probability that it is shown and the prize is in box 1, 2 and 3 respectively. $P(S = 2) = P(S =2 | P =1)Pr(P=1) + Pr(S=2|P=2)Pr(P=2)+P(S = 2| P =3)Pr(P=3).$ The middle term is zero as Monty would not show us the box with the prize and the second factor of each term is one third. This gives $P(S =2) = \frac{1}{3}(Pr(S = 2| P =1) + 1).$ The key term is $Pr(S = 2 | P =1).$ Let us call it q for now. This term explains how Monty chooses which empty box to show us. In the standard formulation q is 0.5 , meaning Monty chooses randomly. If q is 1 then Monty will always show the second box, if it is open (we could say Monty prefers to open the leftmost box)1. The answer we are looking for is then $Pr(P=3|S=2) = \frac{1}{q+1}.$ This ranges from ½ when q = 1 to 1 when q = 0. The value is two thirds in the standard case where q = ½. When q =1 we get what is the intuitive answer. Each of the remaining two boxes is equally likely to have the prize. When q = 0, we know that Monty would not open box 2 if given a choice. So, the fact that box 2 is open means the prize must be in box 3.The fact that the probability of winning is always at least a half, means that it never hurts the contestant to switch. What’s interesting is that the answer to problem B does not change, no matter what q is. This means that for a person playing the game, the probability of winning given which box is shown may vary, but on average, a person who always switches, will win two thirds of the time. We can easily show this by calculating $Pr(P = 3 | S = 2) Pr(S = 2) + Pr(P = 2 | S = 3)Pr(S = 3).$ Let us do a simple numerical example. Suppose q is 1. So we know that if box 2 is opened there is probability 0.5 of winning. However, if box 3 were opened instead we would KNOW that the prize is in box 2. Monty would not have opened box three if box 2 were open. So we win with probability 1. However, before we know which box is opened, the probability of winning is $\frac{1}{2}\times\frac{1}{3}(1+1) + 1 \times\frac{1}{3 \times 1} = \frac{2}{3}.$ In general both terms of the expression for B are easily seen to always be one third 1/3. By similar calculations to that I already did Pr(P = 2 | S = 3) can be found and the expression calculated. This gives the solution. Why do we get it wrong? The answer, probably, has something to do with our brains. Perhaps we are just bad at intuiting probabilities. As few as 13% of people choose to switch. People appear to have a tendency to think probability is evenly distributed across any possible outcomes. The status quo bias may also partially explain it. People tend not to change something unless there is a very compelling reason to do so. People may also tend to value something more highly once it is their property or they have a right to it. This is the endowment effect and is a form of the status quo bias. Here it is that people value the box they already have more than the others. I think, possibly, we have evolved (or been taught) to stick to things. So if we start something, we have to finish it. If we make a decision now, and later change our minds, we’re seen as fickle, undependable. And so, perhaps, from this we have a tendency to believe that our initial choice is correct. So we don’t switch. Markets I find the Monty Hall problem interesting because similar reasoning in the markets (which are so much more complex) means traders might make irrational decisions. The market will not be efficient. The irrationality of the traders can (potentially) be exploited by others (possibly computers) who notice it and who do not make the same errors. However, whether these kinds of errors are easy to detect is not clear and they may not be nearly as simple as this little problem. Some references On the problem • Ellis, K. M. (2005). Monty Hall Problem. Retrieved from http://montyhallproblem.com/ • Wikipedia. (2011). Monty Hall Problem. Wikipedia. Retrieved from http://en.wikipedia.org/wiki/Monty_hall_problem A popular science-type book that has a section on this problem • Crilly, T. (2011). The Big Questions Mathematics. (S. Blackburn, Ed.). London: Bloomsbury. On biases • Wikipedia. (2011). Endowment effect. Wikipedia. Retrieved from http://en.wikipedia.org/wiki/Endowment_effect • Wikipedia. (2011). Status quo bias. Wikipedia. Retrieved from http://en.wikipedia.org/wiki/Status_quo_bias 1 An important thing to realize is that if you do not KNOW that Monty is selecting doors with probability q, from your perspective it is random and you should treat q as ½. ## 2011/08/14 ### Scam warning: Algo-trading machine While researching my previous post I came across the following site: http://www.algotradingmachine.com/ It claims to send you a number of stocks to buy every morning in return for a monthly subscription fee. The stock picks are supposedly based on an algorithmic analysis done by highly sophisticated computers. This offering has all the makings of a scam: • Outrageous promises, such as that there is no risk involved. NO investment professional would EVER promise you a no-risk product in speculative markets. NOT EVER. • In reality they only claim to give you your subscription fee back. You still carry the risk of all your trades. Such misleading statements would not be used by true professionals. • A cleverly hidden disclaimer contradicts the claims of riches and no risk and will result in victims not being able to reclaim their money when they find the promised wealth does not materialize. • The disclaimer also makes it clear that the “profit” statements shown are only simulations. This is not shown anywhere else, and is highly deceptive. • The so-called professionals behind the scheme who are supposedly the best in their field are never mentioned, so we cannot confirm this claim. • Testimonials shown do not have their authors identified. There is no way to know if these are not made up. • The strategy is supposed based on “Fundamental Analysis” like that used by Warren Buffet. In reality algorithmic strategies generally are not based on fundamental analysis, which in any case would not really work for short holding periods of only a day. • Claims that price will soon increase based on high demand are supposed to encourage you act quickly. This is just playing psychological tricks. • Gaudy and glaring website design with overly huge fonts, too much info on a single page, and the use of post scripts point to tomfoolery. DO NOT subscribe to this service. You have been warned. I have not found any official sources confirming my suspicion. If you can either confirm or correct me (and prove it), please do so. ### Algo-trading: Are we heading toward Skynet finance? Algorithmic trading (also called automated trading, black-box trading or robo trading) has taken off in a big way. It is much bigger, I think, than most people realize. By the latest (2009) estimate I could find, algorithmic trading accounts for over 70% of trading volumes in the USA. We have given our wealth into the hands of algorithms, executing strategies not even their creators understand. Is this wise or yet another naive trust that will only result in a repetition of history? What is algorithmic trading? Algo-trading is simply the use of computer algorithms to automatically execute trades. In many cases the algorithms will not only decide on what to trade, when and how, but also initiate the trades themselves. The algorithms take as input a range of financial data, such as share prices, or even news articles, analyse it, spotting patterns, and then trade so as to achieve the highest profit (or some other goal). Why use it? Any tool in the world of finance has to do one of three things (a) make money, (b) reduce losses, or (c) reduce risk. Algorithmic trading can potentially be used for all three. One of the simplest (and seemingly benign) uses of algorithmic trading is to break up a large transaction into a number of smaller ones. A large fund may wish to buy (or sell) a large amount of a certain stock. The problem is, should it wish to put in a trade for the whole amount, it will almost certainly move the price against itself. Other traders, seeing that the fund wants to buy (sell) a large amount of stock will increase (lower) the price at which they are willing to trade. The fact that the fund is trading is a market signal. It indicates that the fund values the stock differently from the market. In order to reduce this signal, to reduce its market impact, (i.e. to hide) the fund will therefore do a number of small trades over a period of time. This can allow the fund to trade with a smaller market impact and thus at a better average price. Another, very common use of algorithmic trading is known as High Frequency Trading (HFT). Here the algorithms attempt to profit by spotting patterns or price discrepancies in stocks over very short periods. Stocks may only be held for a fraction of a second. The profit made per trade is very small, but multiplied by millions of trades it can add up to large amounts. The good Algorithmic trading is claimed (by its proponents) to have increased liquidity in the market liquidity (in this context this means there are more trades and more opportunities to trade), which is mostly seen as positive. This liquidity comes from the fact algo-traders create trading opportunities by offering to buy or sell securities. Many act as market makers, offering to buy at one price and sell at a higher price, profiting from this difference and giving others the opportunity to trade. Algo-trading has also lowered market spreads (the cost of trading), which is the difference between the sell and buy prices mentioned above. The gap used to be quite large, but is now very small. With many traders competing to profit from the spread, the gap between the two prices has decreased. Algorithmic strategies could potentially make markets more efficient (whether they actually have done so is not certain). They allow prices to react more quickly to data. Algorithms can read the news much faster than humans and trade within microseconds. They reduce arbitrage opportunities by actively looking for and taking advantage of them. Algorithms can reduce market volatility; at least the right algorithms (or rather combination of algorithms) can do so. They can do so via a process of negative feedback. This means that an increase in the price of a stock is an indication that it may fall soon and thus signals traders to sell the stock. Such selling will then result in a reduction (or smaller increase) in the price of the stock. A less volatile market is a safer market, encouraging more investment and giving firms access to finance at a lower cost. By their natures, computers have certain advantages over humans, which can prove useful in investment. The first is that computers can analyse a lot of data far more quickly than a human can. Algorithms can trade on patterns within thousands of stocks, following strategies humans could not comprehend. Because they act so quickly it is possible to take advantage of opportunities that only exist for seconds and to beat (slower, human) competitors. Another computer attribute, which I have not seen discussed, is the fact that computers do not have emotions. Investment pundits often warn against emotion in making investment decisions. Algorithms can take the emotion out of investing. Human traders may be tempted to make emotional decisions, but algorithms will (if programmed to) always act rationally. The bad Paul Wilmott, an eminent quant whom I have mentioned before, has expressed his concerns about HFT as it is currently practiced. Wilmott worries that algorithmic trading can create a separation between value and price. The HFT algorithms are not concerned with the intrinsic value of a stock, only how the price may move in the next few milliseconds. Even though algorithmic strategies do often look at news events and try to trade based on the news, there is a danger that fundamental drivers get left behind. With so much trade being driven by algorithms all that really matters is whether you can compete with the other algorithms, not whether demand for coffee or cement is up. Another of Wilmott’s fears is that HFT can lead to positive feedback (the opposite of the negative feedback I mentioned earlier), which exacerbates market volatility. With positive feedback, an upward movement in price tends to cause further upward movements and similarly for down movements. Ominously, there is an incentive for funds to create such feedback. In volatile markets there is the possibility of making very large profits (if you trade in the right direction); however, should you lose all your client’s money it is your client that loses, not you. In more stable markets less skill is needed to make money and there would be less need for hedge funds and their very high fees. The liquidity provided by algorithmic traders can easily vanish. Algo-traders are (currently) under no obligation to stay in the market and can choose to withdraw. This would most likely happen in volatile and uncertain market conditions when the traders do not want to risk being active in the market. This happened during the flash crash, which I analyse later. Algorithmic trading may be good in the good times, but in the bad times, it may make things worse. The large volumes of orders that algo-traders can generate can overwhelm stock exchanges, forcing them to shut down. There are notable examples of instances where indices had very large lags in being computed, trades were delayed, or exchanges had to shut down trading due to an excess of orders. The majority of the extra orders may well be from algorithmic trading. Algo-traders often place orders that are then cancelled almost immediately, which also contributes to volumes. It is hard to predict what the effect will be of all these algorithms interacting in the market. They are just too complex. Computer “panic” could erase wealth in seconds. A small bug could cost you (or someone else) their life savings. The very speed for which algorithmic trading is designed also poses much of its danger. The algorithms can spiral out of control very quickly and do a lot of damage before humans can intervene. The ugly Algorithmic trading has turned investment into a war. The algorithms compete against each other, each attempting to gain some advantage over the others. Paul Kedrosky calls them “battle bots”. A part of the strategy of some algorithms appears to be to send a large number of quotes into the market, merely to overwhelm and confuse competitor algorithms. Will other traders be the collateral damage of this war that is fought on our markets? There is also some animosity toward algorithmic traders for having an unfair advantage. They effectively have access to faster and better information than ordinary traders. In some cases they even pay to get quotes a fraction of a second earlier than the rest of the market. Eventually, algorithms may all but drive human traders out of the market. Lord Myners, a former financial services secretary in the UK, fears that algorithmic trading removes the owner-relationship from shares. You are hardly an owner if you keep a share for only a few milliseconds. The company you buy is hardly accountable to you, then. The algorithms do not care if the underlying business is run well or whether it makes profit. Another portent is the black-box nature that these strategies can assume. The algorithms can be seen as boxes that take share data as input and output trades. However, what goes on inside the box may not be well understood or may be a mystery even to the programmers. With some strategies, the box chooses the optimal strategy based on patterns it observes in the markets. The strategy it chooses may be very complex (far more complex than humans could hope to understand) and may change frequently. The lack of control we have over the eventual outcomes of our algorithms may be unsettling to some. Black Monday On 19 October 1987, known as Black Monday, stock markets crashed. This was the largest one-day percentage decline in the Dow Jones in history at 22.61% (New Zealand’s market fell by as much as 60%). Program Trading, an early form of algorithmic trading is oft blamed for the crash. (Remember, though, that causes are very easy to assign retrospectively and there is still no clear consensus as to the actual cause.) In this case program trading was used for dynamic portfolio insurance (DPI). The aim of DPI is to protect a portfolio against large drops in the market. As the market falls, the strategy will sell shares, reducing your exposure and thus protecting you against a further drop. The danger in this strategy, if collectively followed, is actually quite obvious. If the market falls a little and a lot of people sell shares, or rather their DPI strategies sell the shares for them, it will cause the market to fall even further, causing people to sell more shares... and the result is that DPI causes what it is meant to protect against. This is an example of positive feedback causing a crash. Working in the opposite direction it can cause bubbles. Flash Crash On 6 May 2010, the Dow Jones lost several percentage points almost instantaneously, and then recovered within minutes. This very rapid anomaly is known as the Flash Crash (or The Crash of 2:45). There is still much debate as to the cause and I am certain it is not nearly as simple as most theories would claim, but algorithmic trading may be to blame. One possibility is that HFTs reacted to a large sell order of futures. This order was being implemented by an algorithm and was to sell the futures without regard for price or timing1 – this resulted in the futures being dumped far more quickly than expected. The HFTs then also started selling these futures, driving the price down even further in what is called hot potato trading2 . The HFTs bought the futures then sold them again very quickly, to each other, passing them back and forth, creating a cycle of price declines. This then spilled over into the equity markets. In the latter market, many HFT traders actually withdrew and this caused some shares to sell at very low prices. What is truly interesting about the flash crash to me, is the quick recovery. Perhaps traders (probably human traders) realised the prices were ridiculously low and started buying, wiping out the crash. One analyst, while giving a television interview and seeing the price of P&G had plummeted, urged people to buy the stock immediately. It is also worth noting that some think the HFTs may actually have played a stabilising role, that is they prevented the crash from being even more severe. The arms race HFT requires speed and the ability to trade before others can act on information that affects the market, to make use opportunities that may only exist for very short periods. Computers need to make millisecond decisions and trades. This is because their real competition is not human traders (who react slowly) but other high frequency traders. This has resulted in a kind of latency3 race, in which companies try to make their trades faster and faster. This race has pushed funds to what seem like absurd measures just to gain a few microseconds. Fibre optic cables have been laid across the US just for these strategies; companies have located their trading operations right next to the servers from which internet access is distributed; programmers have reconfigured operating system kernels (notably Linux kernels) for optimal speed. Algorithmic strategies always need to change. Competition between firms and changes in the market dynamics mean that the strategy employed needs to involve. Competitors reverse engineer the strategies of their competitors, and exploit them. Then their competitors need to change. Those familiar with evolutionary algorithms would know that it is even possible for the algorithms to adapt themselves. This brings us much closer to markets ruled by a Skynet4 that we do not fully understand. South Africa From what I understand algorithmic trading (indeed quantitative strategies in general) are not prevalent in South Africa. The market is not nearly as deep as those of more developed countries and this makes it harder to obtain enough data on enough stocks to find patterns to trade on. As South Africa develops and the market becomes more sophisticated this is likely to change. Skynet The equity market is no longer driven by humans. Computers decide the price movements that dictate our wealth. Now, this is not in itself a bad thing. As I have said, computers have many advantages over humans. The transfer of tasks from humans to machines has fuelled economic growth for the past 200 years. A bunch of algorithms vying for dominance in the financial markets is not really all that different from human agents doing the same thing (except that the algorithms are so much faster). Human interaction is at least as complex and as difficult to understand. Human error can be as disastrous. At least with computers, there’s an instantaneous off-switch However, there are signs that this emerging Skynet is making the markets a far more dangerous battlefield. The flash crash was not an isolated incident. Many similar such crashes have occurred in individual stocks and other non-stock markets, but they have not yet been brought to the public eye. I like algorithms. I find the idea of letting a computer do my trading appealing. But it is foolish not to consider the repercussions this could have. Some references General • Duhigg, C. (2006). Artificial intelligence applied heavily to picking stocks. International Herald Tribune. Retrieved from http://www.nytimes.com/2006/11/23/business/worldbusiness/23iht-trading.3647885.html?pagewanted=2 • Duhigg, C. (2009). Stock Traders Find Speed Pays, in Milliseconds. The New York Times. Retrieved from http://www.nytimes.com/2009/07/24/business/24trading.html • Fiedler, C. (2010). design high frequency system (algorithmic trading system). dbcoretech. Retrieved from http://www.dbcoretech.com/?p=129 • Heires, K. (2009). TRADING ON THE NEWS: Turning Buzz Into Numbers. Securities Technology Monitor. Retrieved from http://www.securitiestechnologymonitor.com/issues/19_104/-23976-1.html?zkPrintable=true • Der Hovanesian, M. (2005). Cracking The Street’s New Math. Bloomberg Businessweek. Retrieved from http://www.businessweek.com/magazine/content/05_16/b3929113_mz020.htm • Investopedia. (2011a). Algorithmic trading. Investopedia. Retrieved from http://www.investopedia.com/terms/a/algorithmictrading.asp#axzz1UXV3pHlq • Investopedia. (2011b). High-Frequency Trading. Investopedia. Retrieved from http://www.investopedia.com/terms/h/high-frequency-trading.asp#axzz1UXV3pHlq • Jones, H. (2011). Ultra fast trading needs curbs -global regulators. Reuters. Retrieved from http://uk.reuters.com/article/2011/07/07/regulation-trading-idUKN1E7661BX20110707 • Keehner, J. K. (2011). Milliseconds are focus in algorithmic trades. Reuters. Retrieved from http://www.reuters.com/article/2007/05/11/us-exchanges-summit-algorithm-idUSN1046529820070511 • Lati, R. (2009). The Real Story of Trading Software Espionage. Advanced Trading. Retrieved from http://www.advancedtrading.com/algorithms/218401501 • Lekatis, G. (2011). Algorithmic trading. anti-algorithmic trading. Retrieved from http://www.anti-algorithmic-trading.com/ • MacSweeney, G. (2007). Pleasures and Pains of Cutting-Edge Technology. Wall Street & Technology. Retrieved from http://www.wallstreetandtech.com/articles/198001836 • Rogow, G. (2009). Rise of the (Market) Machines. Wall Street Journal Electronic Edition. Retrieved from http://blogs.wsj.com/marketbeat/2009/06/19/rise-of-the-market-machines/ • Salmon, F. (2011). Algorithmic trading and market-structure tail risks. A Slice of lime in the soda. Retrieved from http://blogs.reuters.com/felix-salmon/2011/01/13/algorithmic-trading-and-market-structure-tail-risks/ • Salmon, F., & Stokes, J. (2010). Algorithms Take Control of Wall Street. Wired. • Sethi, R. (2010). Algorithmic trading and price. Rajiv Sethi. Retrieved from http://rajivsethi.blogspot.com/2010/05/algorithmic-trading-and-price.html • The Economist. (2007). Ahead of the tape. The Economist. Retrieved from http://www.economist.com/node/9370718?story_id=9370718 • The Economist. (2011). Dodgy tickers. The Economist. Retrieved from http://www.economist.com/node/8829623?story_id=E1_RRNJGNP • The Telegraph. (2006). Black box traders are on the march. The Telegraph. Retrieved from http://www.telegraph.co.uk/finance/2946240/Black-box-traders-are-on-the-march.html • Tyrone. (2010). High Frequency Trading & Algorithmic Trading. The High Frequency Trading Review. Retrieved from http://highfrequencytradingreview.com/high-frequency-trading-algorithmic-trading/ • Wikipedia. (2011a). Algorithmic trading. Wikipedia. Retrieved from http://en.wikipedia.org/wiki/Algorithmic_trading • Wikipedia. (2011f). High-frequency trading. Wikipedia2. Retrieved from http://en.wikipedia.org/wiki/High-frequency_trading Flash crash • Bowley, G. (2010). Lone$4.1 Billion Sale Led to “Flash Crash” in May. The New York Times. Retrieved from http://www.nytimes.com/2010/10/02/business/02flash.html?_r=1&scp=1&sq=flash+crash&st=nyt
• Goldfarb, Z. A. (2010). Report examines May’s “flash crash,” expresses concern over high-speed trading. The Washington Post. Retrieved from http://www.washingtonpost.com/wp-dyn/content/article/2010/10/01/AR2010100103969.html?sid=ST2010100107554
• Lauricella, T., Scannel, K., & Strasburg, J. (2011). How a Trading Algorithm Went Awry. The Wall Street Journal. Retrieved from http://online.wsj.com/article/SB10001424052748704029304575526390131916792.html#project=FLASHCRASH_CHART_1007&articleTabs=article
• Mehta, N., & Kisling, W. (2010). Futures Sale Spurred May 6 Panic as Traders Lost Faith in Data. Bloomberg. Retrieved from http://www.bloomberg.com/news/2010-10-01/automatic-trade-of-futures-drove-may-6-stock-crash-report-says.html
• Spicer, J. (2010). Special report: Globally, the flash crash is no flash in the pan. Reuters. Retrieved from http://www.reuters.com/article/2010/10/15/us-flashcrash-europe-idUSTRE69E1Q520101015
• Spicer, J., & Younglai, R. (2010). UPDATE 4-Single U.S. trade helped spark May’s flash crash. Retrieved from http://www.reuters.com/article/2010/10/01/financial-regulation-flashcrash-idUKN0114164220101001
• Younglai, R. (2010). U.S. probes computer algorithms after “flash crash.” Reuters. Retrieved from http://www.reuters.com/article/2010/10/05/us-flash-crash-idUSTRE6945LH20101005

Black Monday

Paul Wilmott

Market impact

Market makers

Lord Myners

Paul Kedrosky

TED talks on the topic (highly recommended)

• Slavin, K. (2011). How algorithms shape our world. TED. Retrieved from http://www.ted.com/talks/kevin_slavin_how_algorithms_shape_our_world.htm

1 It appears to have been set to execute so as to take up about 9% of market volume
2 What do you do with a potato burning your hands? You pass it on to someone else as quickly as you can.
3 This is basically the delay between a message being sent and it being received.
4 Reference to the Terminator movies.

## 2011/07/18

### Three religions of investment

The world of finance is populated by people with very different ideologies. Each makes different assumptions about how markets behave and how they are best treated. None, I think, has succeeded in capturing (even approximately) real market dynamics. I would like to discuss the three paradigms that seem to be the most prominent.

Value investing

This the paradigm with which Warren Buffet is associated. It is the oldest of the three paradigms (according to Mandelbrot) and is generally considered to have been born with Benjamin Graham (Buffet’s hero) and John Dodd. Value investing supposes that there is some fundamental or intrinsic value that a stock or asset possesses. However, the market price of the stock may well fluctuate around this value in the short term.

This fluctuation occurs because the market is irrational. It over- or under-reacts to short-term events and news. It follows bubbles (although bubbles may well be perfectly rational1), it panics, it becomes over-optimistic. However, in the long run the price will always move toward its fundamental value. This may take time (in fact, value investors need it to take time), but the market will realise its error, eventually. The idea is to invest in stocks that are currently undervalued by the market, value stocks. The value of these stocks will increase, not only because their fundamental value increases but because the market corrects its pricing as well, resulting in excess returns.

The trick, of course, is to find the fundamental value of the stock. This is done by a process of fundamental analysis, in which the financial statements of the company will be used extensively. This often involves (but is not limited to) finding various ratios that indicate value in a stock. Often stocks with low price to earnings ratios2 (but with good business potential) are considered value stocks. Many other ratios have evolved and investors have different preferences. Some specific ratios are used for specific industries or types of companies.

Value investing implicitly assumes that markets are not efficient. That is, all relevant information is not taken into account in the price. By studying public information it is possible to beat the market. The problem with finding the intrinsic value of a stock is that it requires assumptions, which may well be wrong. There is no unambiguously correct intrinsic value. Margin of safety is a term introduced by Graham and Dodd, and it indicates buying stocks with low enough valuations that even if your valuation is off a little, you should still make money.

 I: Illustration of Allan Gray's investment philosophy (source: www.allangray.co.za)

Allan Gray, a South African firm that follows a value-investing mindset illustrate the philosophy quite succinctly. In the above picture the black line is the intrinsic value of a share over time, the red is the actual market price, which fluctuates around the intrinsic value. Allan Gray buys below the intrinsic value on the gray line (which gives a margin of safety), but does not try to time the market by waiting until the price bottoms out. Similarly it will sell above intrinsic value, but not necessarily at the peak price.

I spent some time this year working at a value-oriented hedge fund, a very rewarding experience as I got one-on-one insight from a real believer (and achiever) in this paradigm. Endless time can be spent trawling through news, looking at the drivers of the industry, trying to figure out if the market price is the right price. The math is simple, really just an indicator. Value investing is a skill, an art, not a science. It is the judgement of the investor that results in superior performance.

Value investing requires you not to follow the market. By definition, only a handful of value investors can outperform. If everyone were value investors, only those with the most skill, the best judgement, or the most luck, would stand out.

Technical analysis

Technical analysts study the price history of a stock (or, very often, exchange rates) and attempt to predict its future movements. The underlying business (and its financial statements) is irrelevant. All that matters is the price (and volume) movement. Business fundamentals, such as how the economy is performing, the level of competition, etc. are ignored. This is ostensibly the second oldest paradigm, though its origins date back to the eighteenth century.

Technical analysis takes a more short-term view than value investing. Trading can happen over months, weeks or minutes, whereas value investing usually has a time period of years. The difference in focus between the two paradigms could be considered the difference between trading (technical analysis) and investing (value investing). The former is concerned only with the price at which a stock can be sold at a future point and the latter worries also about its (real) value. Trading is much more worried about timing – it is important to buy low and sell high. With value investing you “know” the price will go up – you just need to wait.

Like value investing, this paradigm assumes the market is inefficient. With technical analysis we need to assume that the information given solely by past price movements is not fully taken into account in the share price (otherwise we would not be able to predict its future movement). The fundamental factors mentioned above need not be examined because they are all contained in the share price already. Technicians (as they like to be called) have identified various patterns in stock charts and given them names. The pattern of highs and lows give an indication of what the price will do next. Moving averages3 of prices are plotted – there is meaning when a price chart crosses a moving average line.

An important idea in technical analysis is that of trend – a chart showing and uptrend still fluctuates up and down but is characterized by higher highs and higher lows. Analysts generally trade with the trend, attempting to buy low and sell high (or vice versa). Technical analysis (perhaps unwittingly) does recognize the fractal nature of markets. Within a long-term uptrend you can have a short-term downtrend and trends within that trend. You can trade on different scales.

 II: Berkshire Hathaway daily share price in candles with trendline (source: www.freestockcharts.com)

The chart above once again shows daily the share price of Berkshire Hathaway. This time candles have been used to represent the price movements. Blue candles mean the price closed higher on the day and red candles that it closed lower. The top and bottom points of the candle give the highest and lowest prices over the day and the body of the candle (the thick middle part) gives the opening and closing prices.

The red line that I have drawn is a trendline4. It is meant to show the downward trend of the stock, encapsulated by the lower highs. The level of the trend line is the resistance and the stock price experiences a barrier there (support is the term for a level below which the stock is unlikely to trade). Should the stock trade above the resistance (or below the support) it is a sign that the trend may be reversing. I find the use of linear trend lines intriguing. In the world of stocks, things tend to increase exponentially, though they may be approximated in the short term by linear growth. Using a logarithmic scale would, of course, solve the problem.

While the technical trading rules could certainly be mechanically applied, I believe this is not usually the case. There is judgement involved in identifying patterns and their relative strengths. As with value investing, technical analysis, can easily be more of an art than a science.

The trends, support and resistance, etc. represent the psychology of the market. One interesting aspect of technical analysis is that it may be self-fulfilling. If all investors believe it works, then prices will by definition move as they expect them to. For instance, if it is expected that the stock price will go up in the next week, investors will buy before the week is up, increasing demand, causing the stock price to rise. Another example, if the stock is falling to a support level, investors will buy the stock, expecting that it will increase soon. This will ensure that the stock does not actually trade below the support level.

Whether things are really as simple as I have described is certainly a topic that deserves further research. In fact, the opposite may well be true. Following technical rules may result in all the patterns disappearing. It has also been observed that round numbers tend to be important trading levels – it is likely that this is because these are psychological/mental barriers (our minds tend to focus on round numbers and so we will use them in deciding when to trade). Whereas value investing uses time to eliminate market psychology, technical analysis tries to profit from it.

Quantitative analysis

This probably the newest paradigm (and possibly not yet recognised as such). Quantitative analysis attempts to treat the financial markets as a system that can be described mathematically. Quantitative analysts (or quants) use mathematical or statistical models in order to decide what and when to trade. The use of sophisticated computing techniques has become prevalent in this paradigm. Assumptions are made about how markets work, tested (at least they should be), and the models applied to real market data.

This paradigm is far more scientific than the others and has the greatest potential (I think) of truly allowing us to understand market dynamics (if not to make profit). It is also this paradigm, through its practitioners, the quants, that has been blamed for the most recent financial crisis. In my latest post I criticised the models that have been prevalent until now.

The wide range of possible activities and the advanced nature of much of the concepts involved (neither of which I have studied in any depth) mean that I will keep this section short and say no more.

Evidence

I have not examined articles that study the efficacy of any of the above paradigms. However, it appears there is some evidence that stocks with low PE ratios outperform others, which would support the value investing paradigm, unless the PE ratio is merely a proxy for risk (that is to earn higher returns you still need to take more risk). The evidence for technical analysis appears to be mixed.

I believe it is very hard to obtain conclusive evidence for anything in the markets. There is so much randomness that you can be fooled (for a long time) into believing a pattern exists, where it does not. Even if it does exist, if it becomes widely known and acted upon, it may disappear. For instance, there was an observation that stocks tend to go up in January (I mentioned this in my very first post), which apparently has all but disappeared now as people made use of the trading opportunity it presented.

Final word

From my (very) limited experience in the industry, it seems that people follow these paradigms like they do religions, and with as little proof of efficacy. I myself am biased toward the quantitative. However, I will try to remain objective.

Some references

On value investing

• Allan Gray. (2011). Allan Gray investment philosophy: Theory of share price and intrinsic value. Retrieved from http://www.allangray.co.za/Assets/swf/investment_philosophy.html.

On technical analysis

On quantitative analysis

Mandelbrot’s book

• Mandelbrot, B., & Hudson, R. (2004). The (Mis)behaviour of Markets. London: Profile Books.

1 As long as others are buying the share its price can be expected to go (irrespective of the underlying worth of the share) and so it is rational to buy the share now to sell a little later – value investors may, however, disagree.
2 This is the ratio of the price per share to the earnings (or net profit) per share.
3 This is constructed by replacing every price point with the average of itself and some points surrounding it.
4 I am no technician. If I have drawn the line incorrectly, please let me know.

## 2011/07/03

### Prophet Mandelbrot

I recently read a very entertaining book written by Benoit Mandelbrot and Richard Hudson, called The (Mis)behaviour of Markets. It is a popular science text, attempting to explain Mandelbrot’s fractal views on markets in simplified terms and with no maths. For years Mandelbrot has argued that conventional finance is wrong. This very fact was one of the lessons taken from the latest financial crisis (although it is yet to be seen if it will stick).

Foresight

What is interesting about the book is that it was written in 2004, before the latest financial crisis. Mandelbrot argues that conventional financial theory (based on normal distributions) could not be more wrong. Markets are wilder than these models could imagine. Continuing to use them may result in further financial crises (guess what, it did).

What is more surprising, perhaps, is that Mandelbrot has been saying this for over thirty years (and no one seems to have listened). Even before modern portfolio theory was developed, Mandelbrot argued against the mild view of risk posed by models based on the normal distribution. Like Taleb in 1987, Mandelbrot may have had some right to feeling smug given the events of 2007 onward.

What is wrong with conventional models?

Conventional financial models make a number of false assumptions that have been known for some time to be incorrect. However, in the absence of better models, they have continued to be used.
1. People are rational: people most certainly are not rational and do not always take into account all the information available. People tend to feel losses more heavily than gains which means we take different decisions when faced with choices framed in terms of losses as opposed to gains.
2. All investors are similar, apart from their appetite for risk: Investors are very different. Some are speculators in it only for a day, some are in it for the long run. Some believe in value investing, some are technical analysts. Return and variance are not the only things that matter to all investors (which is what the theory assumes). Some investors are big (able to influence prices), others are small (the theory assumes everyone is small).
3. Prices are continuous: This means they move smoothly. However, in reality it appears more likely that prices can jump erratically, moving from say 5 to 10 without hitting any number in between.
4. Prices changes (more accurately the logarithm of price changes) follows a normal distribution: in actual fact there are both far more boring pricing changes (very small) and wild changes (that is, fatter tails) than this model would predict.
5. Prices are independent over time: This means the price change yesterday does not impact it today. Mandelbrot argues that volatility tends to cluster with large price changes tending to be followed by more large price changes. He also argues that there is a long-term dependence in prices. The movement in prices today may still have an impact 100 years from now.
6. Volatility is constant: this is one critical assumption of the ubiquitous Black-Scholes formula for valuing option prices. This assumption is wildly wrong that quants have started modelling the intricate variation in the so-called implied volatility (if the model were correct there would be no such variation). This is ludicrous, in my opinion. Empirical evidence shows that volatility itself is very volatile.
A number of hacks have been made to work around some of the problems. For instance, the modelling of the volatility ‘skew’ in point 6 above. Complicated models such as GARCH and FIGARCH have been developed that allow for volatile volatility and long-term dependence. Mandelbrot argues that this is just tacking sticky tape onto a broken vase. Something entirely new is needed. His main premise for this seems to be that his models exhibit much greater parsimony (that is they need fewer parameters) – which is a way of saying they are more beautiful or elegant – and that they start with observations of actual market behaviour.

Mathematicians (and practitioners) love normal distributions and so tack on anything they can to make them work as it saves them the trouble of starting from scratch (It’s hard to admit that a hundred-year-old body of academic literature is largely defunct). Certainly I agree this is the wrong way to go about things. However, parsimony is also not the only measure of a model’s worth. Something things are just complicated (financial markets especially). Like Einstein we should not overcomplicate. Things should be as simple as possible, not simpler. Mandelbrot may well have given us a simpler, better foundation.

Fractal markets

Mandelbrot is most famous for his work on fractals (he coined the term ‘fractal’) and he applied it in many areas. Finance is one area to which it is naturally suited. However, it has not yet caught on, probably because the maths is harder and less well developed. I do not quite understand all the workings myself (not having gone through the math, yet), but the basic premise is that markets behave similarly on any scale (or most scales at least).

Consider a graph of the prices of a certain stock. The graph will look very similar, in terms of its swings, erratic movements and proportional price changes whatever period you look at, whether it be a year, a month or a day. That is, you can zoom in on one part of a price graph and get a miniature (statistical) replica of the whole graph (that is, it is equally “wiggly”). This can be seen in the following graphs of our old friend Berkshire Hathaway (from freestockcharts.com). Can you order them by length of period covered?

 I

 II

 IIII

The first chart shows the daily price over about 2 days, the second the hourly price over a little more than 3 months and the last the daily price over a period of almost 2 years. Except for random variation, they are pretty much indistinguishable.

This would break down at very small time periods (over a minute, say, – prices may be constant) and over large time periods (the upward trend of stocks is likely to show more clearly and the progression may be smoother). It would also not, I would add, work for illiquid stocks where the (realised) price changes very infrequently (you can still think of the price moving in the fashion described, but only being observed when the stock is traded).

If you are a regular reader, you may also remember that in a previous post I discussed power-law distributions. Mandelbrot first suggested these might fit cotton prices, and since then many other price series. Power-laws display a scaling behaviour, which is a fractal property.

Anti-everything

The book attacks every paradigm of finance in existence today. It even says value investing, espoused by Warren Buffet (and Benjamin Graham before him), is mistaken. Technical analysis (which I have not heard many talking fondly of) is also debunked.

While I agree conventional finance has got things wrong and have my doubts about both the above paradigms (more so with technical analysis), Mandelbrot’s arguments could not convince me entirely. Mandelbrot’s view of technical analysis appeared to be a straw man (perhaps he needed to do so in order to make the book accessible) and I still have unanswered questions regarding technical analysis. However, it is a good beginning for my quest to understand the operations of the markets.

Final word

Though the book is not perfect, I would still recommend it to anyone in finance, to instil a sense of caution and of questioning. Too many people follow blindly what the ‘experts’ say. We still know very little about the markets (perhaps they are unknowable) and much work still needs to be done. I for one am rather excited that I might get to play a part.

Some references

Mandelbrot’s book:

• Mandelbrot, B., & Hudson, R. (2004). The (Mis)behaviour of Markets. London: Profile Books.

For Taleb's account of the crash in 1987:

• Taleb, N. N. (2007). The Black Swan. Penguin.

## 2011/06/14

### Who is the fairest in the land?

The European Court of Justice ruled in March of this year (2011) that discrimination between genders in all forms of insurance is illegal. This rule came as a shock to me, but it has been a long time in the making, since at least 2003. When it comes to fairness, Europe makes even the Rainbow Nation seem like a laggard.

What is fair?

It could certainly (and I would do so) be argued that differentiating between men and women for insurance purposes is exactly the fair thing to do. As a man I am NOT buying the same product as a woman, because my risk is different. It would be unfair to make someone else pay for my risk (or me to pay for someone else’s risk). However, the EU feels differently.

The advocate-general (AG) of the EU released a legal opinion before the final ruling was made, explaining why she thought this ban should be effected. Here the fact that the equal treatment means different situations should not be treated in the same way was mentioned. Curiously, the law in question allowed states to choose whether to allow differentiation (I am going to use the word ‘differentiation’ rather than ‘discrimination’) between men and women or not, which does result in a violation of the principle.

However, the law also remarks there should be no difference in premiums due to maternity and pregnancy. If this does not ALSO violate the principle and, by implication, any insurance that treats effects related to pregnancy with the same costs for both men and women, then I do not know what does. The justification given is that every pregnancy involves a man – because they caused it they should finance it. This seems silly. Many men do not have children and men can have different numbers of children. Why should they pay for the children of other men? This is a really arbitrary justification, in my opinion.

Direct discrimination (that is charging different rates) is allowable if it can be established that there are relevant differences between men and women that necessitate such discrimination. The EU, from my understanding, has decided that the situations of men and women are ALWAYS comparable, which is inherently nonsensical. Differentiation by race and ethnicity is already banned. I would argue that, if race is a direct determinant of risk (it appears not be a significant one), such differentiation should also be allowed.

The AG is of the opinion that the fact that sex and race (unlike, say, age) is not subject to natural change (you have, with some negligible exceptions, no choice over your race or gender) is a justification for discrimination not to be allowed here. This is because, over the course of one’s life, the premiums charged would vary by age for everyone. Over the course of a lifetime all will have been treated equally. This still does not address the fact that we are treating different situations in the same way.

What is, perhaps, justified, is the idea that a statistical link between sex and risk is not enough to establish grounds for differentiation. That is, just because women happen to have fewer car accidents, this may not be because they are women, but because of other factors. If we could measure and account for these other factors we would not need to use sex as a rating factor. However, we need statistics even to measure these other factors. Some framework for statistical justification is therefore necessary. As far as mortality is concerned, the statistics are clear: women live longer. However, it is not clear why. There have been periods in history that women have had both shorter and longer life spans than men. However, it is not the job of insurers to explain why this should be.

The AG is correct in saying that lifestyles, habits, and predilections not determined by sex (rather by choices) should be examined. However, this ruling has now (if I understand correctly) made it impossible, even if it can be proved that, controlling for all these factors, there is a significant difference between the sexes, to differentiate on such grounds. That said, these factors are difficult, if not impossible, to accurately assess statistically.

On the one hand we have that because men and women are inherently different (born different with no choice) we should not discriminate between them. And on the other, because they are not necessarily different (we just have this statistical link) we should discriminate. This is not particularly logical.

The implications

The implications are not as severe as one would think. The uproar by actuaries appears to be more principle-based (because we are taught basically since birth that rating products according to risk is a biblical principle) than because the insurance industry will suddenly fail. Swiss Re, just after the AG’s opinion was announced, said the balance of demand for insurance may alter drastically. I doubt this will prove to be the case. Yes, insurance premiums are likely to go up (not just for previously “low risk” groups, but on average). But will this make a huge difference to anyone?

When discussing the consequences we need to consider both the short term ones (before the ruling gets implemented) and long-term (afterward).

In the long term insurers will no longer be able to charge a different price for males and females (obviously). This means the price they use will be based on an average risk or expected cost for a mix of males and females. Pricing will become just a little (or a lot) more complex (ironically, decreasing the number of rating factors increases complexity). Insurers will need to assume beforehand what mix they will get. As they might get it wrong, this means they will tend to be conservative. For instance, they will assume that more males will take out life assurance as it will be relatively cheaper for them. Prices would also increase because insurers are likely to need higher capital (due to increased uncertainty). They will charge for the cost of this capital.  Average prices are thus likely to increase; insurance will be more expensive overall, although some groups will get cheaper insurance.

Prices of annuities should increase for males and fall for females. This is because women live longer and thus the insurance company will expect to make more payments on the annuity. Until now this has meant women pay more for their annuities than men; the new price will settle somewhere in the middle. Men will subsidise women. Car insurance rates should increase for women (who are, allegedly, safer drivers) and fall for men. Here women will subsidise men. The rates for life insurance will tend to increase for women and fall for men (again because women live longer). Women subsidise men again. There is thus no clear winner here. Both sexes win and lose (and lose overall).

The standard theory in such cases says that demand for insurance for groups for whom insurance becomes relatively more expensive will fall and will increase for those for whom it becomes cheaper. For instance, car insurance will now become more attractive for men, whereas women may choose to forgo getting cover. The extent to which this happens means that people who would have otherwise have enjoyed cover (at fair rates) will now no longer be covered; it will also push up premiums further as the mix of business will be skewed toward the higher risk groups. Gen Re does not expect the extent of this effect to be very great, at least for life insurance. I suspect for car insurance the effect might be greater.

The increase in costs may be significant for some classes (perhaps 25% for motor insurance for females). However, for insurance such as term assurances, where the premium is very small compared to the sum assured or in comparison to the insured’s income, even quite large increases may not be keenly felt. There are also classes of insurance (such as those that are primarily savings products) where the difference in riskiness between genders makes little difference to the premium in any case.

Insurers are likely to try to find other ways of classifying risk, in lieu of being able to use gender. That is, they will try to evaluate things such as habits and behaviour. Insurers will, however, need to be careful of indirect discrimination, which is using things such as height (women are shorter) or length of certain fingers (for men the index finger tends to be shorter than the ring finger) to indirectly identify women. Already car insurance is planned that will make use of a device that measures the driver’s riskiness by monitoring the car’s movement. This is a novel design that should really have been implemented even without the ruling – a rare case, perhaps, of regulation causing innovation.

I personally feel that a kind of equilibrium will be reached in which each insurer has a similar proportion of men and women for a particular type of insurance (except where there is no tangible difference in risk between the genders). If a company is overweight on whichever gender is less risky, its rates are likely to be low and it will attract riskier clients (even if it only attracts more clients, its business mix should move toward the market average). Another possibility is that insurers will compete on the mix of business they attract. Those that attract the least risky population (through marketing) can charge the lowest premiums. I have my doubts as to whether such a strategy can work in the long term.

Some insurance companies such as Sheila’s wheels in the UK sold only to women. This will no longer be allowed. The company has indicated it intends to continue to market to women (though obviously it cannot exclude men). It remains to be seen if this will succeed. Apparently they have never turned away men in any case (though I dare say they never needed to and would have charged them appropriately).
In the short term one will expect the subsidising gender to buy more insurance and the subsidised gender to wait for the prices of products to move in their favour. That is, for instance, men will buy annuities now, while they can still get it cheaply, and women will wait until they can get annuities subsidised by men. Prices may be volatile as this demand fluctuates.

There is also a lapse effect, in that, for example, male life insurance policyholders may lapse just prior to or after the enactment of the new law as they could get cheaper rates then. This is only temporary, but is likely to cause losses for insurers.

Where does the last domino fall?

Even as I write this, the debate rages on. Now that gender has been thrown in the river, the sluice gates stand ready. Why do we discriminate by age and health? Perhaps these should go too. And this would have an effect orders of magnitude bigger than current ruling as age and health are much more significant determinants of risk. The EU is currently in the processing of debating this issue. Let us hope the its sees sense this time. There is some hope that age, at least will be allowed. However, using the AG’s own reasoning, we should charge people with cancer any more for insurance (they had no choice in the matter). I cannot see insurance still being viable if this happens. I am not sure how to avoid the last, ridiculous domino from falling.

The ridiculous

As I understand the principle correctly, as a man, I can now buy a policy that covers ovarian cancer and it would be illegal to charge me a different premium. It would also be illegal to refuse to let me buy the policy. It is not clear what happens with policies that cover gender-specific diseases. Would it even be legal to cover, say, ovarian cancer, but not prostate cancer (which would automatically attract a certain gender)?

It is not clear how to handle gender-specific underwriting either, e.g. family history of breast cancer. Again, it would be rather silly to charge me extra because my mother had breast cancer. Gen Re seems to think the principle of not treating different situations in the same manner will save them here. However, as it has been so blatantly ignored already, I am not so certain.

It is common to differentiate by occupation for income protection covers. This rating factor could be used for other kinds of insurance as well. This clearly differentiates risk between people. However, as there are some occupations that are closely linked to gender, I am not certain whether this would not constitute indirect discrimination.

If the judgement also prohibits insurers from asking for the gender of applicants, this would create a serious problem. Insurers need to monitor their business mix or they will be unable to charge the correct premiums. Internally, insurers will also analyse the claims experience of men and women separately. It would be very hard to charge reasonable prices without doing this. Fortunately, there is no indication that the law implies such a requirement.

In group insurance it is common to charge a single rate based on the composition of the group, e.g. by age and gender. An extreme would be if an insurer were to insure to groups of equal size, one all male and one all female. Should it charge both groups the same rate? Such a direct comparison will usually be impossible to make, but how are insurers now supposed to charge group business? A company with all female or all male individual business could quite legitimately charge an appropriate premium for those policies.

The ruling has created a quagmire of ambiguities. Ambiguities I believe are unnecessary and do not contribute to the good of the world in any way.

Utility

The question that must be asked, is “was it worth it?” I am a bit of a cynic, but if does not benefit society in some “real” way, then it was probably useless. Everyone can have the warm and fuzzy feeling (everyone except actuaries, that is) that discrimination has been rooted out, that we live in a fair society. But what else? Women have not really benefited as far I can see. They may even lose more than the men. Overall, society has probably not gained anything else, but somewhat more expensive (and ostensibly fair) insurance.
The “right to underwrite”?

Insurers love to quote this principle. This is what allows insurers to charge different prices for the “same” product. It is the defining characteristic of insurance, which makes it different from every other product. Insurance is not a cup of coffee. There is no difference between the coffee I drink and you drink. But the fundamental essence of insurance is that it changes with the risk insured. It should not be treated in the same way as a cup of coffee.

South Africa

Some actuaries in South Africa are of the opinion that similar laws will be enacted here as well. As South Africa is my home country this a particular concern of mine. South African law tends to mimic European Law with a lag. However, I hope the legal technocrats will take a more reasoned approach to the meaning of discrimination and the principles of fair treatment. South Africa has taken its own route in insurance in other areas (it introduced critical illness cover to the world, and uses income and education as rating factors, which may not be politically acceptable in Europe). I do not, however, expect this to happen again.

Final word

This judgement appears to have been born from a combination of poorly designed legislation (allowing arbitrary exceptions) and ideology. Unfortunately, this was an ideology that, instead of embracing and recognising differences between humans, ignores them. I would say the basic principle of equality that substantively similar situations should be treated in the same way and not others is a good one. It is sad that the court would espouse such a principle and then ignore it in the same ruling.

Some references

General articles for consumers

• BBC, 2011a. Insurance and pension costs hit by ECJ gender ruling. BBC News Business. Available at: http://www.bbc.co.uk/news/business-12606610.
• BBC, 2011b. Insurance gender ruling and you. BBC News Business. Available at: http://www.bbc.co.uk/news/business-12608777.
• Burrows, B., 2011. Billy Burrows’ annuity update: March 2011. thisismoney. Available at: http://www.thisismoney.co.uk/pensions/article.html?in_article_id=524073&in_page_id=6.
• Evans, T. & Hyde, D., 2011. How EU gender rule affects insurance and pensions. thisismoney. Available at: http://www.thisismoney.co.uk/insurance/article.html?in_article_id=524068&in_page_id=4.
• Neligan, M., 2011. EU insurance gender ruling bad for consumers -UK min. Reuters. Available at: http://www.reuters.com/article/2011/03/17/insurance-gender-idUSLDE72G0Y820110317.
• Sinner, M. & Neligan, M., 2011. EU court bans insurers from pricing on gender. Reuters. Available at: http://www.reuters.com/article/2011/03/01/us-europe-insurance-idUSTRE7201MU20110301.

Gen Re’s response

• Webersinke, A., 2011. “An important moment for gender equality in the European Union” 1 or the starting point for many more differentiating risk factors to come? Risk Matters, 5(March 2011).

Statements by Swiss Re

• Swiss Re, 2011a. Swiss Re disappointed with EU judgment on gender pricing. Available at: http://www.swissre.com/rethinking/reinsurance_regulations/Swiss_Re_disappointed_with_EU_judgment_on_gender_pricing.html.
• Swiss Re, 2011b. Swiss Re voices concern over EU legal opinion on gender. Available at: http://www.swissre.com/rethinking/reinsurance_regulations/Swiss_Re_voices_concern_over_EU_legal_opinion_on_gender.html.

The judgement by the court and the AG’s opion (if you know how these should really be cited, please let me know):

• European Court of Justice, 2011. C-236/09 Judgement. Available at: http://curia.europa.eu/jurisp/cgi-bin/form.pl?lang=EN&Submit=rechercher&numaff=C-236/09.
• Kokott, J., 2010. C-236/09 Opinion. Available at: http://curia.europa.eu/jurisp/cgi-bin/form.pl?lang=EN&Submit=rechercher&numaff=C-236/09.

Sheila’s wheels’ response

• Sheila’s Wheels, 2011. Statement from Sheilas’ Wheels on the European Court of Justice ruling. SheilaŹ¼s Wheels Media Centre. Available at: http://www.sheilaswheels.com/media/news/EUROPEAN_COURT_OF_JUSTICE_RULING.html.

Finger lengths:

• Wikipedia, 2011. Digit ratio. Wikipedia. Available at: http://en.wikipedia.org/wiki/Digit_ratio.