Market Minute x 4

marketclubminutedude Catching up on guidance from a master trader in four quick minutes.  Click the links to watch the one-minute videos and get grounded with a solid approach to trading.



marketclubminute5 Lesson 5 encourages focus.

marketclubminute6Lesson 6 is my favorite. Click here to follow up with more information on how to get this step done right!

marketclubminute7Lesson 7 is a simple technique to keep the “odds in your favor”.

marketclubminute8Lesson 8 is arguably the most necessary ingredient to good trading.

Previously posted Market Minute lessons and commentary:

Lesson 4: Psyched up for the big trade? Don’t be!

Lesson 3: How About Doing What Works?

Lesson 2: What Time is Good for You?

Lesson 1: One Minute Towards Successful Trading

(BackTesting Blog is an affiliate)

Jack Schwager Market Wizards Lecture

market_wizards_by_jack_schwager I just watched a video lecture by Jack Swager, author of trading classics Market Wizards and The New Market Wizards.   If you haven’t heard of them, in each book Schwager interviews top traders and picks their brains about trading, the markets, and what made them successful.

The reasons these works are revered as classics is not because he gets the Market Wizards to reveal their “magic” strategies.  In fact not one says explicitly how to profit trading and they all have different methods.   What we do get is insight into what makes them tick.  See below for a partial list of traders mentioned in the video.  Its a very accomplished group.

In the lecture, Schwager pulls together the common traits of these elite traders and distills them into critical success factors.  All are important ingredients for success.  The one I want to highlight as critical is Schwager saying that none of the wizards would do something like “la-de-da today looks good to buy bonds”.   They all had some sort of pre-planned strategy, that strategy gave them an edge in the market, and they knew what to do with it.  Schwager also pointed out that by entering the market without a plan, the amateur trader can do worse than chance.

Schwager touches upon the paradox that trading seems easy yet requires a tremendous amount of work to master – I can definitely relate!

 The video (and the books) are somewhat dated.  I doubt the traders Schwager mentions are today getting chart books delivered to their homes on the weekends.   These days, the web and services like Market Club offer charts on about every market that moves so we can all pour over thousands of charts like the masters.   Or, we can program our computers to scan for us.   Schwager’s comments on computerized trading is another area that is outdated.

Even so, many of the traits and behavioral patterns that made these traders great can offer us timeless lessons towards success.    Here’s who I heard Schwager cite as Market Wizards: Jim Rogers, William O’Neil, Ed Seykota, Michael Marcus, Marty Schwatrz, Paul Tudor Jones, Monroe Trout, Linda Raschke, Van Tharp, William Eckhardt, Stanley Druckenmiller (worked with George Soros).

Click here to watch this complimentary video  

(Disclosure: BackTesting Blog is an affiliate and an Amazon Associate.)

Free Email Trading Course by Adam Hewison

 I get Google alerts on every MACD blog posting which is quite a lot. Most are not noteworthy and some are downright off base, but every once and awhile, a really good post on MACD comes along. That happened most recently when I came across a well-done video by Adam Hewison using MACD and MACD divergence. I liked it well enough to see what else he had to offer and now have some goodies to share with you. See the guest blog post below from Adam Hewison. You can sign up for his free email trading course by clicking here.  I’ve taken the first lesson so far and thought it a succinct and timeless lesson. 

First of all I want to thank you for having me as a guest today!

My name is Adam Hewison. You might want to Google Me to confirm what I am about to share with you.

There are plenty of people out there that create “exclusive email courses” with little or no credentials to actually backup their teachings. So, I think it’s right that I share a little bit about myself with you before we even start.

I was a former floor trader on the IMM, IOM, NYFE and LIFFE as well as a risk manager of a large, multinational corporation in Geneva, Switzerland. I also have written books on forex trading and trend following. In 1995, I founded and later co-founded MarketClub. I’ve been in the trading biz for over three decades and have seen it all. I created this course as a way to give back and share trading tips and techniques that I still use in my trading today.

Click here to begin.

In my Free Mini Email Course, I will show and explain the tools and strategies you need to increase your success rate in the marketplace.

(1) The importance of psychology in price movement

(2) How to spot mega trends

(3) Understanding of technical price objectives

(4) How to picture price objectives

(5) How to trade with moving averages

(6) How to use point and figure trading techniques

(7) How to use the RSI indicator

(8) How to correctly use stochastics in your trading

