• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtests extremely slow

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

    Backtests extremely slow

    Hi I'm not sure if this has been covered before, but here goes....

    Yesterday I loaded a years' worth of tick data for one instrument into NT 7.1000.9 -- it all went well, the data appears to be there. I also had it generate minute and day data while it was importing.

    However, now when I run strategy backtests or optimizations, they spend quite a bit of time "loading" data. At least that's what it says on the status window of the control center. I'm trying to test 4 months on a minute-based strategy. Before I loaded all the tick data, it used to take about 10 seconds or less. Now it takes several minutes for the same run.

    Is there something I can do to speed this up?

    Thanks

    #2
    Hi nsymms,

    First step would be to figure out if the time it takes to load is caused by NinjaTrader downloading the data from your data provider. The only way to prevent it completely from trying to download data is to disconnect when you're making the backtest.

    There are many more data points in tick based charts compared to minute, so the time it takes could also be due to processing more data.
    Ryan MNinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan for the quick response. Strangely enough, it is actually pulling data from my provider (MBT). My network sniffer shows NT is pulling minute data for the entire testing period. Assuming it's been doing this all along, I have no idea why it's slower now than it was before.

      So what's the purpose of me loading all that data into the history center if backtests will pull data from the provider anyway?

      Thanks

      Comment


        #4
        NinjaTrader loads data from your data provider whenever it determines it could potentially not have all the data pertaining to the requested time period.

        You can use the data you imported and prevent NT from downloading by either disconnecting from the data provider, disabling historical data requests for the connection, or by unchecking Get Data from Server under tools > Options > Data tab. .
        Ryan MNinjaTrader Customer Service

        Comment


          #5
          Okay, since I trust my imported data, I'll just disconnect whenever I'm doing backtests with that instrument. Of course now the problem is that I'm running the strategy and trying to test it at the same time, so I can't really disconnect... Time to fire up the virtual machine.

          edit: Actually, when running backtests, I'll just un-check the "get data from server" in tools->options->data as suggested. No need for all that fancy virtual technology.

          Thanks again
          Last edited by nsymms; 04-03-2012, 10:43 AM.

          Comment


            #6
            Just for anyone who may be reading this thread in the future...

            What finally fixed this issue for me was running "Repair DB" from the Tools->Options->Data dialog. Evidently all that fiddling around with imports and such must have messed up the database. The "Repair" option solved my problem -- no more slowness, no more trying to fetch data from my provider during backtests.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NinjaCustomer, Today, 12:14 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Marco  
            Started by U0000999, Yesterday, 11:49 PM
            0 responses
            4 views
            0 likes
            Last Post U0000999  
            Started by ahadari28, Yesterday, 04:01 PM
            0 responses
            6 views
            0 likes
            Last Post ahadari28  
            Started by TazoTodua, Yesterday, 06:00 AM
            2 responses
            19 views
            0 likes
            Last Post TazoTodua  
            Started by TazoTodua, Yesterday, 09:06 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X