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

Strategy optimization and the 0 trades plague

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

    Strategy optimization and the 0 trades plague

    Hello,

    I apologize if this has been asked and answered before.
    i did a search and after several pages of results didn’t find anything similar to my question.

    When you optimize a strategy by one of the parameters where “lower is better”, then the results get plagued by settings which produce 0 trades. The reason being that no trade has a better MAE than even a 99.99% profitable trade.

    So unless I greatly increase the “Keep best # results” setting, I end up with a list of 10 different parameters with zero trades. Unfortunately, increasing that value seems to have a heavy toll on the speed of the optimization. I suppose this is caused due to having to constantly sort so many results.

    My question is, is there some way to tell the strategy optimizer that it should ignore an iteration/result if it produced 0 trades?

    If the iterations with 0 trades are kept out of the pool, then they won’t taint the results.

    I hope my explanation is understandable. If not, please feel free to ask.

    #2
    Hello Merkor,

    There is not a way to ignore 0 trades as an option of the analyzer. If your strategy produces 0 trades that is the result of the test and that would be what the analyzer displays as a result. The only way to change the results would be if you created your own optimization fitness which would determine how the results are filtered.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello,

      Thank you for your reply.

      Could you please explain to do this?
      ”…if you created your own optimization fitness”

      Comment


        #4
        Originally posted by NinjaTrader_Jesse View Post
        Hello Merkor,

        There is not a way to ignore 0 trades as an option of the analyzer. If your strategy produces 0 trades that is the result of the test and that would be what the analyzer displays as a result.
        Additionally, I'm not sure if my explanation was understood.
        Any test can produce results with 0 trades. However, if the criteria being optimized is one where a number 0 is a perfect outcome (for example with MAE), then the results with 0 trades will push out all the other useful results.
        This is a shortcoming of NinjaTrader as there should be a way to filter out results which never produced any trades.

        Comment


          #5
          Hello Merkor,

          You can review how the existing optimization fitness scripts are coded by using the NinjaScript editor. Optimization fitness is how you can change the results of an optimization, you could return a value in the fitness based on the strategies performance.

          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by lightsun47, Today, 03:51 PM
          0 responses
          4 views
          0 likes
          Last Post lightsun47  
          Started by 00nevest, Today, 02:27 PM
          1 response
          8 views
          0 likes
          Last Post 00nevest  
          Started by futtrader, 04-21-2024, 01:50 AM
          4 responses
          44 views
          0 likes
          Last Post futtrader  
          Started by Option Whisperer, Today, 09:55 AM
          1 response
          13 views
          0 likes
          Last Post bltdavid  
          Started by port119, Today, 02:43 PM
          0 responses
          8 views
          0 likes
          Last Post port119
          by port119
           
          Working...
          X