(9) How to use the ADX indicator to capture trends

(10) How to capitalize on natural market cycles.

Plus, you will you will learn all about fibonacci retracements, MACD, Bollinger Bands and much more.

Just fill out the form and we’ll get you started right away.

Click here to begin.

Every success,
Adam Hewison
President, & Co-Creator, MarketClub

MACD Divergences on SPY Since 2001

People at the MoneyShow and elsewhere ask me, “why MACD?”

The short answer is that seeing how MACD Divergences pointed out some very good times to buy stocks and ETFs motivated me to want to use MACD.  So I learned the basics, made some good trades and a little money.   It wasn’t all roses however and taking a few too many losses prompted me to do all this backtesting.

You can see how the MACD divergence signaled good times to buy in this 10 min. video and summary about the SPY.

Since not everyone will want to take 10 min to watch the video, here’s a brief summary:

The MACD positive divergence in Oct 2002 and the one in March 2003 originally got me interested in MACD divergence.  In the TradeStation screenshot below, you can see the green MACD technical indicator at bottom showing a divergence as price hits a new low but the MACD does not confirm with its own new low.   This is a classic MACD divergence.    The dark green line is the backtesting strategy registering a profitable trade between Oct 2002 when it got the MACD bullish divergence buy signal and Sept 2003 when it got the MACD bearish divergence sell signal. Click the charts to enlarge them.


Another interesting MACD divergence on the SPY takes place in Aug 2004. The SPY had been choppy in a trading range when the MACD bullish divergence signaled that this Aug bottom might be different. Sure enough the SPY broke out of the range. See the TradeStation screenshot below of the trade taken by the backtesting engine.


What has the MACD divergence done for us lately?  Check out this chart of a MACD divergence catching a good time to buy in March 2009.  This most recent profitable trade on the SPY (green line in the chart below) comes on the heels of three attempts to find a bottom during the credit crisis that didn’t work out.    So you can see from this chart that nothing is perfect and you can’t expect every trade to be a winner.  In fact, this is a sample size of only one — SPY.   You should not rely on this to be representative of future performance.  


These charts and video show why I am interested in the MACD.    I want an objective signal of good times to buy like Oct 2002 and March 2009.  However, I learned the hard way that its not enough to just see a few good examples and then go trade.   This is the beginning of the research, not the end. 

Are you interested in using MACD to find good times to buy stocks and ETFs? If so, here’s three steps you can take today:

1. Find out the historical track record of various MACD divergence signals.   I recommend reading the TruthAbout MACD series from BackTesting Reports. You can either get the reports directly from this link, or visit the new for a free video and CD-ROM.   If you are serious about trading with the MACD, the performance data in the backtesting reports is a must-read.

2. Learn to recognize a MACD divergence when it happens at the right edge of the chart.  The BackTesting Reports have some example charts, and the “Power Tools” book has a chapter on the MACD, or get the original Master Class to see Gerald Appel explain the MACD himself.  

3. Get software to scan the market for MACD divergence conditions. These signals don’t come around all that often so it helps to be able to find them when/where they occur. The software I use to scan the US stock market for MACD divergence is available by clicking here.

( MACD stands for Moving Average Convergence Divergence.  SPY is the Exchange Traded Fund (ETF) of the S&P 500 which is often used as a proxy for the whole US Market.)

Updated 10/16/09 to fix typos.

Trader’s Coach Dr. Brett Steenbarger at LA Trader’s Expo

steenbarger - the daily trading coach Engaging the audience at an early-morning session of the Trader’s Expo is not an easy thing but Dr. Brett Steenbarger showed up with the energy, good advice, and R-rated language to wake us up to the mportance of psychology in trading.  Dr. Steenbarger is an expert in “brief therapy” which is getting things done in a few minutes rather than years on the couch.   He’s applied his skills to helping professional traders improve their craft.  Institutional/hedge fund traders only – attending an Expo session or reading his book is the only way us private traders can take advantage of his work.   However, after his talk, the good doctor did stay for another hour answering questions and helping people with their particular issues.  A trader himself, Dr. Steenbarger’s blog packs as much if not more info about trading the markets than about psychology.

Key take-aways from the LA Trader’s Expo session:

Trading is a performance art (like music or athletics) and we can improve by building on our strengths as well as interrupting and reprogramming our patterns of problem behavior (impulsiveness, not adapting to conditions, acting on anxiety, etc).

