Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

backtest Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Redrolfe
Posted : Friday, September 11, 2009 9:11:54 PM
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)

jas0501
Posted : Saturday, September 12, 2009 1:25:04 AM
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.

Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.