Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

backtest results change after re-loading history

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

    backtest results change after re-loading history

    Ok, so I created a strategy on my dev machine and back-tested with a return of 5k...
    Then I exported my data and moved my strat to the prod machine and imported the data.
    The back-test result on the prod machine was 2k... same code same settings.. only difference of the PC's was slower processor and less memory.

    So then I wen back to my dev box and imported the data (exported previously) and now my back-test agree but only 2k.

    Where is the disconnect? What should I do to get consistent results??

    #2
    Hello waltFX,

    If the code is the same, the data series is the same, and the data itself is the same, the results will be the same.

    If there is a difference, one of these things is different. It could be the data series (such as date range, or differences in trading hours, etc), or could be the data is not the same.

    To find out what is causing differences, you can write the data to file.

    Below is a link to a forum post that demonstrates.
    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.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I think you are missing the issue.

      The data from the dev box (5k result) was exported and then the SAME file was imported back into the dev box and the results (2k) were different from the original dev results...

      I did not do anything with the file except import the data back into the source box. This should NOT have changed results...


      Comment


        #4
        Hello waltFX,

        Something is different. Find out what is different.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Something is different. Find out what is different.
          Seriously!! That is not an answer...

          Please don't answer if you don't have any suggestions...

          Comment


            #6
            Hello waltFX,

            My suggestion is to write the information used in the conditions to file and see what is different. Mostly likely the output in the file is going to show you where the data is different, and may show there is an issue with importing.

            Once you have the output, we can move forward.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              • I "printed" O H L C from a script and saved it to a file
              • then exported the same data using the NT "export" feature
              • these two files SHOULD be the same but were significantly different.
              So, the issue is that that data exported does NOT have the resolution required for forex data which is significant to 5 decimal places; .00001 (which is the "TickSize").

              Needless to say, this is very disappointing as I did not want to spend my afternoon debugging...

              >> I would have attached an Excel with samples but the file type is not allowed...

              Comment


                #8
                Hello waltFX,

                To see what the differences are, you would write to a text file the time of the bar and all values used in the conditions that place orders.

                You would run the script and get the text file from the first computer, then run the script and get the text file from the second computer. Then compare the files with diffchecker, as shown in the video in the forum post I provided you.

                To confirm, you are following the steps in the video, is this correct?


                Regarding exporting historical data, I am not able to reproduce.

                I've exported EURUSD minute data and I am finding the exported historical has the correct number of decimal places.

                Below is a link to a test video.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Look at what I wrote; I "printed" every data point to a file and exported the data to a different file AND THEY DO NOT MATCH!
                  Conditions have NOTHING TO DO WITH IT!
                  If the data does not match the results will not match.

                  Comment


                    #10
                    Hello waltFX,

                    I am not able to reproduce on my end. I've tested exporting data and importing this and am finding the data is the same.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Sorry but when you export and import the same data through the same pipeline, of course it will be the same...

                      I looked a over 219000 data points and they do not match.

                      Just forget about it... I'm tired of beating a dead horse..

                      This conversation is over...

                      BTW; I have been doing databases and high volume data for over 30 years... I think I know just a bit about data...​

                      Comment


                        #12
                        Hello waltFX,

                        Is your claim that the data from the exported file, is not matching what is in the historical data window after it is imported on a new machine?

                        Can you provide the exported historical data file and screenshots of where this is not matching in the historical data window, along with your time zone?

                        If not, let's schedule a call where I can perform the tasks I have requested output from on your behalf.

                        Please send an email to support [at] ninjatrader.com. In the email please include a link to this forum thread.
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by NullPointStrategies, Yesterday, 05:17 AM
                        0 responses
                        65 views
                        0 likes
                        Last Post NullPointStrategies  
                        Started by argusthome, 03-08-2026, 10:06 AM
                        0 responses
                        139 views
                        0 likes
                        Last Post argusthome  
                        Started by NabilKhattabi, 03-06-2026, 11:18 AM
                        0 responses
                        75 views
                        0 likes
                        Last Post NabilKhattabi  
                        Started by Deep42, 03-06-2026, 12:28 AM
                        0 responses
                        45 views
                        0 likes
                        Last Post Deep42
                        by Deep42
                         
                        Started by TheRealMorford, 03-05-2026, 06:15 PM
                        0 responses
                        50 views
                        0 likes
                        Last Post TheRealMorford  
                        Working...
                        X