Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting Freezes

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

    Backtesting Freezes

    I have been running many back tests over the 2-3 days using 7.0.0.6 on Win 7 x64. I have been consistently get the strategy analyzer to lock/fail to point that I need to restart NT 7 to continue doing anything.

    The cause seems to be that often there is brief disconnect/connect to the broker connection (say 1-3 seconds) and this causes the analyzer to hang. Trying to abort (using the abort button at the bottom of the control panel does not stop/clear this either.

    I am testing a instrument list (about 10-30 instruments) through the analyzer.

    Here are the steps that seem to cause the problem:
    1. Start Strategy Analyser
    2. Run a back test on a set on instrument (I am running a daily bar based swing system over a 10 yr window)
    3. somewhere during the run force to disconnect/reconnect (this is happening periodically during the day to me - see the brief disconnect/reconnect time in the screen shot around 1:40ish - connection is to TD Ameritrade)
    4. the back testing hangs and the abort button does nothing.


    The attached screen shorts from yesterday so a strategy that still thinks it is running (normal run time is about 10 mins) - this is a result of the connect/disconnect at 1:40 pm.

    Follow-up Question:
    I am confused as to why NT7 would even need to go the data for each run on the analyzer given that it is same instruments and same timeframes - I though there was meant to downloaded and cached data?
    Attached Files

    #2
    We will look into this early next week on one of our 64-bit machines. Regarding data loading, NT only loads from the provider if you require data. If for example, your backtest start date is 1/1/09 and that date does not contain any data, NT will continue to try and load data from that date on each backtest run.
    RayNinjaTrader Customer Service

    Comment


      #3
      You needed to iron out the disconnect issues with your ISP. There easily could be situations where if as you requested historical data from your provider you killed the connection (or your ISP does), then NT might hang.

      Comment


        #4
        Originally posted by NinjaTrader_Dierk View Post
        You needed to iron out the disconnect issues with your ISP. There easily could be situations where if as you requested historical data from your provider you killed the connection (or your ISP does), then NT might hang.
        I am not sure I understand? The ISP connection is working fine and seems that somewhere NT hangs when there is any form of connection issue between NT and the broker when backtesting (this is not that case for live strategies however so there is obviously ways to control and check/manage this). It is also presumptious to assume that it is my ISP that is as fault - there can be a whole multitude of reasons not related to the ISP:
        1. Broker having issues
        2. Something else running on machine causing high/increased latency
        3. local firewall
        4. downstream pairing point have issues leading to rerouting....
        5. etc


        So I guess my reason for posting was not to get the "it is just you and your wrong" answer - as you point out NT is "brittle" in some places and will break with a lost connection. I would think a better answer is that a lost connection should not require me to restart NT 7 to get a functioning environment. It is further exasperated by the fact that the "Abort" button on the bottom of control panel does not work either.

        Comment


          #5
          The connection is broken as per your log messages. This could cause NT to get stuck on a pending bar request. Working through bullet points below as per your list (apart from #1 which appears not to be relevant in your scenario) might resolve the issue.

          Comment


            #6
            Second thought: You are connected to TDA as you ran the backtest. What "Historical data" option has you selected on your TDA account setup?

            Comment


              #7
              The connection settings are in the attached screen shot.
              Attached Files

              Comment


                #8
                We'll get back to you shortly.

                Comment


                  #9
                  I ran some tests but it's not clear to me what happened (the yellow messages you see in the logs are definitely not related).

                  So, next time this happens could you please:
                  - send all (!) logs and traces e.g. by Help->Mail to support
                  - reference this thread, subject "for Dierk"
                  - provide timestamp on when this happened

                  Thanks

                  Comment


                    #10
                    stop a backtest

                    Can you please tell me - is it possible and if so then how - can a backtest be stopped?

                    Comment


                      #11
                      nightriderx, depending on what stage the backtest is at, it is possible to stop it by clicking the "Abort" button in the lower right corner of the Control Center.
                      AustinNinjaTrader Customer Service

                      Comment


                        #12
                        I do not see an "abort" button anywhere (using NT7), furthermore even if I did, when I move the cursor over the control center it gives me an hour glass and when I click anything it goes to a (Not Responding) state...

                        How is it not possible to stop it?? Isnt stopping the compiling of a program, which is essentially what this is doing, one of the very basics necessities in a program?

                        Comment


                          #13
                          nightriderx, I was just able to stop a backtest by clicking the Abort button as shown in the screenshot.

                          The backtester does not compile anything. Your strategies are compiled when you decide to compile them, and then the backtester takes that compiled script and runs data through it.
                          Attached Files
                          AustinNinjaTrader Customer Service

                          Comment


                            #14
                            yes, that window is exactly what I was hoping for ideally, however I do not and have never seen that abort button nor the elapsed/running time with the green fill bar. Is there an updated version of NT7? I am currently running 7.0.0.18

                            As for the compiling issue, when I set the days to look back to 0, it still puts my strategy into a halt (Not Responding) for several minutes... (at which point it does not load data for my stock(s) nor give me any indication of whats going on)

                            Comment


                              #15
                              The Abort button should be available anytime you run a backtest or optimize. NT7 is currently at 7.0.0.19, but the Abort button has been present since the very beginning.

                              Can you please clarify what you mean by "I set the days to look back to 0"? In the new strategy dialogue, I see a "days to load" and a "maximum bars to look back" parameter, but no "days to look back". That parameter doesn't exist for backtesting either.

                              If you set the "days to load" to 0, then that tells the strategy not to load any historical data, so that would be why it doesn't load any data for your stocks.
                              Attached Files
                              AustinNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by TAJTrades, Today, 11:03 AM
                              0 responses
                              0 views
                              0 likes
                              Last Post TAJTrades  
                              Started by wuannetraam, Today, 02:40 AM
                              3 responses
                              25 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by jjs12, Today, 10:29 AM
                              2 responses
                              8 views
                              0 likes
                              Last Post jjs12
                              by jjs12
                               
                              Started by Ludwik, Today, 03:52 AM
                              7 responses
                              32 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by sdauteuil, 09-23-2021, 10:16 AM
                              5 responses
                              1,221 views
                              0 likes
                              Last Post NinjaTrader_RyanS  
                              Working...
                              X