Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trying to better understand RAM usage

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

    Trying to better understand RAM usage

    I have a strategy where a backtest on 1054 instruments, 60 minute chart from Jan 1, 2016 to Dec 31, 2024 uses up approximately 14GB in RAM, and takes about 2 hours to complete (1054 iterations).

    However, when I run an optimization whereby I introduce a single alternate to a single variable (so 2108 iterations), it uses a whopping 800GB in RAM, and takes 10 hours to complete (IsInstantiatedOnEachOptimizationIteration is set to False).

    I'm trying to understand why there is such a huge disparity in RAM usage (57x) and time taken (5x) when the number of iterations is only doubled. From a layman point of view, I would expect it to only use twice the amount of resources.

    I guess I'm asking this to find out if there's a fundamental deficiency in my code that is causing the optimization to blow up, or this is just the way NT8's engine works, and I should just focus my efforts on how to work with it.

    Thanks in advance.

    #2
    Hello nicbizz,

    That may be due to the code you are using in the strategy. I would suggest trying a simple test like the samplemacrossover and see if you can note a considerable difference. If not the code in your script is likely causing that. you can comment out your code to test different setups to see what is using the memory.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello nicbizz,

      What about "Keep best # results" parameter. Default is 10.

      Given the number iterations your testing, reducing this parameter
      usually makes a dramatic impact on RAM, wall clock processing time.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by TrippTraders, Yesterday, 07:14 PM
      1 response
      12 views
      0 likes
      Last Post brucerobinson  
      Started by decosenty, Yesterday, 11:33 PM
      0 responses
      9 views
      0 likes
      Last Post decosenty  
      Started by RicharBarrio, Yesterday, 11:26 PM
      0 responses
      7 views
      0 likes
      Last Post RicharBarrio  
      Started by paulo_br, 09-13-2024, 08:41 AM
      8 responses
      1,155 views
      0 likes
      Last Post AppleID25  
      Started by mno_om, Yesterday, 08:44 PM
      0 responses
      11 views
      0 likes
      Last Post mno_om
      by mno_om
       
      Working...
      X