Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Same strategy on 2 computers with different results

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

    Same strategy on 2 computers with different results

    I develop strategies on one computer and run them on another so I can develop a strategy while still having it running and gathering data. I have noticed that when backtesting that each computer gets different results, even though the scripts and parameters are identical.

    I have uploaded two pictures. Each one uses the same strategy and same parameters but are from different computers. You can notice that, among other things, the total net profit and sharpe ratio are vastly different. I compared the scripts using notepad++ compare tool so I know they are the same.

    Any ideas what could cause this?





    Click image for larger version

Name:	2.png
Views:	416
Size:	288.4 KB
ID:	1263697
    Click image for larger version

Name:	1.png
Views:	457
Size:	108.5 KB
ID:	1263696

    #2
    Yes - most likely it is that the data included in the test is different. Try copying the entire Documents -> NinjaTrader 8 -> db folder from one computer to the other, then repeat the test with both computers in offline mode (not connected to any data feed connection) and including only complete trading days (certainly not including the current incomplete day, but also not including any days that were incomplete when the data was downloaded). Additionally, check to make sure you have not modified the instrument definition for AUDUSD on either computer, and that the definitions are identical.

    One way to narrow down such problems if you can't otherwise figure it out is to go through the trade list for each and see what trades are different, and then look at those trades on a chart on each side. This process will likely help you understand e.g. if one computer is missing some bars, or has different ticks in it, etc.
    Last edited by QuantKey_Bruce; 08-09-2023, 05:15 AM.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello Jeffsg605,

      Thanks for your post.

      QuantKey_Bruce is correct. There is likely a difference in the historical data that you are backtesting on which would cause different results to occur when comparing the backtest between the two computers.

      As a general rule for backtesting: Same data + Same strategy code and parameters = Same results.

      You could follow the advice QuanyKey_Bruce provided to make sure that the historical data in your Documents\NinjaTrader 8\db folders on each computer are the same and retest the script on both machines.

      Or, you could try re-downloading the historical data on both machines and compare the historical data in the Tools > Historical Data window to ensure the historical data matches. Then, retesting the script on each machine.

      Discrepancies between backtesting and realtime data — https://ninjatrader.com/support/help...ime_vs_bac.htm

      Comparing real-time, historical, and replay performance — https://ninjatrader.com/support/foru...d.php?t=102504
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        Interesting, I'll give that a try this weekend. Thank you very much for this information.

        Comment


          #5
          It looks like the historical data between both computers is different. I tried to download historical data but after doing that twice on each machine, they are still different. I attached a picture of one
          instance of NT which is missing several months of data. When I try to download just those months, nothing happens. How can I fix this?

          Click image for larger version

Name:	3.png
Views:	386
Size:	8.3 KB
ID:	1264118

          Comment


            #6
            Hello Jeffsg605,

            Are you connected to a paid Kinetick subscription for this Forex data?

            Are you connected to a brokerage such as Interactive Brokers or Forex.com?

            Are both computers connected to the same data feed?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              I am connected to Forex.com. I bought the 3rd party add on, enabled multi provider checkbox, they are both connected to the same data feed.
              I am able to download Day data fine, just not Minute data.

              Comment


                #8
                Hello Jeffsg605,

                Thanks for your notes.

                We cannot guarantee that a specific amount of Historical minute data is available from the Forex.com connection as this is determined by the brokerage.

                You should contact Forex.com directly to inquire about how much Historical minute data they provide with their connection.
                <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                Comment


                  #9
                  Understood, thanks

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Today, 05:17 AM
                  0 responses
                  23 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  120 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