Five Best Practices

1. Break trading into components and work one at a time, e.g. getting good entry prices.

2. Evaluate performance with metrics

3. Identify strengths and weaknesses, especially find strengths.

4. Set realistic goals for development.  2 per day: one strength to enhance, one weakness to curb

5. Institute mechanisms for review

Especially emphasized the role of our personal strengths and positive emotions.    A brief quiz showed us that we need a ratio of 2:1 positive to negative emotional states to achieve high performance.    (positive: joy, contentment, energy, affection.   negative: anxiety, depression, guilt, anger)

In short to improve:

  • Find things that went well and do more of that.  
  • Train self to follow sensible rules.  
  • Stay in the zone.

My BackTesting Engine Evaluation in 2007

Before starting the current round of major backtesting, I evaluated several tools to decide which to use.    This article shares the highlights of that endeavor and the main reasons for the outcome.

TradeStation was my incumbent.  By 2007 when I made my last evaluation, I’d had a couple years of experience with it as a charting tool and a backtesting engine.    I’d also used TradeStation Radarscreen to scan the market for opportunities, but found it awkward and slow.   The backtesting had proved reliable but limited to running one stock at a time.     Then TradeStation came out with two critical enhancements:  a means to read in outside data for historical prices, and hooks to automatically process more than one stock per run.

Another favorite tool is Telechartwhich has been my top-down market analysis tool since 2005.    It doesn’t have a backtesting engine.   However, in early 2007 the Worden Bros who make Telechart had just come out with the Blocks Backscanner.    I tried it out extensively and really liked the super support as well as the flexibility.   Its strength is scanning through a huge list of stocks in incredibly fast run time.    But as a very young tool, it didn’t yet have all the features I wanted like independent data sources.  Plus, it was so new  in 2007 that I often felt like a beta tester which is exciting but not what I was looking for to prove out trading strategies.    

I didn’t get past reading the specs on other backtesting tools.    Trading Blox seemed to locked into their own strategies, plus a very high price tag.  I’d previously been exposed MetaStock, struggled with it back in 2004, and was not keen on revisiting it.   I had heard good things about Wealth-Lab but didn’t want to get locked into Fidelity, and didn’t see all the features I wanted there either.

So basically my choice came down to the new Blocks or my old standby TradeStation.   I came to the conclusion that the optimal way to proceed was to rely on each tool’s strengths.    So I use TradeStation for backtesting because I can set up the large-scale, controlled software environment for it.   This gives me a way to prove out a strategy which I do only once per strategy.

Once a strategy is proven and I’m ready to trade it, I usually want to scan the market for opportunities to apply it.   I do this daily, after the market closes, using Blocks 2.0 because it is so very fast at scanning the market.

I recently attended a class on Worden Stockfinder 4.0.  It looks promising —  the Blocks program grown up and renamed.  I’ll review my impressions in another post.

(Backtestingblog is a Worden affiliate, meaning I may be compensated if you buy their product.  Blocks, Stockfinder, Telechart are trademarks of Worden Brothers Inc.   TradeStation is a trademark of TradeStation. TradingBlox is a trademark of Trading Blox. Wealth-Lab is a trademark of Fidelity. MetaStock is a trademark of Equis.)

BackTesting Moving Averages

Why Moving Averages

As a trader or investor, the only reason to investigate moving averages is to gain knowledge to increase profits. Like many other technical indicators, moving averages are meant to help us objectively tell the market status at any given time. This helps us see through the emotions of the day and make rational decisions, which we’re told will lead to greater profits and/or fewer losses over the long run. Moving averages (MAs) smooth the series of prices for a stock. MAs are most often used to identify the trend of market direction, and are classed as a trend-following indicator. This doesn’t mean that MAs are only for long-term investors – short term traders use them also. Moving averages can be used to screen stocks for good candidates, signal buying opportunities, and offer sell signals.

Why Backtest – A Story

The goal of backtesting is to find out if moving averages really do lead to better results and what are the most promising ways to apply MAs. Let me tell you a short story. While I was putting together the results for one of the moving average BackTesting Report issues, I happened to visit a friend. At her house, I came across some reading material from a well-advertised discount stock broker. In it was an article that advising its customers to use a particular moving average length applied in a certain way to get the best results. I had my comprehensive tests right in front of me and I can tell you that broker’s method did not get the best results although they did mention a MA length that is useful in other ways. I had in my hand test results that showed that the way that broker applied the moving average had a win rate worse than the baseline when tested on 7147 stocks over 14 years of stock market data. Clearly the broker wasn’t running that kind of testing. It’s up to the customers – us! – to fend for ourselves and find out what works versus what doesn’t.

