own mountain trading company presents - easy · backtesting reports.: moving average crossovers...

24
© 2009 by Own Mountain Trading Company OWN MOUNTAIN TRADING COMPANY PRESENTS Exclusive Paid Edition If you want to share BackTesting Report with a friend, a free sample is available at http://www.backtestingreport.com/BackTestingReportBaseline.pdf

Upload: others

Post on 19-Jan-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

© 2009 by Own Mountain Trading Company

OWN MOUNTAIN TRADING COMPANY PRESENTS

Exclusive Paid Edition

If you want to share BackTesting Report with a friend, a free sample is available at

http://www.backtestingreport.com/BackTestingReportBaseline.pdf

Page 2: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

2 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Contents

Contents ...................................................................................................................................... 2

Letter from the Editor ................................................................................................................. 3

The Strategy Evaluation Process ................................................................................................. 4

Strategy Under Test .................................................................................................................... 5

Basic Strategy Tested .............................................................................................................. 5

Backtesting Results ..................................................................................................................... 8

Active Investors ....................................................................................................................... 8

Position Traders ...................................................................................................................... 8

Swing Traders .......................................................................................................................... 9

Table 1 ................................................................................................................................... 10

Exit Testing ............................................................................................................................ 10

Conclusion ................................................................................................................................. 19

Next Steps with MACD .............................................................................................................. 19

Resources .................................................................................................................................. 19

How to Apply This Strategy ................................................................................................... 19

Understanding Technical Indicators Made Easy with BackTesting Report .............................. 21

Related Reading .................................................................................................................... 23

Bibliography .......................................................................................................................... 23

Videos .................................................................................................................................... 23

Software ................................................................................................................................ 23

Web Sites .............................................................................................................................. 23

Disclaimer .................................................................................................................................. 24

This report builds upon Issue1. Reading it first is highly recommended.

Download Issue1 – Baseline (it’s free) from http://www.backtestingreport.com/BackTestingReportBaseline.pdf

HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.

Page 3: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

3 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Letter from the Editor June 2009 Dear Reader- This issue backtests a pivotal strategy: the 12-bar and 26-bar exponential moving average (EMA) crossover. I call it pivotal because it is not only an important range of moving averages but also the moving averages that form the basis of the MACD. In fact, the crossover of these two moving averages corresponds to the MACD line crossing its zero axis which is often referenced as a trading signal. I call it the Missing Link because the ties between the MA and MACD is often overlooked. After reading this report, you will thoroughly understand this strategy, not only as a buy signal but also as a complete system with symmetric sell signals. To get a taste of how stops can reduce risk, an additional test run with a stop loss is included. We take the test even one step further by applying a 200-day moving average as a filter to select only those cases where the market has already shown some strength. This issue, while a complete treatment of the EMA crossover, is a departure point for understanding several key aspects of technical analysis which are or will be covered in other BackTesting Reports.:

Moving Average Crossovers

MACD

Stop Losses

Detecting favorable markets for buy/long strategies Whether or not you elect to add this simple but surprisingly powerful strategy to your trading arsenal, I trust you will learn and improve your skills by understanding it in detail. Sincerely, Jackie Ann Patterson

Editor, BackTesting Report Director, Own Mountain Trading Company

Page 4: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

4 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

The Strategy Evaluation Process

You’ll find background information about how to use this report in the grey boxes. Generally it doesn’t change much from report to report. The blue words are usually links to the BackTestingBlog online glossary. If you are already familiar with BackTesting Report, just skip ahead to the next section if you wish.

BackTesting Review Backtesting measures the relative performance of a set of trading strategies on historical price data. Since backtesting relies on past data, it makes no guarantees about future performance and can’t say whether a strategy will do as well in the future as it did in the past. However, if a strategy didn’t perform in the past, there’s no reason to believe it will suddenly turn into a winner. It pays to avoid strategies with a losing track record. Although most traders agree that backtesting is useful, many people don’t do it because of the time, expense, and expertise required. Backtesting Report gives you a leg up on the markets without doing all the work yourself.

How to Compare Entry Strategies Picking entry strategies which have win rates above the baseline is a good start. Also use win rate as a hint on the ease of following a system. For example, consider if you can really stick to a trading plan that only wins 10% of the time. Most importantly, remember that win rate alone doesn’t determine if a strategy is profitable – the size of the wins and losses matters, too. How to Compare Exit Strategies Most complete strategies have two types of exit tactics: taking profits and stopping losses. To keep the exploration to a manageable size, first we will compare profit-taking without stops, with the same criteria to sell the stock as to buy the stock. This also gives a fantastic what-if scenario to see what can happen if you run without limiting risk. Next we add a couple different stops losses and compare them both to the stop-less run and to each other. Keep the following criteria in mind while comparing different exit strategies.

