# Quantifying Trading System Risk

In the previous posts The Quantitative Process Part I and The Quantitative Process Part II we talked about how to develop a quantitative trading strategy.  In particular we saw how we can use the Risk Reward Ratio to assess how good a strategy is.  We defined the Risk Reward Ratio as the ratio of the average annual returns to the maximum historical drawdown experienced during the backtesting period.

Although confidence in our backtesting is essential if we are to have any reasonable expectation that we can make money with a system we have developed, past performance is never a guarantee of future success.  Furthermore, there is no guarantee that any future drawdowns are going to be equal to or smaller than the maximum historical drawdown observed in the backtesting.  The question then becomes, what is the worst drawdown that we can expect going forward?

#### Investing in Futures

This question becomes even more relevant when we trade futures contracts.  As we discussed in the post Investing In The Futures Markets, when applying an investment strategy to the futures markets we need to make sure that we have enough capital in our account to get us through tough times.  Thus the minimum capital requirement needs to be equal to the margin requirement plus the maximum drawdown experienced by the strategy.  For us to be able to stay in the market and stay invested in the strategy we need to be able to withstand the drawdown and stay in the position.  Thus knowing what the maximum drawdown can be is mission critical.

Although a comprehensive backtesting study as described in the post A Strategy For All Markets will give us a good initial starting point as to what the maximum drawdown can be, we need to see how likely it is for us to experience something worse in the future.  To answer this question, we once again harness the power of statistics.  Using statistics we can quantify the probability of a bigger drawdown.  In particular, we can determine a priori the likelihood of the worst case scenarios and allocate enough capital at the outset to be able to manage them.

#### Understanding Drawdowns

A drawdown is the name we use for a sequence of loosing trades in a row.  To better understand the mathematics behind it let’s consider a simple coin flip experiment.  Although we can never say if an individual coin flip is going to land heads or tails, we know that for a fair coin, over time, half of the tosses are going to land heads and the other half are going to land tails.

The probability of heads or tails gets closer to 50/50 as the number of tosses gets larger.  However, as we get going with our experiment, we will observe streaks of several heads in a row or several tails in a row.  There is no driving force or agent behind these streaks, they are simply the result of a purely random process.  These streaks can be quantified using statistics and probability theory whereby if the probability of heads or tails is 50%, then the probability of two heads in a row or two tails in a row is 25%, etc…

#### A Simple Example

Now let’s play a little game.  Let’s start with the boring case where we win \$1 if it lands heads and we lose \$1 if it lands tails.  Let’s also assume that we have only \$1 in our pocket and the minimum bet is \$1.  So we have to gamble our entire capital right at the outset.  If the first toss lands tails we loose all our money and we’re out of the game.  On the other hand if the first toss lands heads we win \$1 and we now have \$2.  If the second toss lands heads again we now have \$3 in our pocket, but if the second toss lands tails we are back to our original \$1.

As illustrated by this simple example the likelihood that we bust out early is intuitively bigger when we start out with a small amount of capital compared to the amount of money we place on each bet.  Furthermore, as the game goes on the probability of busting out is directly related to the amount of money we have in our hand compared to the amount we place on each bet.  This means that at each point in time it is as if we are just starting the game.  It only matters how much money we have in our hand compared to the bet amount.  If we’ve been on a good run then we’ve built a cushion and are in a better place.  However if we’ve been on a loosing streak then the probability of busting out is higher.

#### Calculating Risk Of Ruin

Mathematics allows us to come up with a formula to calculate the probability of going bust.  This formula is as follows:

R = (1-A)/(1+A)

where A = P – (1-P) and P = Probability of a Win.

For an even money game where P = 50% we see that R = 1.  This means that if we play long enough we are guaranteed to loose all our money.

The above formula can be modified to take account of the case where our capital is greater than the amount we place on each bet and for more realistic cases where the probability of winning is different than 50/50 and the wins and losses are not all for the same amount.

