Forgotten Your Password?
Connect with Facebook
Frequent Questions

Automated Trading Black box systems, strategy automation, algorithmic trading, etc...

Automated Trading Thread, Backtesting Question in Trading Styles and Methods; I have a question on backtesting. The strategy I currently want to test exits upon hitting a profit target. In ...
Reply
1 1 Attachment(s)
 
LinkBack Thread Tools Display Modes

Backtesting Question  

  #1  
Old 09-23-2009, 12:11 AM
Tams's Avatar
Tams
does not like shills.
 
Join Date: Sep 2008
Location: Geelong
Posts: 2,279
Thanks: 1,282
Thanked 972 Times in 575 Posts
I have a question on backtesting. The strategy I currently want to test exits upon hitting a profit target. In addition, as is often the case, there is a stop loss exit.

My question is how do you go about doing a backtest of something like that? The problem I have is that if I use daily bars, I could easily have a situation where both the PT and the SL are hit, within the same bar. How do I figure out which one gets hit first?

The only solution I can think of is to use shorter bars, like hourly.

I assume that is the standard way to proceed, or is there some obvious alternative that I'm missing here?

Someone sent me the above question, I thought I should post the answer here for the benefit of all.


MultiCharts has a feature called "Bar-Magnifier".
TradeStation calls it Look-Inside-Bar-Backtesting (LIBB).

MultiCharts/TradeStation lets you add a second data stream for backtesting.
For example if your strategy is to work on a daily chart. You can add a finer resolution 2nd data stream (eg 5min) to the backtesting, thus allowing the program to calculate your strategy rules and fill orders at intrabar prices, as if in real life trading.


Attached Thumbnails
Backtesting Question-backtesting_precision.gif  
__________________


You can't hope to be a man while acting like a girl.

Last edited by Tams; 09-23-2009 at 12:34 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
diablo272 (09-23-2009)

Re: Backtesting Question  

  #2  
Old 09-23-2009, 12:23 AM
diablo272
 
Join Date: Nov 2008
Location: United States
Posts: 356
Thanks: 122
Thanked 87 Times in 70 Posts
TS backtesting functionality is better that Ninja backtesting apparently.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Backtesting Question  

  #3  
Old 09-23-2009, 12:26 AM
Tams's Avatar
Tams
does not like shills.
 
Join Date: Sep 2008
Location: Geelong
Posts: 2,279
Thanks: 1,282
Thanked 972 Times in 575 Posts
Some programs would use an algorithm to mimic intra-bar price fluctuation, you can get intra-bar order fill, but the price is simulated.
(ie. somewhere in between the high of the bar and the low of the bar.)
__________________


You can't hope to be a man while acting like a girl.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Backtesting Question  

  #4  
Old 09-23-2009, 12:29 AM
diablo272
 
Join Date: Nov 2008
Location: United States
Posts: 356
Thanks: 122
Thanked 87 Times in 70 Posts
To be honest, I'm not 100% sure of the intricacies of Ninja backtesting (because I don't use it anymore), but from what I remember, it will give you a fill at the close of each bar, regardless of the timeframe, and there were no settings to adjust this. I could very well be wrong about that, but I'm quite sure that there is some aspect of Ninja's backtesting that made it useless for me, or at least very cumbersome to use.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
backtest



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backtesting Software Recommendation Soultrader Review Section 12 03-18-2010 11:13 PM
Backtesting Strategy ephi144 Automated Trading 3 04-13-2009 10:42 PM
Backtesting only mnkc Data Feeds 3 02-08-2007 12:45 AM
Backtesting software mfoco Data Feeds 5 12-12-2006 05:05 PM
Backtesting lasherm1 Beginners Forum 3 09-22-2006 08:20 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


» »

» Invite Friends