Page 5: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

5 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Strategy Under Test

Basic Strategy Tested

The strategy tested in this report relies upon the 12-day and 26-day exponential moving averages (EMAs). It derives its buy signal from the 12-day EMA crossing up through the 26-day EMA as shown in Figure 1. We first test with the usual timed exits of 2 days, 20 days and 200 days to represent swing traders, position traders, and active investors.

Figure 1 - TradeStation screenshot showing entry testing for 12/26 EMAs crossing up with timed exits. Note that EMA crossover is the same as blue MACD line crossing zero.

To backtest the EMA crossover as a complete strategy, we take the sell signal when the 12-day EMA crosses down through the 26-day EMA. See Figure 2.

Figure 2- TradeStation screenshot showing symmetric entry/exit testing for 12/26 EMAs crossovers. Note that EMA crossover is the same as blue MACD line crossing zero.

Page 6: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

6 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

We limit risk by applying stop losses which are calculated to be two times the (20-day) average true range of the stock on the day of the buy signal. This stop loss is held constant throughout the life of the trade. Seeing how the results of the previous tests came out, a 200-day moving average filter was applied to give us a backtesting run which attempts to distinguish better opportunities for this long-only strategy to initiate a trade. In this case, it only buys if the stock is above the 200-day moving average (and the buy signal occurs) and sells if price falls below the 200-day moving average (or the sell signal occurs). Since this was an after-thought, it was only tested with real exits rather than timed exits.

Figure 3 - TradeStation screenshot illustrates how trades are filtered out when price is below the 200-day MA.

Page 7: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

7 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Backtesting Setup Details Markets: US Stocks and international stocks represented by ADRs on NYSE, AMEX, NASDAQ including delisted tickers. (Click here for stock lists.) Time Periods: May 1994 - April 2008, divided into three samples to prevent over-optimization. May 1994 – April 2004 denoted by darker blue Ten-year period chosen to include major up, down and sideways movements. May 2004 – April 2007 denoted by medium blue Out-of-sample data for the original period. At 3 years, it’s 1/3 as long as original. May 2007 – April 2008 denoted by light blue Current data. It’s 1/3 of the previous sample and is more out-of-sample data. (Click here for background on time period selection.) Direction: Long Only Entry Strategy: Enter any stock with buy signals as described above, and when volume criterion is met (more than 500,000 shares daily). All entries are next day via Market on Open orders.

Exit Strategy: Exit all stocks according to the signals described above. Profit-taking is done next day via Market on Open orders. Stop losses, where applied, are simulated as stop orders which may be executed intraday. This combination doesn’t exactly model a nimble trader who may grab profits from an exit signal early in a day in which those waiting for end-of-day miss out due to a sell-off before the close. It does model end-of-day trading and investment though. Sizing: Where no stops are involved, size is fixed at 1000 shares. With stops, the risk amount was fixed at $1000 and the size computed as the number of shares that would risk $1000 between the anticipated entry and the stop. Backtesting Engine: TradeStation version 8.6, Build 2525 Data Vendor: CSI Data This data set was specially selected for accuracy after extensive testing. (Click here for background on data preparation.)

Page 8: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

8 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Backtesting Results

Throughout the reporting of results, this strategy is referred to as MA XO 12/26 as a short-hand for the full explanation of 12 and 26 exponential moving average crossovers or MACD zero crossing.

Active Investors

BackTesting Report tests entries for active investors by using a 200-day timed exit to assess the win rate after a longer term holding period. As shown in Figure 4, the win rate is very nearly the same as the baseline for active investors, especially in the primary test period of 1994-2004.

Figure 4 – Active Investors with 200 day exit

Position Traders

A position trader seeks intermediate-term opportunities. To be successful, a position trader gets in on a burst of action -- perhaps one leg of a longer-running trend -- and gets out before the action fades. This is modeled with 20 day timed exits in order to test entry strategies. The Moving Average crossover strategy edges past the baseline as shown in Figure 5.

57% 62%

24%

56.91%

64.60%

24.43%

0%

10%

20%

