NexusFi: Find Your Edge


Home Menu

 





Possible to backtest long periods in NT with market replay?


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one max-td with 1 posts (1 thanks)
    2. looks_two NinjaTrader with 1 posts (1 thanks)
    3. looks_3 jacqudy with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,887 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Possible to backtest long periods in NT with market replay?

  #1 (permalink)
 Twiddle 
Sydney, Australia
 
Experience: Beginner
Platform: Ninjatrader
Broker: Mirus
Trading: FDAX
Posts: 139 since May 2010
Thanks Given: 150
Thanks Received: 94

Hi all,

Is it possible to use market replay data for backtesting large periods, or do you have to play it live and have your strategy running on each market replay file?

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
How to apply profiles
Traders Hideout
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
23 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927


backtesting auto-strategys works with historic datas - not with the recorde Market-replay-datas.

thats something different.

market-replay is more for training, to regognize your signals + execute your trades i would say.

max-td
Reply With Quote
Thanked by:
  #4 (permalink)
 jacqudy 
New York, NY USA
 
Experience: Intermediate
Platform: looking for the next one
Broker: AMP/CQG
Trading: anything that moves
Posts: 14 since Oct 2011
Thanks Given: 34
Thanks Received: 19

Let me preface by saying
1. I’ve read everything I could find on the differences between backtesting, market replay and live trading, so I’m aware of the major issues.
2. My strat uses ExecuteOnBarClose = true.


I've noticed that when I load a strat on a chart in in market replay, it applies that strat immediately to whatever history my chart loads and is available in MR. These results are reportable in Strategy Performance. I noticed also that the P&L from this “historical MR” was identical (day by day) to the same timeframe I had Backtested with the same strat (with a couple of exceptions).

But: when I ran the strat “live” in MR over a day from the same period, the results for that day were slightly off. I discovered that 6 out of 8 executions occurred 1 bar later (and 1 tick away) from the backtested and MR “pre-loaded” history.

So I’m trying to figure out a few things:
1. Are MR “live run” trades executed the same as the MR “pre-loaded” historical executions? I hope the answer is yes, but it looks like “no.”
2. Since my strat executes on bar close, will my Backtest results be as reliable as MR “live run” results?
3. If I forward test my ExecuteOnBarClose strat in live real time, then download the MR data for the day and run the strat in MR, should my results be the same? Seems like they should be close.
4. I was hoping that I could shortcut the MR process by simply downloading the replay data for the time period I need, then in MR “going to” the last day and getting Strategy Performance data for it. This would save much time over running 90 days in MR, even at 500x.

Reply With Quote
  #5 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,713 since May 2010
Thanks Given: 203
Thanks Received: 2,686


jacqudy View Post
Let me preface by saying
1. I’ve read everything I could find on the differences between backtesting, market replay and live trading, so I’m aware of the major issues.
2. My strat uses ExecuteOnBarClose = true.


I've noticed that when I load a strat on a chart in in market replay, it applies that strat immediately to whatever history my chart loads and is available in MR. These results are reportable in Strategy Performance. I noticed also that the P&L from this “historical MR” was identical (day by day) to the same timeframe I had Backtested with the same strat (with a couple of exceptions).

But: when I ran the strat “live” in MR over a day from the same period, the results for that day were slightly off. I discovered that 6 out of 8 executions occurred 1 bar later (and 1 tick away) from the backtested and MR “pre-loaded” history.

So I’m trying to figure out a few things:
1. Are MR “live run” trades executed the same as the MR “pre-loaded” historical executions? I hope the answer is yes, but it looks like “no.”
2. Since my strat executes on bar close, will my Backtest results be as reliable as MR “live run” results?
3. If I forward test my ExecuteOnBarClose strat in live real time, then download the MR data for the day and run the strat in MR, should my results be the same? Seems like they should be close.
4. I was hoping that I could shortcut the MR process by simply downloading the replay data for the time period I need, then in MR “going to” the last day and getting Strategy Performance data for it. This would save much time over running 90 days in MR, even at 500x.

The short answer is that historical is not expected to match replay and replay is not expected to match live simulation and live simulation is not expected to match live cash. There are many variables between each scenario that can impact the results not to mention the strategy itself and the types of orders used to enter and exit positions. I suspect you have already read the following but I post it just in case you have not.

Discrepancies: Real-Time vs Backtest

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on September 13, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts