Evaluating Trading Systems By John Ehlers and Ric Way



Similar documents
TRADING SYSTEM EVALUATION By John Ehlers and Mike Barna 1

Pristine s Day Trading Journal...with Strategy Tester and Curve Generator

OPTIONS TRADING AS A BUSINESS UPDATE: Using ODDS Online to Find A Straddle s Exit Point

STT315 Chapter 4 Random Variables & Probability Distributions KM. Chapter 4.5, 6, 8 Probability Distributions for Continuous Random Variables

Betting on Excel to enliven the teaching of probability

To begin, I want to introduce to you the primary rule upon which our success is based. It s a rule that you can never forget.

THE WHE TO PLAY. Teacher s Guide Getting Started. Shereen Khan & Fayad Ali Trinidad and Tobago

MONEY MANAGEMENT. Guy Bower delves into a topic every trader should endeavour to master - money management.

Using Excel (Microsoft Office 2007 Version) for Graphical Analysis of Data

The New Mexico Lottery

THE WINNING ROULETTE SYSTEM by

Week 5: Expected value and Betting systems

FTS Real Time Client: Equity Portfolio Rebalancer

Question 2: How do you solve a matrix equation using the matrix inverse?

Betting with the Kelly Criterion

A Trading System development tutorial for the AmiBroker Stock Charting/Analysis program

MA 1125 Lecture 14 - Expected Values. Friday, February 28, Objectives: Introduce expected values.

Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering

Pricing complex options using a simple Monte Carlo Simulation

Microsoft Excel Tutorial

5 Cumulative Frequency Distributions, Area under the Curve & Probability Basics 5.1 Relative Frequencies, Cumulative Frequencies, and Ogives

REWARD System For Even Money Bet in Roulette By Izak Matatya

Elementary Statistics and Inference. Elementary Statistics and Inference. 17 Expected Value and Standard Error. 22S:025 or 7P:025.

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.

MTREPORT 4.0. User s Manual

arxiv: v1 [math.pr] 5 Dec 2011

Your Personal Trading Journal

Plots, Curve-Fitting, and Data Modeling in Microsoft Excel

2+2 Just type and press enter and the answer comes up ans = 4

Years after US Student to Teacher Ratio

Market System Analyzer. User's Guide

How to Win the Stock Market Game

Using computer simulation to maximize profits and control risk.

Probability and Expected Value

Decimals and Percentages

Preface of Excel Guide

Practical Probability:

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0

Chapter 3 RANDOM VARIATE GENERATION

How To Understand And Solve A Linear Programming Problem

The Math. P (x) = 5! = = 120.

Math 425 (Fall 08) Solutions Midterm 2 November 6, 2008

Using simulation to calculate the NPV of a project

The power of money management

MOVIES, GAMBLING, SECRET CODES, JUST MATRIX MAGIC

Learn How to Use The Roulette Layout To Calculate Winning Payoffs For All Straight-up Winning Bets

INFERRING TRADING STRATEGIES FROM PROBABILITY DISTRIBUTION FUNCTIONS

Statistics and Random Variables. Math 425 Introduction to Probability Lecture 14. Finite valued Random Variables. Expectation defined

Lotto Master Formula (v1.3) The Formula Used By Lottery Winners

33 DISCOUNTED PRESENT VALUE

Example: Find the expected value of the random variable X. X P(X)

Multi Account Manager

Bond Price Arithmetic

Ch. 13.3: More about Probability

Your Guide to Profit Guard

Normality Testing in Excel

(1) American Wheel: Thirty-eight (38) compartments containing the numbers one through thirty-six (1-36) and a zero (0) and double zero (00).

Excel Guide for Finite Mathematics and Applied Calculus

Section 7C: The Law of Large Numbers

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

Vamos a Las Vegas Par Sheet

27PercentWeekly. By Ryan Jones. Part II in the Series Start Small and Retire Early Trading Weekly Options

What is the difference between simple and compound interest and does it really matter?

TSM meets the Pro Backer

NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )

Expected Value and the Game of Craps

A New Interpretation of Information Rate

Lectures 5-6: Taylor Series

0 Introduction to Data Analysis Using an Excel Spreadsheet

Gamma Distribution Fitting

$ ( $1) = 40

Random Fibonacci-type Sequences in Online Gambling

FACT A computer CANNOT pick numbers completely at random!

Chapter 6: Break-Even & CVP Analysis

