PureBytes Links
Trading Reference Links
|
At 10:03 AM 01/05/2003, Bill Masciarelli wrote:
>> > I'm interested in learning more about the theory and coding of trailing
>stops. I would appreciate references to good written discussions and
>easylanguage code examples. Thanks in advance.
>
>
> Would someone please address the issue of why use of trailing stops in
>backtesting is a *mistake*?
The problem is that using trailing stops in backtesting is very likely to produce results that are much higher than the same system would have achieved in real time.
In real time, TS watches all the ticks as they come through, and can accurately run the trailing stop. With each new high within the trade, the trailing stop is faithfully ratcheted up and you'll be taken out at the proper level if the subsequent intrabar price comes back down to the stop level.
If you set a tight trailing stop on a real-time chart, you will almost certainly be taken out of the trade well before the daily high is ever reached. In real-time you are likely to get a puny little trade that ends quickly.
The problem is, that in backtesting, TS only knows the OHLC of a bar. If you set a tight trailing stop, TS will base the stop level on the (historical) high of the bar. With a stop set just below the high, your trade will almost certainly be filled between the high and the close and you'll see a beautiful (but false) exit just off the high for a nice juicy winner. It's magic - all your trades exit just off the highs!
You can even watch a chart with a tight trailing stop in real time. You'll see some small trades. Take the same chart, close it and re-open it, now using historical data, you'll see the trades now exit just below the high, dramatically overstating the results.
TS 2000i and 6 have added a nifty property to a strategy called backtesting resolution which allows you to specify shorter periods for this kind of stop testing. I believe it also solves this problem, but I haven't got direct experience with it.
Mike Gossland
|