Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimization in Strategy Analyzer

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

    Optimization in Strategy Analyzer

    When in optimization mode in Strategy Analyzer, does it utilize the NinjaScript Output window as backtesting does?

    #2
    Hello connorgrant5, thanks for your question.

    Yes, the Print method will work the same in the strategy analyzer. You can use Print statements in an optimization to find out what iteration stage the analyzer is on by printing out the public properties. They should be different on every optimization iteration.

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Are there instances where the Optimization mode in Strategy Analyzer can take weeks or longer with complex strategies? Ever any lockup issues? I have a very fast computer.

      Comment


        #4
        Hi connorgrant5, thanks for your reply.

        There will be a performance issue if the script is printing too many times. You can prove if a strategy will complete an optimization by setting a small time frame to run over and selecting only one variable to optimize. Also, try commenting out the prints to see if performance improves.

        Kind regards.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          I have a somewhat complex strategy that I am optimizing. It does not appear to be frozen but wonder if the Iteration number should be changing as it has not changed since started a week ago? See image. CPU is at 29% and Memory at 39% so those look good. I have a very fast system.

          Comment


            #6
            It's very likely not doing anything otherwise the iterations counter would increase and your mem & cpu consumption wouldn't be so low. Running several quadrillion iterations is a bit ambitious,

            Assuming no errors occur and a performance of 1000 iterations per second, 1 quadrillion iterations would take several thousand years to complete.
            Last edited by MojoJojo; 07-18-2020, 10:36 PM.

            Comment


              #7
              Would a one million using Genetic Algorithm rather than the default be more realistic? Are 1000 iterations per second a guess or pretty accurate?

              Comment


                #8
                Time per iteration depends on efficiency/complexity of the strategy, test start & end date, bars period(number of bars) and general performance of the computer. 1000/s is quite a lot but I do get several 100 per second for certain combinations. It's best to run a small test for a configuration to get an idea.

                I don't know much about genetic algorithms, the default genetic optimizer in NT only goes through a very limited amount of generations(125 or something).

                Comment


                  #9
                  Does this Iteration number look doable? I know there are other factors but just in terms of Iteration. See attached -thanks.

                  Comment


                    #10
                    125 iterations shouldn't be a big deal, but NT doesn't start the testing. I suspect that it can't load the data because if there was an error it would just abort the test, but there could be other reasons.

                    If the strategy is added to a chart, configured to run on a sim account and enabled and you are seeing trade markers, there is something wrong with the optimization.

                    The genetic optimizer can be rewritten in a way to allow for more generations, the standard implementation would be more useful if it allowed for customization.

                    Comment


                      #11
                      Hi connorgrant5,

                      Try using the most current ES contract: ES 09-20. Also, make sure you are connected to a data provider that supplies historical data. If that does not work I will need to know every setting of the strategy analyzer that you are using so I can run a test on my PC.

                      I look forward to hearing from you.
                      Chris L.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by kempotrader, Today, 08:56 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post kempotrader  
                      Started by kempotrader, Today, 08:54 AM
                      0 responses
                      4 views
                      0 likes
                      Last Post kempotrader  
                      Started by mmenigma, Today, 08:54 AM
                      0 responses
                      2 views
                      0 likes
                      Last Post mmenigma  
                      Started by halgo_boulder, Today, 08:44 AM
                      0 responses
                      1 view
                      0 likes
                      Last Post halgo_boulder  
                      Started by drewski1980, Today, 08:24 AM
                      0 responses
                      4 views
                      0 likes
                      Last Post drewski1980  
                      Working...
                      X