How to Calculate MAs

When backtesting moving averages, the first decision is how to calculate the moving average. Do you want a simple moving average (SMA)? Or something designed to track price better such as an exponential moving average (EMA)? You might consider an experiment to compare the win rates of the two different averages. I did just that a couple years ago, and while I don’t have the results to publish, I came away with the notion that it didn’t make a big difference whether I chose SMA or EMA — just pick one and use it consistently. So for this project, I choose to use simple moving averages because I see them mentioned in commentary most often. To actually do the calculation, I relied on the built-in function which came with TradeStation. (The choice of backtesting engine is another decision which is general enough to write about in another post.)

How to Use MAs

Next you need to pin down how exactly you want to apply moving averages. How will you interpret the relationship between price and moving average? What rules will you use to decide when to buy and sell? You don’t have to read long about stocks before coming across a bullish reference to a stock trading above its 200-day moving average or its 50-day moving average, or even the 10- or 20-day MA. Or advice about buying stocks as they cross their 50-day or 200-day moving average. These are important rules to test in the backtesting engine. And then there’s the moving average crossover – a classic method of technical analysis. That makes three distinct ways of using moving averages to test.

Going more in-depth, some trading texts talk about the slope of a moving average. If you hark back to algebra and consider the MA as a line, to find its slope you would pick two points on the line and apply the usual formula ((x2-x1)/(y2-y1)). This brings up the question of how far apart to pick the two points which can make a difference to results. Really, since the MA is being used to identify the trend, we just want to know if it is sloping up or down. Then we can simplify the whole calculation by noticing that if the price is above the moving average, it must be pulling the average up, and a price below the MA pulls it down. Thus another reason to test the efficacy of price above the moving average.

Parameter settings

Once you decide on how to use the MAs, you need to pick a selection of various lengths to test. Beware of over-optimizing. Somewhere out there is a guy with backtesting results showing 3895% gain or whatever using just the right moving average. Too bad he doesn’t know what MA will produce those results in the future. That said, you need to try more than one length to make sure that your results aren’t a fluke. Stick with defaults settings or the ones you hear about most in the media. Finding the one perfect parameter setting is not going to make you rich. Finding a cluster of good, robust settings just might do you a great deal of good though.

As a practical matter when backtesting allow enough data lag before measuring. All tests must begin measuring at the same place for apples-to-apples comparison among different MA lengths. For example, if you’re testing a 200-day moving average, it will take the first 200-days of data to calculate the first point of that moving average. That means that the first day you could possibly have a signal is 200-days into the data set. To make a fair comparison with, say, the 10-day moving average, you need to make sure not to count any signals from the 10-day moving average before the 200-day is ready to go. Fortunately TradeStation has a way to set the “Maximum number of bars study will reference” in “Properties for All” strategies which forces the backtesting engine to wait that long before tabulating data.

More Profit from Buying or Selling?

Moving average rules, and in particular moving average crossover rules, are often discussed as a reversal system. This means that one signal, say the MAs crossing upwards is a buy signal and then its opposite, say MA lines crossing down, is not only a sell signal but also the trigger to go short. Theoretically, that’s just fine but many people are not interested in shorting the market. They are looking for techniques to help them buy and maybe sell. Even a person who regularly sells and sells short might use different techniques for buying and selling. For these reasons, it’s wise to test the buy signals separately from the sell signals.

This poses a dilemma because it’s hard to evaluate a buy signal in isolation. One way to do this is to use timed exits – that is, exit the trade or sell the stock after a certain amount of time elapses. I chose to run each backtest three times with three different times exits because different people have different styles and different needs. To produce backtesting results useful to swing traders, I exit after 2 days. To model position traders, 20 days. To meet the needs of active investors, backtesting holds each position for 200 days. This gives a way to isolate the buy signals and find out just how useful the moving average is to stock buyers of various temperaments.

Need to Define Goodness

One more very important thing to consider if you are backtesting moving averages to find out how well they do in the stock market: How will you know what is good? You need objective criteria for success. That means identifying the key statistics such as win rate, expectancy, hypothetical equity gains, etc. It also means setting standards for acceptable performance in each of these areas.

