• 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

20GB of memory for slope?

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

    20GB of memory for slope?

    Hi all,

    I am programming in NT for 2 years, I came up with a strange problem recently.

    I am backtesting a portfolio of 20 stocks for a time interval of 1 year using 1 Min data. In a strategy I also use the slope of 1 day VIX as:

    Slope(Closes[1], 3,0). I have included VIX timeseries with Add(etc) correctly.

    The problem is that the calculation seems eternal and the memory utilization exceeds 20 even 30GB! (33.4 now) The same strategy without the slope completes in 2 mins with minimal memory utilization.

    I imported VIX timeseries on 1 Min basis and I clicked on "Generate Daily data from Min data" since I need slope of 3 days for my algo purposes.

    Ninja version is: 7.0.1000.16

    Any ideas?

    #2
    Hello Jim_Feyn,

    Thank you for your post.

    What is the time frame that you are running this strategy to and from?

    Are you printing, logging, or drawing anything?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      update: 52GB now.

      timeframes:
      1/1/2013 to 1/1/2014, 1 Min timeframe in stock timeseries
      1/1/2013 to 1/1/2013, daily timeframe in VIX timeseries (and getting the slope of 3 days)


      No, I do not print anything in the output window. I do draw however and use this indicator plot as input for my strategy's signals. That's what I always do.

      I run this problematic backtest of 20 stocks through Strategy Analyzer, I do not use charts. When I backtest only 1 stock through Strategy Analyzer, it works. Slowly though, due to many calculations, but it works and completes the run.

      I am thinking of feeding VIX once in a custom way, through StreamReader, and calculate the slope myself.

      Comment


        #4
        Jim_Feyn,

        I believe the issue you are running into here is the number of items that you are testing at once.

        When you run one test how much does your RAM climb up to?

        Would you be willing to send me the strategy and indicator so that I can test and investigate this on my end?
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Thanks for your prompt reply.

          Unfortunately I cannot send it since it's proprietary. I am puzzled as well by this.

          I run backtests in SP500, 500 stocks at once and 6 years back instead of 1 year (always in 1 min timeframe), with simpler versions of the strategy, without VIX slope, 32GB of RAM are always enough. For Nasdaq 100, 16GB are enough.

          Comment


            #6
            Jim,

            Can you share the portion of what you are doing with the Slope implementation?

            If you are not getting the same problems with one stock or with the SampleMACross on the same basket test, then it has to be something in the code is taking up the memory and not either disposing() properly or too many draw objects.
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by tonynt, Today, 01:20 AM
            0 responses
            9 views
            0 likes
            Last Post tonynt
            by tonynt
             
            Started by hemlaguza, Today, 12:19 AM
            0 responses
            2 views
            0 likes
            Last Post hemlaguza  
            Started by sdauteuil, Yesterday, 11:02 PM
            1 response
            3 views
            0 likes
            Last Post sdauteuil  
            Started by Jschmelz, Yesterday, 04:45 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Marco  
            Started by sisenberg, Yesterday, 08:06 PM
            1 response
            11 views
            0 likes
            Last Post sisenberg  
            Working...
            X