• 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

Strategy Analyzer's 'Analysis' page freezes after optimization

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

    Strategy Analyzer's 'Analysis' page freezes after optimization

    Dear NinjaTrader team,

    I am seeing some issues with slightly more demanding optimizations. When I switch from the Summary page to the Analysis page after a completed optimization, the Strategy Analyzer freezes.

    I have attached a sample project showing this behavior while not doing anything useful. There are lots of comments in there how to reproduce the issue.


    Thank you,
    best regards, Felix
    Attached Files

    #2
    Hello ,

    For reference I am pasting the steps you gave us here in a quote on the forums.


    Steps to reproduce: 1) New Strategy Analyzer
    - Backtest type: Optimization
    - Strategy: issueOptimizer
    - Strategy parameters: PF drawdown curve = 7;8;1
    - Instrument: ^SP500
    - Type: Day
    - Value: 1
    - Start date: 01/01/2012
    - End date: 10/26/2016
    2) Click Run. This should take about 40 seconds to complete
    3) Switch to Analysis page
    while there will be meaningful content shown, the CPU load
    will go to 100% and never complete. NinjaTrader will eventually
    stop responding. Memory usage increases overe time.
    So we can narrow down the cause of this behavior, I would like to ask if you can replace step 1 by

    1) New Strategy Analyzer
    - Backtest type: Optimization
    - Strategy: SampleMACrossover
    - Strategy parameters: Slow : 30, Fast : 5
    - Instrument: ^SP500
    - Type: Day
    - Value: 1
    - Start date: 01/01/2012
    - End date: 10/26/2016
    Please let us know whether you receive a similar lock-up.

    Please also reproduce a lock-up, then send your event viewer log if NinjaTrader crashes (you may review post #6 here, http://ninjatrader.com/support/forum...ad.php?t=90367 , for instructions on retrieving these), or your most recent log and trace files from (My) Documents\NinjaTrader 8. Please send these to platformsupport[at]ninjatrader[dot]com , referencing attn:ninjatrader_jessicap and 1595376 in the subject line of your e-mail.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hi Jessica,

      thanks a lot for your swift response on a Sunday. To answer your questions:
      * I cannot reproduce the behavior with Sample MA crossover.
      * I have sent the log & trace files directly from NinjaTrader. Please note that NinjaTrader is still limping along for a moment when the described problem happens, it's just that Strategy Analyzer window that becomes unresponsive immediatly.
      * I have attached the reports from the event viewer.
      * I have also attached a screenshot from the task manager. Note how NinjaTrader was using up all memory and all CPU.

      Please let me know if there is anything else I can do to help.


      Thank you,
      best regards, Felix
      Attached Files

      Comment


        #4
        Thank you for this additional information, fbertram. The event viewer tells us that you experienced an application hang, likely while NinjaTrader required a lot of memory to optimize over the S&P 500 list. This tells us that we will need to take a different approach toward optimizing your strategy, since it contains logic that the strategy analyzer can not optimize using your system's available resources with the instruments and settings you have selected.

        I would like to make the following suggestions. I would like to recommend selecting one or two suggestions at a time to try, until you end up with an optimization your system can handle that also suits your trading needs.

        • Out of the S&P 500, select a few representative instruments
        • Consider using the Genetic optimizer rather than the Default optimizer
        • Use a shorter time interval
        • Increase your interval value, e.g. to 2 to 7 days at a time
        • If you are using high fill resolution, consider using standard fill resolution
        • If your strategy does not require it, consider turning off Tick Replay
        • Check Break at EOD
        • Ensure your Maximum Bars Lookback is set to 256
        • Reduce your Keep Best # Results setting
        • If using the Genetic Optimizer, keep your generation size to 25 or below

        If you have tried several of these and your system is still unable to optimize your strategy, consider first manually testing several strategy settings with the Playback Connection, http://ninjatrader.com/support/helpG...connection.htm , and if your strategy is still underperforming in playback or using a large percentage of your system's resources, you may need to refactor your strategy. The refactoring process will involve finding sections of code you can write equivalent functionality for, or sections you can remove, then testing in the playback connection, until your strategy performs swiftly and without taxing your systems resources.


        We are happy to help in any way we can.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Hi Jessica,
          Thanks a lot for your response. I beg to disagree with your conclusion. Ninjatrader actually completes the optimization just fine on my machine. I can see the result and save the grid, memory is not the issue here. The problem occurs after the simulation finished and when I try to view the analysis. It seems that the analysis page is actually more demanding than the optimization. I would kindly ask you to see if there is anything bad happening there, I am happy to provide additional information.

          Thank you,
          Best regards

          Felix

          Comment


            #6
            Thank you for this additional information, it helped me clear up some misunderstandings I had about the situation.

            I will investigate this and return with my findings.
            Jessica P.NinjaTrader Customer Service

            Comment


              #7
              Hi Jessica,

              I have attached a screenshot here, showing how both CPU and memory use go through the roof after optimization is finished and I switched to the Strategy Analyzer's 'Analysis' page.

              With the Analysis page open, memory consumption climbs up over time, and the memory allocated seems to be significantly more than what the optimization required.


              Hope this helps,
              best regards, Felix
              Attached Files

              Comment


                #8
                Hello fbertram, and thank you for your report.


                This behavior was confirmed on our end. We will be investigating this further. Please keep an eye on the NinjaTrader 8 Release Notes page for updates and bugfixes.


                http://ninjatrader.com/support/helpG...ease_notes.htm


                Tracking ID: QA-2349
                Jessica P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by swcooke, Today, 02:01 PM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by guidoisot, Today, 01:11 PM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_PatrickG  
                Started by martyn73, Today, 12:26 PM
                0 responses
                11 views
                0 likes
                Last Post martyn73  
                Started by uday12, Today, 09:45 AM
                0 responses
                9 views
                0 likes
                Last Post uday12
                by uday12
                 
                Started by uday12, Today, 08:25 AM
                3 responses
                20 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X