30%

40%

50%

60%

70%

1994-2004 2004-2007 2007-2008

W

i

n

R

a

t

e

Active Investors

Baseline

MA XO 12/26

How to Read the Entry Testing Graphs This section emphasizes Win Rate, which is the metric to beat for entry strategies. Three time periods are tested separately to help guard against curve fitting. In the graphs, each set of bars represents the time period indicated on the horizontal axis. They are also shaded differently for each period with 1994-2004 the darkest and 2007 – 2008 the lightest. The blue bars are from BackTesting Report #1 – the baseline for comparison. The other colorful bars are the results from this particular set of tests. See the legend on the graph to map the color to a strategy.

Page 9: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

9 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Figure 5 – Position Traders with 20-day exit

Swing Traders

Swing traders are in it for a quick profit – usually staying in trades for less than a week. We model this with a 2-day timed exit. Our moving average crossover strategy does not get off to a winning start for swing traders. We can see in the graph below that it performs below the baseline for two of three time periods.

Figure 6 - Swing Traders with 2-day exit

54% 55%

44% 54.29%

57.47%

45.03%

0%

10%

20%

30%

40%

50%

60%

70%

1994-2004 2004-2007 2007-2008

W

i

n

R

a

t

e

Position Traders

Baseline

MA XO 12/26

49%

51%

48% 48.12%

50.09%

48.13%

45%

46%

47%

48%

49%

50%

51%

52%

1994-2004 2004-2007 2007-2008

W

i

n

R

a

t

e

Swing Traders

Baseline

MA XO 12/26

Page 10: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

10 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Table 1

Missing Link Entries Productivity Reliability Probability

Name of Strategy Under Test # Trades Avg Hold %Wins Expect StdDev

MAXO, 12/26, 1994-2004, 200day 9780 193 56.91% 0.1471 1.27

MAXO, 12/26, 2004-2007, 200day 3123 196 64.60% 0.1337 1.48

MAXO, 12/26, 2007-2008, 200day 871 199 24.43% -0.1448 0.32

MAXO, 12/26, 1994-2004, 20day 24893 20 54.29% 0.0147 0.20

MAXO, 12/26, 2004-2007, 20day 9518 20 57.47% 0.0113 0.11

MAXO, 12/26, 2007-2008, 20day 3519 20 45.03% -0.0147 0.12

MAXO, 12/26, 1994-2004, 2day 28516 2 48.12% -0.0010 0.09

MAXO, 12/26, 2004-2007, 2day 11413 2 50.09% -0.0015 0.05

MAXO, 12/26, 2007-2008, 2day 4454 2 48.13% -0.0035 0.05

The average hold times for the 200-day tests wind up being a little less than 200-day because some trades are still open at the end of the test period.

Exit Testing For the next backtesting runs, more realistic exits took the place of timed exits. Besides the basic exit of moving averages crossing down, this report also includes a run with a stop loss and another with a 200-day MA filtering opportunities.

The reliability or win rate of the MA XO 12/16 is adequate for active investors and position traders but below the baseline for swing traders.

How to Read the Results Table For Entry Testing The table below summarizes the results for all trader types. In general, potentially profitable strategies have a positive expectancy, shown in green. Losing strategies have their negative expectancies colored red. Yellow indicates that the expectancy was slightly positive, but rounded down to zero – indicating caution. Expectancies are a very rough guideline at this stage because we are using timed exits.

With exit strategies the key criteria are Expectancy and Maximum Adverse Excursion (MAE), described in detail below. The number of trades measured how often the strategy had an opportunity to trade. The average hold time measures how long each trade went on. Between them you can get an idea of how productively each strategy put its funds to use. Keep in mind that the average hold times are just that – an average. Winning trades tended to go on longer while losing trades were often shorter.

Page 11: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

11 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

The number of trades was far less than the baseline because the entry strategy is selectively picking times to enter. The use of the 200-day MA filter strategy further winnows down the number of trades. Keep in mind that the average hold times are just that – an average. Winning trades tended to go on longer while losing trades were often shorter. Interestingly enough, the average hold times did come out near 20 days so the position trader’s baseline is used here for comparison.

