Registered User Joined: 3/26/2005 Posts: 7
|
Backtesting has yielded incorrect results for me. An example:
I created an indicator to locate five consecutive declines in "average price" ((high+low+close)/3), using daily bars. These events were correctly displayed on the charts. But in backtesting this is what occured for the period January 2, 2009 to the present for the Stardard and Poor 100 watchlist:
For the trading rules of (1) buy at the next open following the signal day and (2) sell at the open the day after that, the backtesting results for many, if not most, of the trades had bars-per-trade in the hundreds, in many instances exceeding even the number of days in the test period. The bars-per-trade, of course, should have equaled 1 for each trade. Reversing the order of the trading rules, listing the sell rule before listing the buy, yielded a report of no trades at all.
Rich (email removed by moderator)
|
Registered User Joined: 12/31/2005 Posts: 2,499
|
move the exit rule before the entry rule.
Only the first rule satisfied will execute per day, so if entry rule is first the exit won't trigger if the entry condition still exit on an open trade.
|