2 HOW DOES TRADING WORK?. 4 HOW THE SYSTEM WORKS. 6 WHAT IF IT GOES WRONG?. 13 A RECAP. 15 BANKROLL. 16 A SUCCESSFUL TRADE EXAMPLE.

Math 132. Population Growth: the World

Example 1: Dear Abby. Stat Camp for the Full-time MBA Program

Model Validation Turtle Trading System. Submitted as Coursework in Risk Management By Saurav Kasera

(SEE IF YOU KNOW THE TRUTH ABOUT GAMBLING)

MULTI ACCOUNT MANAGER User Guide

Trading Diary Manual

You can place bets on the Roulette table until the dealer announces, No more bets.

Forex Cantata User Manual

A Guide to Using Excel in Physics Lab

Estimating a market model: Step-by-step Prepared by Pamela Peterson Drake Florida Atlantic University

EVALUATING THE APPLICATION OF NEURAL NETWORKS AND FUNDAMENTAL ANALYSIS IN THE AUSTRALIAN STOCKMARKET

In this chapter, you will learn improvement curve concepts and their application to cost and price analysis.

Summary of important mathematical operations and formulas (from first tutorial):

Interactive Excel Spreadsheets:

Beginner s Matlab Tutorial

PMAM. Personal Multi Account Manager. User Guide

Expected Value. 24 February Expected Value 24 February /19

Multiple Choice: 2 points each

RULES AND REGULATIONS OF FIXED ODDS BETTING GAMES

Standard 12: The student will explain and evaluate the financial impact and consequences of gambling.

MBA Jump Start Program

The 2e trading system is designed to take a huge bite out of a trending market on the four hour charts.

This is Price Action Trading and Trend/Pattern Recognition.

Chapter 7 - Find trades I

THE ROULETTE BIAS SYSTEM

Transcription:

Evaluating Trading Systems By John Ehlers and Ric Way INTRODUCTION What is the best way to evaluate the performance of a trading system? Conventional wisdom holds that the best way is to examine the system s track record over some reasonable amount of time. While this is better than throwing darts, history has shown that systems having a good recent performance often fail when traded into the future. The reasons are many, including changing market conditions, changes in government regulations, changes in technology (such as electronic trading), or even seemingly innocuous changes such as switching from fractional pricing to decimal pricing. Therefore, a more robust evaluation technology is required. One area of human activity that produces consistent profits through the theory of statistics is gaming. Las Vegas has been built on probability and statistics. At the core, success in gaming is determined only by the odds (percentage winners) and the payout. For example, betting on a single number in roulette offers a payout of 35:1 because there are 35 numbers. However, there are also slots for zero and double zero So the probability of winning is one is 37. The end result is that the odds are in the favor of the house. There are a plethora of additional rules in roulette, but the odds are always in the favor of the house. The key factors to keep in mind are the probability of winning and the payout. In trading, the probability of winning trades is obvious. The equivalent of payout is the Profit Factor (PF), which is the ratio of gross winnings to gross losses. In this paper, we will demonstrate at virtually all the significant performance descriptors can be expressed in terms of percent winners and Profit Factor. We also develop a synthetic equity growth curve that relies only on statistics using a Monte Carlo analysis. Since this equity curve is derived strictly from statistics, it is robust because there is no reliance on the factors that can cause a trading system to falter. DEFINITIONS Since we will be doing math derivations, we need to shorten our derivation symbols as follows: $W = gross winnings #W = number of winning trades $L = gross losses #L = number of winning trades PF = Profit Factor = Percent Winning Trades {(1-) = Percent Losing Trades}.as fractions In our analyses, we normalize the average gross losses to unity ($L/#L = 1). This way, the average gross winnings is exactly the Profit Factor. Since all losses in trading are not equal, our analysis must be view from an overall average perspective.

AVERAGE WIN / AVERAGE LOSS RATIO The first statistic we examine is the ratio of the average win to the average loss as: AveWin AveLoss $ W # W $ L # L $ W # L $ L # W # L (# W # L) PF # W (# W # L) (1 ) PF AVERAGE TRADE The average trade profit is the total gross winnings less the total gross losses, divided by the total number of trades. Therefore, AveTrade T $ W $ L # W # L $ W $ L # W # L # W # L PF $ L 1 # L # # ( # W W L 1) # L and, sin ce $ L 1 # L PF 1 1 1 (1 ) PF (1 ) ( PF 1) 1 We can therefore attain the same Average Trade (or Profit Per Trade) with different combinations of Percent Winning Trades and Profit Factor. For example, a trend following system can have a relatively low percentage winning trades because it is continuously trying to find the trend, but have a relatively large Profit Factor because the trend can produce a big winner when it is hit. But the trend system can produce the same average Profit Per Trade as a swing system that has a higher percentage winning