How to Use Expectancy When testing a real strategy with exits, expectancy becomes more important than win rate. As the name suggests, expectancy guides you in understanding what to expect by giving you the mathematical average result you could expect from each trade. As with any average, results of any single trade will vary but expectancy shows you how they evened out over time. BackTesting Report scales expectancy by the amount risked to make it possible to compare vastly different strategies across a very broad selection of stocks. A positive expectancy means the strategy was profitable in the past. A negative expectancy flags a strategy that lost money during the time period under test and is something to avoid. For example, an expectancy of 0.09 means an average of 9% of the amount risked was returned per trade. If a stop was employed and the position scaled to limit risk, this will be 9% of the total dollar amount between entry price and stop price. With no stop, we assume the entire position was at risk, and in that case a 9% expectancy implies a 9% return, on average per trade. Again this doesn’t mean every trade returns 9%, a big loss and even bigger gain could amount to an average of 9%. Obviously, bigger is better and you should seek the highest expectancy within your risk tolerance. A key question is: how much is enough? Only you can answer that for sure. As a rough guide, the graphs of results are set up to plot any strategy on a color-coded gradient with a red zone for losses, cautionary yellow zone for strategies which demonstrated a very thin edge, and a green zone for those that performed better. In the graphs below, you’ll notice the color scale is shifted such that strategies with expectancies just above zero are coded red because you need more than break-even to show a real-world profit.

How to Read the Results Table For Exit Testing The table below summarizes the backtesting results for the exit testing. In general, potentially profitable strategies have a positive expectancy, shown in green. Losing strategies have their negative expectancies colored red. Yellow indicates that the expectancy was slightly positive, but rounded down to zero – indicating caution. Note that we compare to 20-day timed exits as the closest to the actual hold times of the strategies with real exits.

Page 12: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

12 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Table 2

Missing Link Exits Productivity Reliability Probability

Name of Strategy Under Test # Trades Avg Hold %Wins Expect StdDev

Baseline 1994 - 2004, 20 days 140473 20 53.92% 0.02 0.23

Symmetric, 1994 - 2004 27154 35 36.14% 0.03 0.36

Sym w/2ATR stop, 1994 - 2004 27816 29 32.10% 0.33 3.28

Sym, 200MA, 2ATR, 1994 - 2004 17514 28 31.39% 0.40 3.62

Baseline 2004-2007, 20 days 41980 20 55.41% 0.01 0.14

Symmetric, 2004-2007 9788 34 36.21% 0.01 0.15

Sym w/2ATR stop, 2004-2007 10653 30 32.97% 0.19 2.20

Sym, 200MA, 2ATR, 2004-2007 6318 29 32.46% 0.23 2.20

Baseline 2007-2008, 20 days 12597 20 43.55% -0.02 0.13

Symmetric, 2007-2008 3272 20 15.25% -0.04 0.10

Sym w/2ATR stop, 2007-2008 3917 17 13.89% -0.53 1.12

Sym, 200MA, 2ATR, 2007-2008 1730 17 16.59% -0.40 1.15

Win Rates

Graphs of win rates are shown in Figures 7 - 9. All exits pushed the win rates under the baseline for two of the strategies. We will reserve judgment until seeing the expectancy.

Figure 7

Base

Symmetric Symmetric with 2ATR Stop

MA 200, 2ATR Stop

15.0%

25.0%

35.0%

45.0%

55.0%

65.0%

Win

Rat

e

MA XO 12/26 Exits 1994 - 2004

BaselineStrategy

Adding real exits of course changes the win rates for each strategy. While win rate is not as important as expectancy, we still want to know if a strategy wins often enough to hold our attention and not decimate our accounts with losses before the winner finally arrives. It’s not surprising to note that the win rate decreases with the addition of stops. Nor is it particularly cause for alarm. Adding a stop will always reduce the win rate because some trades got stopped out that would have turned around and later become winners. We’ll miss those but that’s okay.

Page 13: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

13 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Figure 8

Figure 9

Base

Symmetric Symmetric with 2ATR Stop

MA 200, 2ATR Stop

15.0%

25.0%

35.0%

45.0%

55.0%

65.0%

Win

Rat

e

MA XO 12/26 Exits 2004-2007

BaselineStrategy

Base

Symmetric Symmetric with 2ATR Stop

MA 200, 2ATR Stop

10.0%

15.0%

20.0%

25.0%

30.0%

35.0%

40.0%

45.0%

50.0%

Win

Rat

e

MA XO 12/26 Exits 2007-2008

Baseline

Strategy

Page 14: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

14 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Expectancy

Figure 10 – Expectancy of Strategies with Different Exit Types

Baseline Symmetric

