• 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

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 nctpar, Yesterday, 02:13 PM
                      1 response
                      14 views
                      0 likes
                      Last Post NinjaTrader_ChrisSch  
                      Started by webus, Today, 12:02 AM
                      0 responses
                      5 views
                      0 likes
                      Last Post webus
                      by webus
                       
                      Started by jeronymite, Yesterday, 09:26 PM
                      0 responses
                      11 views
                      0 likes
                      Last Post jeronymite  
                      Started by ttodua, 08-08-2020, 06:45 AM
                      2 responses
                      17 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by franco12364, Yesterday, 08:08 PM
                      2 responses
                      11 views
                      0 likes
                      Last Post franco12364  
                      Working...
                      X