For example if we were to win three out of four times and we started out with \$100, bet \$50 on each toss, made \$100 on each win and lost \$50 on each loss, our probability of busting out would be equal to 15.02%.  As discussed above, if we start out on a good streak and keep our betting amount the same, then the probability of busting out goes down as the ratio of our capital to our betting amount increases.  For example with a capital of \$200 and betting \$50 on each toss our risk of ruin is only 2.26%.  At \$250 it is only 0.87%.

#### Understanding Returns

Whenever we make an investment we have the expectation of making money.  The amount of money we can expect to make is determined by the expected value (EV) of the investment strategy we deploy.  This is given by the formula:

EV = WA * P(W) – LA * P(L)

where WA = Amount we win when we win, P(W) = Probability of winning, LA = Amount we loose when we loose, P(L) = Probability of losing and P(W) + P(L) = 1.

Going back to the simple coin toss experiment introduced  above for the case where we had a 50/50 chance of winning or loosing \$1, we have :

EV = 1 * 0.5 – 1* 0.5 = 0

In the instance where we won three out of four times, made \$100 on a win and lost \$50 on a loss, we have:

EV = 0.75 * 100 – 0.25 * 50 = 62.5

This is equivalent to saying that on average we can expect to make \$62.50.  It is worth noting here that the EV is independent of the total capital.  But the risk of ruin is dependent on the total capital.  Thus to be able to take full advantage of such a favorable game as illustrated in the last example, one needs to make sure one has enough capital to be able to see the results of enough tosses until they land in one’s favor.

#### The Upside And The Downside

Let’s have a look at two investment strategies, each of which has an expected value of \$50.  Although these two strategies have the same EV, their approach is different.  The first strategy wins \$200 and looses \$100 and the probability of winning is 50%.  The second strategy wins \$400 and looses \$66.67 but the probability of winning is only 25%.  Mathematically these strategies can be described as follows:

EV (1) = \$200 * 0.5 – \$100 * 0.5 = \$50

EV (2) = \$400 * 0.25 – \$66.67 * 0.75 = \$50

Which one of these strategies would you rather invest in?  To answer this question we have to look at the risk of ruin or downside as well as expected rate of return or upside.

If we start out with a \$1,000 account and invested \$100 on each trade, the probability of ruin or PR for the two strategies is as follows:

PR (1) = 1.59%

PR (2) = 20.82%

Thus, looking and both the upside and the downside, the first strategy is the clear choice.  Although the second strategy has bigger wins, it’s probability of success is much lower.  Thus it is more likely to have a bigger loosing streak that can lead to a complete loss of capital.  Hence, when considering an investment strategy it is imperative to examine its characteristics very closely.

#### Risk Versus Reward

The conclusions of the above paragraphs can be combined together in one sentence that succinctly describes our risk reward statement for the investment under consideration.  For example, consider the case where we win 3 out of 4 times making \$100 on the wins and losing \$50 on the losses.  Say you had an hour to play during which you can get about 100 coin flips.  You are looking at the following scenarios:

If you started with \$100, and bet \$50 on each flip, then you can expect to make \$6,250 if you are willing to take a 15.02% chance of loosing your \$100.

If you started with \$200, and bet \$50 on each flip, then you can expect to make \$6,250 if you are willing to take a 2.26% chance of loosing your \$200.

As mentioned in the post Measuring Stock Market Risk the typical level used in scientific experiments is the 95% confidence level.  This means that you want your probability of making money to be greater than 95%.  Equivalently, you want your probability of going bust and loosing all your money to be less than 5%.  Following this guideline, then starting out with \$200 would give you a probability of success of 97.74% which is well within the common confidence interval.

That said, if you think you would be significantly upset if you lost, then you might want to consider a higher confidence limit.  For example:

If you started with \$250, and bet \$50 on each flip, then you can expect to make \$6,250 if you are willing to take a 0.87% chance of loosing your \$250.

This means that if you were to play the game say a 100 times, approximately 99 times you would end up with \$6,250 in your pocket but the odd time you would leave empty handed.  Sounds like a very enticing proposition to me…

#### Suggestion For Further Reading:

Portfolio Management Formulas by Ralph Vince.  Published by John Wiley & Sons, Inc.

This site uses Akismet to reduce spam. Learn how your comment data is processed.