Symmetric with 2ATR Stop

MA 200, 2ATR Stop

-0.70

-0.50

-0.30

-0.10

0.10

0.30

0.50Ex

pe

ctan

cy

Exit Type

MA XO 12/26 Exits

1994-2004

2004-2007

2007-2008

How to Read the Expectancy Graph The colorful graph above plots the expectancy for all of the exit strategies under test plus the baseline. Each strategy occupies one space along the horizontal axis and is in the same order as in the data table. All the data for one strategy is aligned in a vertical column. As shown in the legend, each time period has a particular shape to identify its data point. For example, 1994-2004 is denoted with a diamond. If a shape is not visible, it is hiding behind a larger shape which had roughly the same value. The vertical axis displays the expectancy. Negative expectancies (unprofitable) are color-coded red. Notice that the red extends above the zero line. That is not an accident. A strategy that comes out marginally positive in hypothetical backtesting is unlikely to be profitable in real situations. The colors gently fade to yellow to indicate caution. Then they go on to green to signify strategies that were more profitable in backtesting and have a chance at real-world profitability. As the data points spread apart from the zero line, they reveal that increasing risk goes with increasing returns. It’s relatively easy to find rules and leverage that increases the expectancy in good times but it usually comes at the expense of a greater negative expectancy when conditions deteriorate. Look for strategies that go further into the green zone and less into the red zone than others.

Page 15: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

15 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

The benefits of a 200-day MA filter show on the graph as a general shift upwards in expectancy for both good times and bad. The expectancy for 1994-2004 increased into the solid green (profitable) zone. At the same time, the negative expectancy for 2007-2008 became less negative. This is a clear demonstration of the positive effects of the 200-day MA filter. In contrast, it’s relatively easy to find rules and leverage that increases the expectancy in good times but it usually comes at the expense of a greater negative expectancy when conditions deteriorate. Because the 200-day MA improved results in both good times and bad, we can see that it’s useful. However, it’s not enough to turn around an unprofitable stretch for long-only strategies like 2007-2008.

Risk as Measured by MAE

Each strategy in Table 3 does better than the baseline in terms of average MAE. Only one case, using Symmetric exits in 2007-2008, gave a worse max MAE than the baseline. The biggest bang-for-the-buck comes from consistently applying stop losses. The very best results of those tested came from adding the 200-day MA filter to screen out stocks in a downturn.

Effects on Expectancy of Limiting Risk with Stops and Sizing The baseline strategy as well as the symmetric strategies without stops produced results clustered around the breakeven point. With stops, the difference in expectancies between the time periods is accentuated. Clearly the profits in good times make a nice positive jump. The negative expectancies (losses) in 2007-2008 also become more extreme as stops are added. The extreme jump is largely an effect of the change in sizing and risk calculations. It illustrates how reducing your risk can improve profits when the right strategy is employed for the market conditions. However adding stops is not a panacea for a mismatch between strategy and market conditions as shown by the losses in 2007-2008

How to Assess Risk with Maximum Adverse Excursion (MAE) Equally important to understanding the potential for gain is assessing the risk of loss. Drawdown is frequently quoted in the industry but, because most of us are not managing a portfolio of 7147 stocks, it’s not very useful here. Instead we can gain knowledge of the risks by tracking the Maximum Adverse Excursion (MAE). Don’t let that technical term put you off, it really just means knowing how much the position went against you. MAE is not the same as the biggest losing trade because a stock may wander down for a huge open loss and come back before the exit. To stay in the game, the MAE needs to stay under the size of your account. To be successful, the MAE needs to be limited to a fraction of your account. In the table below, the baseline “no-strategy” strategy shows how far awry trades can go. The 20-day timed exit functions as the baseline because that most closely matches the average number of days that the other strategies held their stocks.

Page 16: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

16 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Table 3

Missing Link Exits Viability Per Share

Name of Strategy Under Test $ MAE Avg $ MAE Max MAE Avg MAE Max

Baseline 1994 - 2004, 20 days $1,953.28 $ 518,000.00 $ 1.95 $518.00

Symmetric, 1994 - 2004 $1,621.91 $ 35,500.00 $ 1.62 $ 35.50

Sym w/2ATR stop, 1994 - 2004 $ 593.38 $ 9,999.99 $ 1.10 $115.50

Sym, 200MA, 2ATR, 1994 - 2004 $ 567.92 $ 2,856.81 $ 1.07 $115.50

