Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Keep best # results in Walk Forward Optimalisation

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

    Keep best # results in Walk Forward Optimalisation

    Hi,

    Just a question I can't seem to find the answer to.
    I made a simple SMA strategy in the builder.
    I am doing a walk forward optimalisation on the past 1 day and using the settings on the next day. (see attached screenshot)
    If I increase the Keep best # results the profit increases.
    How is that possible when it should always take the best 1 result?

    Thanks!

    John


    #2
    Hello John,

    Thanks for your post.

    Keep number of best results is saved for each optimization period.

    You can right click on instance in the Results Grid and select View Optimization results to see the individual optimization period tests and the test period test that uses the best parameters from the optimization period.

    In the screenshot attached, we can see the test period parameters for 1/3/2020 were chosen from the optimization period from 1/2/2020. I had added an End Date column to my Strategy Analyzer's Results Grid (right Click > Properties) to be able to quickly differentiate the test period from optimization period.

    Understanding Walk Forward results - https://ninjatrader.com/support/help...ForwardResults

    We look forward to assisting.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      That's not quite what I was asking, but I think I found the answer.
      If there are multiple optimization results with the same outcome, Ninjatrader will just pick one.
      But a different setting means a different result, so I can see the logic in that.
      I will change my strategy to address this.

      Comment


        #4
        If I do a walk forward optimization on the past 1 day and use the setting on the next day, the Monday is always a problem.
        Apparently it will optimize on the Sunday with no data there.
        All the different setting will have the same outcome, zero.
        Hence it will just take a random setting and use it for the Monday. (see screenshot)

        Is there any way around this?

        Comment


          #5
          Hello DrummerBoy,

          If we have a trading day where 0 trades get calculated, then the Walk Forward Optimization will have to use some parameters, as you see.

          You could consider modifying a Trading Hours template to filter the days in which the strategy trades so you can exclude Sunday from the backtest/optimization. Trading Hours templates can be created and modified in the Control Center under Tools > Trading Hours. I recommend making a copy if you want to make custom modifications.

          Working With Trading Hours templates - https://ninjatrader.com/support/help...ding_hours.htm
          JimNinjaTrader Customer Service

          Comment


            #6
            Hi Jim,

            That doesn't seem to work, the optimizer will still run on Saturday and Sunday.
            If I want the optimized setting of Friday to run on Monday then the weekend would have to be removed from the optimizer completely.
            I can exclude the Monday in Trading hours, but that's not what I want.
            Maybe a '1 on 1' optimization just can't be done?

            Comment


              #7
              Hello DrummerBoy,

              I wouldn't have any other suggestions for filtering days in the optimization other than modifying the Trading Hours template.

              We could consider submitting an enhancement request to consider making this possible in a newer version of NinjaTrader. As I follow, what would be preferred would be to use a previous optimization period if the current optimization period does not generate trades.

              If you agree this is what you would be interested in, please let me know and I will be happy to submit the idea for consideration. If not, I'll be happy to submit a request for another sort of enhancement.

              Please be aware, we receive many feature/enhancement requests and cannot offer any sort of ETA or promise of fulfillment. The idea would be tracked internally when additional features are considered, though.

              We look forward to assisting.

              JimNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by ScottWalsh, Today, 06:52 PM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by ScottW, Today, 06:09 PM
              1 response
              4 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by ftsc2022, 10-25-2022, 12:03 PM
              5 responses
              256 views
              0 likes
              Last Post KeyonMatthews  
              Started by Board game geek, 10-29-2023, 12:00 PM
              14 responses
              244 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Waxavi, 04-19-2024, 02:10 AM
              4 responses
              56 views
              0 likes
              Last Post sonia0101  
              Working...
              X