Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Different backtesting results on two NT8 machines - same code, same data feed

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

    Different backtesting results on two NT8 machines - same code, same data feed

    Hello,

    I developed a strategy for NT8 (8.0.22.1 64-bit) that I have been testing on my personal laptop. I installed the same exact version of NT8 (8.0.22.1 64-bit) on a VPS that will soon be used for live trading, and connected to the exact same data feed connection (Continuum/CQG demo). I was shocked to find that the strategy backtest P/L results were completely different, including the number of trades. For a given timeframe on the two machines, one machine had double the number of trades.

    I have made 100% sure that all settings match across both machines (instrument, bar type, commission, strategy parameters, etc.). What is the reason for the disparity between these two machines? It is extremely frustrating to not have consistent results with identical code and identical data.

    Thanks,
    FredB987

    #2
    Hello fredb987,

    Thanks for the post.

    From the given details I really couldn't say what may be different there, this would generally be a situation where you need to add debugging into the script such as Prints to find out whats happening.

    You may be able to get an idea of whats different by making a very small test such as a few days to limit the number of bars and then review the charts. Looking at the charts you could judge where the discrepancies start to get an idea of where to further review.

    One example would be that one machine has different data, you may see a different starting point or you may see indicators you use start to diverge.

    Another would be if you are using tick based series, that can differ if either machine has any different data. If one starts on a different tick that could completely change the bars and results.

    You may want to try a test using 60 minute bars as a starting point and also test using the SampleMACrossOver as that is very simple. That just helps to cut a lot of extra data and variables out of the way to find the root of the issue.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      I think I found the root cause of my issue.

      On the VPS the time zone was not set correctly prior to installing NT8. First, I corrected the Windows time zone setting on the VPS, then corrected the time zone in NinjaTrader settings (Options > General > Time Zone). Next, in the "Historical Data" section of NT8, I deleted all historical data from the instrument in question, which would force everything to be downloaded again. The backtest and optimization results are now about 99.9% identical across my separate machines.

      In hindsight I'm not really sure if I needed to delete the historical data to correct the problem, but those steps resolved the issues I was seeing.

      Thanks for the reply and assistance - it's appreciated!

      FredB987

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ghoul, Today, 06:02 PM
      0 responses
      7 views
      0 likes
      Last Post ghoul
      by ghoul
       
      Started by Barry Milan, Yesterday, 10:35 PM
      6 responses
      19 views
      0 likes
      Last Post Barry Milan  
      Started by DanielSanMartin, Yesterday, 02:37 PM
      2 responses
      13 views
      0 likes
      Last Post DanielSanMartin  
      Started by DJ888, 04-16-2024, 06:09 PM
      4 responses
      13 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by terofs, Today, 04:18 PM
      0 responses
      12 views
      0 likes
      Last Post terofs
      by terofs
       
      Working...
      X