Baseline 2004-2007, 20 days $1,643.57 $ 207,600.00 $ 1.64 $207.60

Symmetric, 2004-2007 $1,289.07 $ 31,140.00 $ 1.29 $ 31.14

Sym w/2ATR stop, 2004-2007 $ 586.42 $ 3,333.33 $ 0.86 $ 9.52

Sym, 200MA, 2ATR, 2004-2007 $ 555.46 $ 2,885.34 $ 0.88 $ 9.52

Baseline 2007-2008, 20 days $3,121.15 $ 75,660.00 $ 3.12 $ 75.66

Symmetric, 2007-2008 $2,230.49 $ 18,980.00 $ 2.23 $ 18.98

Sym w/2ATR stop, 2007-2008 $ 658.15 $ 9,999.99 $ 1.55 $ 29.99

Sym, 200MA, 2ATR, 2007-2008 $ 592.60 $ 9,999.99 $ 1.54 $ 29.99

Select R-Multiple Distribution

Figures 11-13 show the R-multiple distributions for the best-of-test strategy of EMA crossovers with stops and 200-day MA filter. The three time periods show similarities which we’ll discuss by proceeding from left to right. Stop losses prevent most (but not quite all) of the really large losses. Nothing is perfect. The stops do generate lots of small losses and we see that the -0.5R bar dominates – this corresponds to losses up to the risk amount which means getting stopped out of the trade.

The combination of stop losses and bull market filter produced the best result in all categories: win rate, expectancy, MAE.

Distribution of Results Tables of results give a good summary but are necessarily leave out detail. For deeper insight, check out the results distribution graphs. They indicate whether to expect big losses often or a multitude of little hits. Likewise, some strategies will have many small gains and others earn their keep in a few large paydays. Click here for more about distribution graphs. Next page too.

Page 17: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

17 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

The +0.5R bar is shorter. In the two profitable time periods, the small losses outnumber the small profits by about 3.5 to 1. However, in the 2007-2008 time period, that soars to over 6.6-to-1 which is its first sign of unprofitability. Also 2007-2008 evidenced few large gains. It is those large gains which truly carry the strategy to profitability in the first two time periods.

Figure 11- Results Distribution

1 1 1 0 0 2 6 8 68

3765

8165

1995

1091 706

494 358 222 139 105 75 61 40 45 29 16 13 20 0

1000

2000

3000

4000

5000

6000

7000

8000

9000

-10.5 -8.5 -6.5 -4.5 -2.5 -0.5 1.5 3.5 5.5 7.5 9.5 11.5 13.5 15.5

Long MA XO 12/26, 2 ATR Stop 1994-2004

Remember that R is the amount risked per trade, in our test $1000. R-Multiple is the number of times that risk is returned, so +5R is $5000 profit while -1R is a $1000 loss. The trades are sorted into “bins” which correspond to a bar on the graph. The label of the bin is the mid-point of its contents so the 0.5 bar represents all trades that returned between 0 and 1 R. Anything more negative than -1 R means those trades gapped past their stops or jumped the risk limits due to opening gaps.

Page 18: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

18 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Figure 12

Figure 13

4 1 1 1 1 3 2 10 24

1212

3008

828

405 277

190 106 75 50 36 20 17 4 15 6 7 0 5

0

500

1000

1500

2000

2500

3000

3500

-10.5 -8.5 -6.5 -4.5 -2.5 -0.5 1.5 3.5 5.5 7.5 9.5 11.5 13.5 15.5

Long MA XO 12/26, 200-day MA, 2 ATR Stop 2004-2007

0 0 0 0 0 0 1 1 6

397

1038

157

72 34 9 9 1 2 0 0 0 2 0 0 0 0 0

0

200

400

600

800

1000

1200

-10.5 -8.5 -6.5 -4.5 -2.5 -0.5 1.5 3.5 5.5 7.5 9.5 11.5 13.5 15.5

Long MA XO 12/26, 2 ATR Stop 2007-2008

Page 19: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

19 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Conclusion

The 12/26 Moving Average Crossover which is also the MACD line zero crossing proved a solid performer in good times as measured by decent expectancy over the favorable test periods. However the strategy needs help to stay out of unsuitable markets such as 2007-2008 where it dove squarely into the red. Using a 200-day MA as a filter helped but doesn’t do it all. Stop Losses clearly reduced risk as demonstrated by the MAEs. This report touched on stop losses with the 2 Average True Range (ATR) stop. Check out BackTesting Report #6 – MACD Sell Signals to see how various other stop losses perform with related signals.

