Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Wildly different results in Strategy Analyzer vs Market Playback

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wildly different results in Strategy Analyzer vs Market Playback

    I'm finding there is almost nothing close in results when I do a Strategy Analyzer and then the same criteria in a Market Playback.
    Example is I did NQ 06-21 (2000 tick) with a strategy from 4/11 to 4/23 and the Strategy Analyzer showed it very profitable.
    Then I ran the same period, same chart, on market playback between 100, 500 and max speed, and it's like negative thousands.
    It is difficult to determine which one to use for testing. because when it comes to a live trade, it's going to be different as well.

    #2
    I have had similar experience when comparing results in Strategy Analyzer vs live trading (I ran tests where I ran a strategy in the live market for a couple of days, then re-ran in Strategy Analyzer with different results.

    I found one source of issue involved intrabar granularity. Unless you select the "high" resolution in SA, the Analyzer doesn't "know" whether the stop or a target was hit first on trades where both the stop and the target are traded within the same bar.

    I would suggest trying using "high resolution and set it to "tick". While this slows down the time to run the analysis, this resolved some of my issues. I may be wrong, but I seem to recall that you can't use "high" resolution if your strategy uses multi-timeframe data series - but I may be wrong on this point.

    My issues was how strategy analyzer treats the situation where both a stop and a target are contained in the same bar, I believe it uses the direction of the first tick of the bar. If it is "up" then it assumes the higher price is reached before the lower price. (so for a long, the target would be reached first). Obviously this is going to be wrong a good deal of the time depending on the market being traded.

    I hope this helps.

    I never tested Market Replay, but I assume (dangerous as it is to do so) that it is an exact replica of the live market, tick x tick. I may test this assumption this next week, and if I find it is NOT the same, I will update you on here.

    Good luck in your quest!

    Some useful links

    https://ninjatrader.com/support/help...ime_vs_bac.htm

    and

    https://ninjatrader.com/support/foru...ive#post773377
    Last edited by EminiTrader; 04-24-2021, 08:57 AM.

    Comment


      #3
      Originally posted by EminiTrader View Post
      I have had similar experience when comparing results in Strategy Analyzer vs live trading (I ran tests where I ran a strategy in the live market for a couple of days, then re-ran in Strategy Analyzer with different results.

      I found one source of issue involved intrabar granularity. Unless you select the "high" resolution in SA, the Analyzer doesn't "know" whether the stop or a target was hit first on trades where both the stop and the target are traded within the same bar.

      I would suggest trying using "high resolution and set it to "tick". While this slows down the time to run the analysis, this resolved some of my issues. I may be wrong, but I seem to recall that you can't use "high" resolution if your strategy uses multi-timeframe data series - but I may be wrong on this point.

      My issues was how strategy analyzer treats the situation where both a stop and a target are contained in the same bar, I believe it uses the direction of the first tick of the bar. If it is "up" then it assumes the higher price is reached before the lower price. (so for a long, the target would be reached first). Obviously this is going to be wrong a good deal of the time depending on the market being traded.

      I hope this helps.

      I never tested Market Replay, but I assume (dangerous as it is to do so) that it is an exact replica of the live market, tick x tick. I may test this assumption this next week, and if I find it is NOT the same, I will update you on here.

      Good luck in your quest!

      Some useful links

      https://ninjatrader.com/support/help...ime_vs_bac.htm

      and

      https://ninjatrader.com/support/foru...ive#post773377
      Thanks for feedback. Do I also have to download history before I run a strat analyzer against said date range?

      Comment


        #4
        Hello MatthewLesko,

        Below is a link to a forum post where I have discussed comparing results between playback and the strategy analyzer.
        https://ninjatrader.com/support/foru...nce#post100192

        1 tick intra-bar granularity, tick replay if using calculate with onpricechange/oneachtick, and testing over the exact same start and end bar is recommended.

        Historical data is required for the Strategy Analyzer. This can be pre-downloaded or downloaded from a connected provider.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          Hello MatthewLesko,

          Below is a link to a forum post where I have discussed comparing results between playback and the strategy analyzer.
          https://ninjatrader.com/support/foru...nce#post100192

          1 tick intra-bar granularity, tick replay if using calculate with onpricechange/oneachtick, and testing over the exact same start and end bar is recommended.

          Historical data is required for the Strategy Analyzer. This can be pre-downloaded or downloaded from a connected provider.
          Hello Chelsea and MatthewLesko.
          I've read all the other posts about differences between RealTime vs. BackTest:

          Citizens of the NinjaTrader Community, A common question we hear from clients is 'why are results from backtest different from real-time or from market replay?'. Live orders are filled on an exchange with a trading partner on an agreed upon price based on market dynamics. Backtest orders are not using these market dynamics.

          https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/1218724-a-testing-environment-that-closely-mimics-real-time-results-for-strategies
          https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/1148766-why-different-results-on-different-replay-results
          I know I have gone down this road before, but I like having deja vu why does the back test on same strategy ( 5 days) same parameters have completely different results when running a downloaded market replay of the same week ? which do I trust the backtest allways ( showing me insane % profits, the replay showing me losses ?)


          And also the TickReplay Guide:

          But I Still don't figure it!

          I took the simple CrossOver 2 SMA strategy and enabled TickReplay . Added intrabar granuality 1 tick bar to the secondary series.
          Sent the order to the secondary bar series with the method overload with barindex=1 (I know that if I'm adding the 1 tick bar there isn't difference
          if i enable or not TickReplay- Correct me if i wrong)
          AND I STEEL HAVE MAJOR DIFFERENCES BETWEEN Strategy Analyzer Backtest (with TickReplay Enabled) and PLAYBACK!
          And Both of them i use HISTORICAL data (not Replay data because i couldn't find for TQQQ Replay Data - Can someone find me ?)
          So i don't understand, it said in the TickReplay guide:
          "Tick Replay is used to playback 1 tick historical data to build the bars as if they had been build live, this means that tick data will be thrown as Market Data events in historical and subsequently OnMarketData and OnBarUpdate events will be called as if it was live. "

          So why i'm getting total different results between PLAYBACK and Backtest with TickReplay Enabled when the both using Historical data?
          I understand there SHOULD be difference between Realtime or Simulated data because of the delay in order fill in RealTime vs. backtest and Playback which
          fills the orders immediately.
          But why the difference between backtest and Playback??

          What do i need to do that Playback and backtest will be the same??
          This is Critical because i'm trying to build a strategy and I'm optimizing via Strategy Analyzer to figure out the best settings via backtest with TickReplay
          Enabled to simulate market data received tick by tick and using OnMarketData event. But if after i get great result in Strategy Analyzer and now moving to
          Playback in the same dates and getting TOTALY DIFFERENT so what is the point?
          I need a way to activate the SAME ENGINE of PlayBack as a backtest to the whole 3 months history to figure out the best settings.
          How can i do that?
          Isn't it the time that NT8 will unite these engines into one backtest and give same results that developer can build by that good Strategy?
          Thank you Chelsea for the great Video and demo strategy for diff between BackTest/PlayBack/Realtime :

          But I steel don't understand why there is a diff between BackTest with TickReplay enabled and Playback and how to achieve same behavior to closely
          resemble RealTime?
          Thx So much for Your help.

          Issac.

          Comment


            #6
            I am running into this issue as well. What is the point of Strategy Analyzer if the results are not reliable? I added the 1 tick data series, submitted orders on that data series, but results are different as it is shown in the video...mainly playback vs the strategy analyzer. I know the realtime fills will be different but I would expect the Strategy Analyzer have at least match the playback.

            What is the NT recommendation on this?

            Comment


              #7
              Originally posted by barbaros View Post
              I am running into this issue as well. What is the point of Strategy Analyzer if the results are not reliable? I added the 1 tick data series, submitted orders on that data series, but results are different as it is shown in the video...mainly playback vs the strategy analyzer. I know the realtime fills will be different but I would expect the Strategy Analyzer have at least match the playback.

              What is the NT recommendation on this?
              Agree barbaros!
              Very Very frustrating!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Today, 05:17 AM
              0 responses
              20 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              119 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              63 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              41 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              45 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X