Posts Tagged ‘Volatility’

Selecting Time Periods for Backtesting

December 17th, 2008 by jackieannpatterson | No Comments | Filed in Backtesting Set Up

When people say they want recent data for backtesting, I wonder two things:

1. How do they test longer term strategies using only recent data?   Anything involving a 200 day moving average, for example, needs nearly a year of data just to calculate the average.   Then it needs multiple years of data to get various signals and see how they play out.

2. How did they do in 2008 relying on anything resembling the recent past of 2003-2007.   It seems to me that you need to go back to 2001, at the very least, to find data that represents a crash.

When I selected time periods for backtesting, I looked for a nice long segment that included sideways, up, and down markets.   I ultimately decided on May 1994- April 2004 as the core time period for my testing.    This includes the tech bubble and the bubble bursting in a double-dip recession.  1994 showed less volatility, and the 1998 crisis broke up the monotony of the rising market.

Added to the core period is the next segment for out-of-sample testing.   I read somewhere (sorry, forgot where) that the out-of-sample period should be one-third the length of the initial period.   May 2004- April 2007 fit that bill timewise. The market action during this period was flat and upward biased.

Yes, I could detrend the data but I’ve found that approach very unintuitive.   If I am testing trend-following strategies, it doesn’t make sense to me to remove the trend.  Instead, I do a baseline test using a simple strategy and use it for comparison to supposedly smarter strategies.    This approach, and the fact that I apply it during varying market conditions, provides a way to see if a strategy really adds value.    A strategy demonstrates “alpha” by doing better than the baseline.

Another note about my time periods.   I began my efforts with this data set in May 2007.   Hence the time periods run May - April of each year.

My third time period, May 2007 - April 2008 came about because a) it was there, and b) this period is now one-third the previous period, making it the out-of-sample for the out-of-sample data.   As it turns out, the market action was again very different, allowing further stress-testing of the strategies.   Here again, I think it would be a mistake to focus solely on the carnage of the recent past.   Dawn has so far always followed the dark of night.

Tags: , , , , , , ,

ATR Trailing Stop Definition

November 10th, 2008 by jackieannpatterson | No Comments | Filed in Glossary

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.

Tags: , , , , , , , , , , ,