Automated Trading Machine (ATM) makes it simple to remove fear and greed from your trading. Automated trading is no longer just for the rich or nerdy. Our revolutionary software runs on your computer, using your trading rules, but none of your emotions. There's just one requirement - you know how to use a mouse. Learn more...
Pessimistic Backtesting Results
ATM cannot get around the issue of opening and closing trades in the same bar.
All you know about the price movement in any given bar is the Open, High, Low, and Close. That's it. You have a zero percent chance of knowing exactly what the price did between those extreme points.
As you use longer and longer intervals, such as Hourly, Daily, Weekly, etc, you lose more and more information about what the price did during the bar. Assumptions have to be made during backtesting, and the biggest assumption is this: if your entry price and stop loss price both fit within the range of a bar, we have to assume the worst. That is, the price went up far enough to get us in the trade, and then fell back far enough to take out our stop loss.
A so-called "pessimistic trade".
We want to use the results of backtesting to proceed with confidence that our trading system is going to work in the real world. And therefore pessimistic results during backtesting are going to be better for our bank balance than if it gave overly optimistic results. It's better to be pleasantly surprised during real trading that the system work better than you thought, rather than getting a nasty shock.
And so in ATM, whenever one of these pessimistic trades happens, we simply note it in the summary. If the percentage of pessimistic trades compared to the total trades is very high, then the backtesting results can't really be relied upon. If however there are no, or very few, pessimistic trades, then you can be confident with the backtesting results.
The Workaround
Just as the longer the interval the less detail we have, so too the shorter the interval the more detail. Edit the backtest and choose a shorter interval to step through. 1-Second bars are the lowest. That's pretty close to working with tick data. You might be satisfied with 1-Minute or 5-Minute intervals though.
But there's a problem with this, too. Time, and space. Certainly, the lower the interval, the more accurate the backtest. But also the lower the interval, the more bars to process. The more bars to process, the longer it takes to finish a backtest.
It also means that you need to create all those 1-Second bars, which adds extra time, and takes extra space on your computer.
At some point there is equilibrium between the accuracy and the time it takes. But is that equilibrium at 1-Second, 5-Minute, or Hourly bars? That all depends on your trading system and your computer's speed. If you want to test with 1-Second bars, just make sure you do a test run with only 3 hours' worth of prices (~10,000 bars) before running a test over weeks of prices.
- Login to post comments
Recent blog posts
- New Release: v3.0.3 - Everything Except Autotrading
- Mid July 2010 Update
- Start of June 2010 Update
- New Release: v3.0.2 - Copy, better error message, more options
- New Release: v3.0.1 - The Stabilise-ening
- Ah, The First Bug [Fixed in v3.0.1]
- New Release: v3.0.0 - The Rewrite
- Start of February 2010 Update
- End Of 2009 Update
- New Release: v2.0.10

Recent comments
21 weeks 2 days ago
36 weeks 3 days ago
42 weeks 1 day ago
42 weeks 1 day ago
48 weeks 5 days ago
50 weeks 11 hours ago
1 year 4 weeks ago
1 year 4 weeks ago
1 year 7 weeks ago
1 year 12 weeks ago