Next Steps with MACD

Divergences between the MACD (histogram) indicator and price are said to be among the strongest signals in technical analysis. That will be the topic of an upcoming report and its worth waiting to see those results before passing judgment on the MACD and related MA crossovers. Overall, keep eyes open for ways to assess market conditions and find those conditions which are favorable for long strategies.

Resources

How to Apply This Strategy

First consider that the backtesting data in this report shows that you may lose money if you trade this strategy in market conditions that are not right for it. However, you may still want to bring it up on a chart, examine it with your favorite stock, or backtest it against a completely different market. A mechanical or automated strategy relying solely on this EMA crossover is not recommended.

Free Charts

You can simply plot the exponential moving averages or MACD on a chart. Most tools can do this using built in functions. For detailed instructions on a free tool, see http://www.backtestingreport.com/MACD_on_FreeStockCharts.pdf and http://www.backtestingreport.com/MissingLinkEMAs_on_FreeStockCharts.pdf FreeStockCharts.com - free interactive charts made with BATS real-time data

Yahoo.com – free, online stock charts made with CSI Data for historical charts

TradeStation

If you prefer using TradeStation, the best of the strategies tested in this report is available from BackTesting Report. The strategy is the MA_XO_12-26 with 200-day MA filter edited to

Page 20: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

20 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

streamline it for single market use. The TS strategies generate buy and sell signals that can be used (at your own risk) with either the TS automated trade execution, the backtesting engine, or simply to see the strategy trades highlighted on the chart. See http://backtestingblog.com/code/ for the latest product and sales information about BackTesting Report software.

Automated Scans for MACD Divergences

To save yourself hundreds of hours searching for MACD Divergences, check out the BackTesting Report custom scans for MACD Divergences. Check out BackTesting Report’s package of TradeStation (TS) strategies and functions which highlight MACD Divergences on a chart. The TS strategies generate MACD Divergence buy and sell signals that can be used (at your own risk), with either the TS automated trade execution, the backtesting engine, the scanner, the RadarScreen®, or simply to see the strategy trades highlighted on the chart. For more information visit: http://backtestingblog.com/code/macd-divergences/

Figure 1414 - TradeStation screenshot of the MACD Divergence strategy and RadarScreen

Page 21: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

21 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

Understanding Technical Indicators Made Easy with BackTesting Report

BTR1: Baseline (Free Bonus Report) Establishes a standard for comparison for the US Stock market from 1994 - 2008. Brief reference filled with background info on backtesting and evaluating strategies.

Buying New Trends Series

BTR2: Trading Above the Moving Averages: Shows you when it made sense to wait for a market ripe for buying by highlighting which MAs

worked and which didn’t. BTR3: Price Crossing the MA: Learn simple ways to trigger an objective buy signal on a rising trend BTR4: Moving Average Crossovers Tests out the buy signals from this classic strategy. Plus a free bonus! Best of Moving Average Buy Signals, comparing the best signals from previous reports plus introducing a new strategy with promising results, especially for swing traders. This bonus is exclusively for BackTesting Report package customers. All four moving average issues are zipped into one download.

Custom Strategies and Scans

EasyLanguage® for TradeStation enables you to scan the markets for opportunities to use the strategies tested by BackTesting Report. Mark charts with the buy and sell signals taken by the most promising strategies. TradeStation strategies also support RadarScreen to scan a symbol list in real time. For example, you can save hours each day in identifying the elusive and powerful MACD divergences on US stocks.

Page 22: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

22 BackTestingReport.com. Copyright ©2009 Own Mountain Trading Company. This material is intended for educational purposes, not investment advice. See Terms of Use.

WHAT WORKED, WHAT DIDN’T WORK AND HOW TO AVOID THE MISTAKES EVEN EXPERTS MAKE

BTR5: Anticipating the Cross with MACD Buy Signals Get-started guide explains the moving parts of the MACD, clearing up the mysteries of the multiple histograms. Pits MACD lines versus histograms to choose an entry signal. Popular parameter settings covered as well.

BTR6: Catching the Wiggles with MACD Sell Signals Backtests basic MACD signals - buys and sells - seeking the ways to capture profits from usual end-of-day action in the stock market.

BTR7: Missing Link Between MAs and MACD See how the 12/26 moving average crossover compares. This moving average combination is singled out because it forms the basis of the MACD.