trades, but a lower Profit Factor because the market does not move as far in the swing. Figure 1. shows the lines of constant profit per trade as a function of percent winning trades and Profit Factor. Figure 1. Combinations of Percent Wins and Profit Factor Can Produce Identical Average Profit Per Trade BREAK EVEN ANALYSYS Breakeven occurs when the average trade, T, is equal to zero. Therefore, the relationship between Profit Factor and Percentage Winners is described as: 1 ( PF 1) PF 1 PF BREAKEVEN 1 1 This tells us there is a minimum Profit Factor that must be maintained in order to make a profit using the system, and the relationship of this Profit Factor value to percentage

wins. Knowing this minimum allowable Profit Factor for a given percentage winners is pretty cool. OPTIMUM PARAMETER CONDITIONS Other than the Breakeven Profit Factor, the computations above are nice, but they seem short of meaning. For example, the Average Win to Average Loss ratio goes to infinity when the percentage wins approaches zero. This makes sense, but this singularity gives no insight into the problem of optimizing a system. On the other hand, the average trade is equal to the Profit Factor when the percentage wins approaches unity (no losses). Again, this makes sense, but gives no insight into optimizing a system. It occurs to us that weighting the Average Trade by the ratio of the Average Win to the Average Loss could be valuable because this weighted product goes to zero at =1 and goes negative when is less that at the breakeven point. So, forming this weighted product, we get: AveWin T TW AveLoss PF (1 ) (( PF 1) 1 PF(( PF 1) )(1 ) PF( PF (1 ) ( 1 ) 2) Figure 2 shows a plot of the weighted Average Trade as a function of the Profit Factor and the Percent Profitable trades. Clearly, this Weighted Average Trade has an optimum value. Further, the point at which the Weighted Average Trade goes to zero corresponds to the percentage winning trades corresponding to the Breakeven Profit Factor.

Figure 2. An Optimum Weighted Average Trade Exists The location of the optimum point can be found by taking the derivative of the Weighted Average Trade and setting that derivative to zero (zero slope at the inflection point). Doing this, we get: 0 PF 1 1 2 so that OPTIMUM 1 1 PF OK, that s cool. For example, a PF=2 should have a corresponding of about.66. CONSECUTIVE LOSING TRADES The question of drawdown is addressed by assuming that the maximum drawdown arises solely from consecutive losing trades. The probability of the first losing trade is (1-). The probability of the second losing trade is also (1-), but when compounded, the probability of getting two losing trades in a row is (1-)^2. Generalizing, the probability of getting N losing trades in a row is (1-)^N. The threshold of pain is sometimes the number of consecutive losing trades rather than drawdown because

consecutive losers tend to make the trader think the trading system is broken. The probability of consecutive trades is shown in Figure 3. Figure 3 can be used as follows: Assume that your system trades 30 times per year, and that you can stand only one sequence of 4 losing trades in a row in that year. Then, the maximum probability of consecutive losing trades you can stand is 0.033. With reference to Figure 3, you should use a trading system that has a probability of winning trades as.56 or better. If your threshold is 3 consecutive losing trades your system should have a probability of wins greater than.68. Figure 3. Probability of Winning Trades must be High to Reduce the Probability of Consecutive Losing Trades. On to drawdown. It is unlikely that the maximum drawdown will result solely from consecutive losing trades. The more likely case is produced by a string of losing trades, then a small winning trade followed by another string of losing trades. We therefore need to think in terms of an equivalent number of consecutive losing trades. If we assume a Normal Probability Distribution of these losing trades and further assuming the maximum number of losing trades occurs at the 3 Sigma point of the probability distribution, the remaining area under the Normal curve is just 0.0027. Thus we can find the equivalent number of consecutive losing trades as:

(1 ) N.0027 N * Log(1 ) Log(.0027) N Log(1 ) Log(.0027) Since the area under the normal curve is directly related to the probability of losing trades, and since exponential is the inverse of a logarithm, the number of consecutive losers increases EXPONENTIALLY as the probability of losing increases. This is not a good thing. In one sense it is the inverse of compound interest. Therefore, you always want to select a trading system that has a high percentage of winners. Figure 4 shows the relationship between the percentage of profitable trades and the equivalent number of consecutive losing trades. The expected drawdown is computed by multiplying the expected number of consecutive losing trades by the average losing trade value in dollars. Figure 4. There is a substantial consecutive losing trades penalty for percentage wins less than 50.

MONTE CARLO SYSTEM PERFORMANCE EVALUATION In the associated Excel spreadsheet, MonteCarlo.XLS, we show you the future performance that you can expect from your trading system, given that you know its historical percent winners and profit factor and assume these are relatively constant into the future. This is a Monte Carlo analysis, where the results depend only on these parameters and otherwise completely random events. We perform this analysis by placing values for percent profitable trades and Profit Factor in cells B1 and B2 respectively. Then, each time you press F9 to refresh the calculation you will see a new equity curve generated from those parameters. No two equity curves will be the same because they are generated from random events. The chart additionally shows the cumulative average profit per trade. By definition this is a straight line, and is shown in red. You can compare the equity curve generated by the Monte Carlo analysis in blue with the average equity growth shown in red. The default settings of 55 percent winners and a Profit Factor of 1.5 describe a reasonably good trading system where these parameters are measure on out-of-sample (not optimized) trades. As you press F9 you can see that the Monte Carlo generated equity curve does not deviate too far from the average equity growth. Now change the parameters describing a more marginally performing trading system. Insert 52 in cell B1 and 1.1 in cell B2. Now, as you repeatedly press F9, you see two phenomena. First, the cumulative average profit per trade is significantly lower than in the previous example. Secondly, that although there is general success over a very large number of trades, there is a substantial variance of the Monte Carlo generated equity curve and the average equity growth. The use of the Monte Carlo analysis can provide you with a realistic expectation of how your trading system will perform in the future for the given percent profitable trades and Profit Factor measured from historical performance. MONTE CARLO SPREADSHEET DESIGN Extracted from Chapter 15 of Cybernetic Analysis for Stocks and Futures, John Wiley (modified to add cumulative average profit) By determining whether a trade is a winner or a loser using the percentage wins and a random number generator, applying the payout probability to each trade, and summing the randomly selected trades you can provide realistic expectations for the equity growth produced by the system. Only in this sense can randomization be introduced to establish performance. Simply winning or losing is not a random occurrence. In case you lost the spreadsheet associated with this paper, the following are the directions to recreate the spreadsheet. We need to first insert the two important statistics. In cell A1 type Winners without quotation marks and in cell B1 type 55.

In cell A2 type Profit Factor without quotation marks and in cell B2 type 1.5. The values of 55 and 1.5 are only initial values, and are representative of a good system. The entries into cells B1 and B2 are system statistics that you can change to visualize their impact on equity growth. In row 4, insert headings for five columns as random, trade profit, cum profit, trade #, and cum avg profit. The quotation marks for the headers are unnecessary. In cell A5 input =RAND() without quotation marks. This creates a random number having a uniform probability density in the range between 0 and 1. This random number is compared to the probability of a win by inserting =IF(A4<$B$1/100,$B$2,-1) without the quotation marks into cell B5. This conditional statement says that if the random number falls within the winning probability then assign the payout probability (the Profit Factor) to the trade, otherwise assign a value of 1 to the trade. This is the outcome of the trade. In cell C5 input =B5 without quotation marks because the first trade profit is the same as the cumulative profit for the first trade. Insert 1 into cell D5 as the first trade number. In cell E5, insert the equation =D5*(($B$2+1)*$B$1/100-1) without the quotation marks. Copy all of row 5 into row 6. Then change cell C6 to be =C4+B5 without the quotation marks. This sums the trade profits in column C. Next insert the equation =D5 + 1 without quotation marks in cell D6. This increments the trader number. Finally, copy all of row 6 and paste it into rows 7 through 504. Now you have the data for your analysis over 500 trades. Make a line plot of columns C and E to graph the Monte Carlo equity growth and cumulative average trade profit together. Just press F9 to recompute the spreadsheet. You will create a new randomized equity growth curve because all the random numbers have changed. Repeat as often as you desire to get a feeling you know what to expect. You can change the data in cells B1 and B2 to assess the sensitivity of success to these basic parameters.