An example illustrates why this is important and why it’s not as easy as it first appears. Say your tests show a win rate of 55% for a particular indicator. That may might not be so good if, say, 62% of all stocks went up during the same period of time. Or if only 25% of stocks rose during that time period, your 55% win rate would be spectacular. What is good depends on how it compares to baseline market performance under the same conditions.

You can download a free copy of the BackTesting Report Baseline issue by clicking here.

Test Set

For a meaningful backtest, you need to have enough data to make a statistically valid comparison. At the minimum, that means 30 trades. Even if you are trading just one instrument – just one stock or just one currency pair – I think it’s important to test your trading strategy on many different instruments to prove its robustness. I went over the top with an extremely large test set — 7147 stocks over 14 years — to make sure my results would apply in a wide variety of market conditions.

You can get your copy of my backtesting reports on moving average buy signals by clicking here.

How To Clean Price Data for Backtesting

Cleaning data for backtesting is not easy but its very necessary to get meaningful results.    Mis-adjusted price splits can skew the price data and mislead the unwary backtester into thinking they’re found the holy grail when the strategy merely happens to catch the good side of a bad gap.

Here’s the steps to screen out dirty data and produce a clean dataset:

1. Pick at least 3 candidate data vendors.

2. Format the data for comparison.

3. Write a program to do a smart comparison and run it on the 3 candidate data sets.

4. Analyze the mis-compares to see which set is in error.   if 2 of 3 sets agree, assume that’s the correct value and the outlier is wrong.

5. Send feedback to the data vendors so they can fix the errors.

6. Select the set of historical price data to use for backtesting and lock it down to prevent changes during the backtesting.

7. Feed the golden price data to the backtesting engine.

This process took me several weeks of work but was worth it to get accurate results.  There’s little point of going to the work of backtesting if the underlying data is riddled with errors.

Read on for details if you are going to attempt this on your own or if you just want to see what preparations go into serious backtesting. Continue reading “How To Clean Price Data for Backtesting”

Adverse Excursion Definition

An Adverse Excursion is the amount that a trade goes in the wrong direction after entry and before exit.   The Maximum Adverse Excursion (MAE) is the worst over the life of the trade.

For example, say a stock is bought at $30, then drops to $28 before rising to $38 then settling back to an exit at $35.   The drop to $28 is the adverse excursion.    The Maximum Adverse Excursion (MAE) is then $2.

For more information see Maximum Adverse Excursion: Analyzing Price Fluctuations for Trading Management by John Sweeney.

(Backtesting Blog is an Amazon Associate.)

ATR Trailing Stop Definition

The ATR Trailing Stop is one way to limit losses and protect profits. A stop loss order is set a multiple of the Average True Range (ATR) away from the current stock price. As the price moves in the trade’s favor, the stop rachets along with, always calculated from a better closing prices and never from worse closing prices.    This mostly keeps from giving ground once its protected by the stop, except in the case of increasing volatility as measured by the ATR.

Click here for Back Test Performance of Trailing Stops 

Chuck LeBeau popularized the method of trailing a stop loss order a few ATRs below the recent high price for a long trade. This method became known as the Chandelier Stop.    LeBeau’s Book covers other aspects of ATRs.   The best description of the Chandelier exit is in Come Into My Trading Room: A Complete Guide to Trading by Alexander Elder.

The ATR Trailing Stop is also known as a volatility stop.

Extra Insight:

In backtesting, the ATR Trailing Stop reflects each stock’s unique daily price range.  Hence it can fit each stock better than a dollar trailing stop or even a percentage trailing stop.

As with all trailing stops, the ATR trail never exits at the extreme of a movement. Hence it always gives back some of the profits.

The ATR stop amount can be subtracted from either the high, the close, or the low of the day.    Each variation gives slightly different results.    The important concept is to match the stop distance to the stock’s volatility and to move it along with improving prices.

ATR stops are not offered by brokers, to my knowledge.   They are also tedious to calculate by hand.   The only realistic way to use an ATR stop is with software support.   Programmable software packages such as TradeStation can be programmed to display (and backtest!) an ATR stop.   

Click here for BackTesting Reports on Trailing Stops

(Backtesting Blog is an Amazon Associate.)

Last updated 11/11/08.