BTR8: Finding Big Bottoms with MACD Divergences Get a handle on divergences between indicator and price. Explore the combination of MACD bullish divergences as buy signals and MACD bearish divergences as sell signals.

Page 23: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

Copyright 2008. Own Mountain Trading Company. All rights reserved. www.backtestingreport.com

Related Reading The author’s current reading list is posted at http://backtestingblog.com/order/books/

Bibliography

Appel, Gerald. Master Class with Gerald Appel, Financial Trading Seminars, 2003. 2 Appel, Gerald. Technical Analysis: Power Tools for Active Investors, FT Press, 2005. Aronson, David. Evidence-Based Technical Analysis: Applying the Scientific Method and Statistical Inference to Trading Signals, Wiley, 2007. 1Elder, Alexander. Trading for a Living, Wiley, 1993. Chuck LeBeau and David Lucas. Technical Traders Guide To Computer Analysis of the Futures Market, The Book Press, 1992. D.R Barton, Chuck LeBeau. Class notes of The Systems Development Workshop. Offered by Van Tharps Institute, 2007. Tharp, Van. Trade Your Way to Financial Freedom, 2nd edition, McGraw Hill, 2007. Wiessman, Richard L. Mechanical Trading Systems: Pairing Trader Psychology with Technical Analysis, Wiley Trading, 2005.

Videos

http://truthaboutmacd.com – free video on MACD technical indicator and in-depth video course

Software

MACD Divergence Detectors – scanners to automatically find several kinds of MACD divergence, see backtestingblog.com/code/macd-divergences/

TradeStation® – the backtesting engine used in this report, see tradestation.com

Web Sites

BackTestingBlog.com – background information on backtesting, including glossary Divergence-Alerts.com – daily alerts on MACD Divergences in stocks, ETFs and futures. Also tracks an ETF rotation investment strategy.

Page 24: OWN MOUNTAIN TRADING COMPANY PRESENTS - Easy · BackTesting Reports.: Moving Average Crossovers MACD Stop Losses Detecting favorable markets for buy/long strategies Whether or not

www.backtestingreport.com 24

Disclaimer By purchasing this report, you are agreeing to the following disclaimer:

Own Mountain Trading Company, its owners, directors, managers and officers, (“Own Mountain”), are not responsible for the success or failure of your decisions relating to any information presented in this report. The information presented in this report should be carefully considered and evaluated, before reaching a decision, on whether to use them.

This report contains comparisons, assertions, and conclusions regarding performance based on backtesting. Backtesting is the process of testing a trading strategy on prior time periods. When you backtest, the results achieved are highly dependent on the movements of the tested period. One should not assume that what happens in the past will happen in the future, and this assumption can cause potential risks for the strategy. Back-testing is not identical to live trading. As such the backtesting performance may differ from the actual performance. Markets are always changing and evolving. The market today can be very different from the market last year. The past performance does not equal future results.

There can be no assurance that any prior successes, or past results can be used as an indication of your future success or results. Results are based on many factors. Own Mountain has no way of knowing how well you will do, as we do not know you, your background, your work ethic, or your skills or practices. Therefore Own Mountain does not guarantee or imply that you will get rich, that you will do as well, or make any money at all. There is no assurance you will do as well. If you rely upon the information presented in this report; you must accept the risk of not doing as well. Any earnings or income statements, or earnings or income examples, are only estimates of what we think you could earn.

You are advised to do your own due diligence when it comes to making business decisions and all information should be independently verified by your own qualified professionals.

All businesses have unknown risks involved, and are not suitable for everyone. You could experience significant losses, or make no money at all. Use caution and seek the advice of qualified professionals. Check with your accountant, lawyer or professional advisor, before acting on this or any information

Own Mountain makes no express or implied claims that you will make money as a result of purchasing this report and using the information presented in this report.

You agree that Own Mountain is not responsible for any success or failure that you or your business may experience as a result of using the information presented in this report. You freely and of your own will risk any and all capital you may choose to spend in using the information. You will do so with skill and common sense. You will not hold Own Mountain Trading Company accountable in any way for any failure of the information to live up to your expectations.

In no event shall Own Mountain have any liability for any special, punitive, indirect, or consequential damages (including lost profits), even if notified of the possibility of such damages.

TradeStation, EasyLanguage, and RadarScreen are trademarks of TradeStation Group, Inc.