Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Lagging in the customed Genetic Optimizer

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

    Lagging in the customed Genetic Optimizer

    Hi NinjaTraders,

    In testing a genetic optimizer I coded. I experienced obvious lag in the last iteration. For example, when there are 592 iterations in total, the former 591 took 14 seconds, while it took more 40 seconds to complete the last iteration. I have attached the Log and Trace file here.

    Wondering why this is happening.
    Last edited by NinjaTrader_Jim; 07-22-2019, 08:43 AM.

    #2
    Hello wolfcurring,

    Thanks for your question.

    After every optimization, each optimization will need to be compared to see which iteration has the best performance. This comparison takes place at the end of the backtest and will take longer depending on how many iterations are in the optimization, and what you have set for Keep best # of results. It will be expected that there will be some extra computation time after the backtest completes to create the results grid.

    To protect any personal information that is included in your log and trace files, I have removed them from your post.

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      It is not too hard to understand what you mean. But the same thing does not happen upon the Default optimizer (brute force search) and the default Genetic Optimizer, only on my custom GeneticSharp Optimizer. So, am I missing anything on this? The extra time consumed on this comparison is quite extraordinary: 14 seconds to calculate and 40 seconds to do the ranking?

      Comment


        #4
        Hello wolfcurring,

        A longer time to create the results can be observed with the traditional Genetic Optimizer, however I am sure you are seeing a greater impact with the custom optimizer.

        To look into the performance difference seen there, I may suggest to profile your Optimizer to see where the CPU time is getting spent. This could be done by adding a timer to the script and noting times at the beginning and end of each method, or within a loop in the Optimizer.

        I won't be able to do the profiling for you, but if you would like to work with me closer on this topic and would be willing to share the source code, you could write in to platformsupport[at]ninjatrader[dot]com with the text "Attn Jim," a link to this thread, and the ticket ID 2219668. The ticket will then be assigned to me and I could answer any specific questions you have and could test to observe the same results.

        I look forward to being of further assistance.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by andrewtrades, Today, 04:57 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        6 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        7 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X