Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The data series keep loading every backtest

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

    The data series keep loading every backtest

    Good day everyone!

    I have two problems:

    1- When I perform backtests in the strategy analyzer, the data series always reload entirely, even if don't modify the backtesting dates. It takes a lot of time before getting the results of the backtest. Probably one setting has been change when I re-installed NT8, because the problem was not existing before.

    2- When I perform an optimisation, it always give only 4 results, even if I ask to keep the 10 best results in the ''optimize'' box.

    Thanks for your help!


    #2
    Hello bob_brsser,

    Welcome to the NinjaTrader forums!

    If you already have the data downloaded, disconnect from the data provider and NinjaTrader will only use the data cached.

    NinjaTrader will automatically download data if it sees data in the period is missing.


    The optimization results will depend on the inputs and range of inputs for the number of iterations.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea for the answer,

      I went throught all the informations and I tried everything it says, but it still doesn't work.

      It seems like my machine always take the trip to the cache to get the datas no matter the time frame I use. I am not connected to the provider.

      I opened the ''market analyzer'' window, and I opened a chart as it says on the pages. but still dont work. My strategy analyzer always takes a lot to give the results.

      The problem was not existing before. It did appear 1 or 2 weeks ago. And before that, I used the strategy analyzer for over a year on a daily basis. I never had to open market analyzer or graph to get instant results...

      I checked the box ''use local data only'' in the properties of the strategie analyzer. but checked or not, it doesn't work.

      I use a time frame in which I have in the historical data stored on the cache.

      thanks for your help.

      Comment


        #4
        Hello bob_brsser,

        The Strategy Analyzer taking time to get results does not mean that data is being downloaded.

        This could mean that the strategy is complex and causing the CPU core the iteration is running on to be fully utilized.
        https://ninjatrader.com/support/foru...35#post1055235

        How are you certain that the issue is data being re-downloaded? Are you seeing very high network utilization as the data is being downloaded?

        To confirm, you have disconnected and run the test as I have advised in post #2, is this correct?
        Further, when testing while disconnected, the same backtest was performed in much less time, is this correct?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Chelsea,

          Thanks for your quick response. I appreciate greatly.

          The memory of my computer is not loaded. I use only very few windows open at the same time. ( the open windows are: 1- control center,2- ninja script editor, 3- ninjascript output and 4- strategy analyzer) no other windows or program are open. My strategy do not use any indicators, it's only base on the price variation of the market. Everything was fine until 1 or 2 weeks. To make sure it is not my strategy, I did backtest on an old strategy which use to be very quick, and now, this strategy has the same problem, it is very slow.

          Before having any issue, I notice the following:

          - when I backtest for the first time on a specific time frame or when I change the duration of the bars, it takes more time to get the results (which is ''normal'' since the system has to load the datas according to the data series I require from the data base). While the system loads the datas, nothing is going on, on the screen, then the calculation starts, and the prints contained in the strategy starts to show progressively on the ninjascript output window. When the prints starts, I can follow '' where'' the calcultion are. It usually takes much more time to load than it takes to do the calculations.

          - after that, if I keep the same time frame and duration of bars, it doesn't take any time to load, and the ninjascrit output start immediately after I press the ''run'' button on the strategy analyzer. The results shows up few seconds later, (between 2 and 10 seconds depending the lenght of the time frame).


          Now, it is different. I do the backtests in the same conditions as before, I mean, same computer, same strategy, same everything. It always ''load the datas in background'' for a while before showing anything on the ninjascript output window.

          I really have the feeling that it always load all the datas before starting the calculations, no matter whats in the memory (RAM).

          Thanks for your technical and mental support... : )

          Comment


            #6
            Hello bob_brsser,

            I am not able to confirm, how are you certain the issue is data loading specifically?

            I was also not able to confirm, the backtest performs at the speed you expect and accept while disconnected from all connections?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi Chelsea,

              thanks again for your quick response.

              I suppose that my system reloads the datas from the cache every backtest because it acts exactly the same way as when I do the first backtest of the day after closing and re-opening Ninja trader in the morning...

              It takes the exact same time every single time, I mean, the time to: 1- load the datas, 2- execute the calculation visible in the ninja script output.


              thanks.



              Comment


                #8
                Hello bob_brsser,

                Does the backtest perform at the speed you expect and accept while disconnected from all connections?
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hi Chelsea,

                  The answer is no.

                  I do connect only once a week to get the new datas. Aside of that, I do the backtests while I am not connected.

                  The backtests are now always slow. It was not like that before.

                  When I am not connected and I do backtests on the same time frame and same datas series for a second or a third time, I except the calculations will start instantly in the output window, because it was like that before...




                  Comment


                    #10
                    Hello bob_brsser,

                    This would confirm the issue is not with downloading historical data.

                    If disconnected, NinjaTrader will only loading from the cache of historical data that has been previously downloaded and no loading from the connection will occur.

                    This can be the baseline of how long it takes to takes this particular strategy with these settings to test this amount of data.


                    Each time a strategy is backtested, the historical data is run through the code. If you change the code, compile, and run a backtest again, the new code will be evaluated and you will see the new results.
                    Last edited by NinjaTrader_ChelseaB; 12-22-2020, 09:52 AM.
                    Chelsea B.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by yertle, Yesterday, 08:38 AM
                    7 responses
                    28 views
                    0 likes
                    Last Post yertle
                    by yertle
                     
                    Started by bmartz, 03-12-2024, 06:12 AM
                    2 responses
                    21 views
                    0 likes
                    Last Post bmartz
                    by bmartz
                     
                    Started by funk10101, Today, 12:02 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post funk10101  
                    Started by gravdigaz6, Yesterday, 11:40 PM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by MarianApalaghiei, Yesterday, 10:49 PM
                    3 responses
                    11 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Working...
                    X