Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Walk Forward and Optimization clarification needed

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

    Walk Forward and Optimization clarification needed

    Hello Ninjatrader Team,
    When I run Walk Forward with the settings Optimization Period (days) =1 and test period (days) =1 . I assume that it will optimized one day and test on the next day right? However When I look at the Trades in Ninjatrader I see that trades are executed on other days as well. Can someone clarify to me what is going on.

    I posted 2 pictures
    Attached Files

    #2
    Hi wallsteetking,

    Unfortunately this is a current limitation with walk forward tests.

    When running walk forwards with the FOREX session template (or similar), each walk forward period may double count trades on "transition" dates.

    Example scenario:
    First period is 1/29 to 2/25. Second period is 2/26 to 3/25.
    First period counts trades from 1/28 to 2/26.
    Second period counts trades from 2/25 to 3/26.

    There is an overlap of two days of 2/25 and 2/26 being double counted between each walk forward period.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      so how can I reproduce what ninjatrader is doing right now? Lets say I want to go live hypothetically on July 27,2012 trading the e-mini on 24-7 template. when would I optimize the data??( 12 midnight??? ) Do i optimize one day or 3 days. my goal is to be as close as possible to what ninjatrader is doing so that when I do go live I can have the same results.

      Comment


        #4
        Hello wallstreetking,

        Please note that you should expect differences when running a strategy in the Strategy Analyzer compared to running a strategy live on real-time data. Please see the link below for more information.


        You can optimize the strategy at the dates you like. When you perform a walkforward test, the strategy will be optimized on the first data set. Subsequently the strategy will run on the second data set using the optimized parameters. More information and a video can be found at the link below.
        JasonNinjaTrader Customer Service

        Comment


          #5
          "When running walk forwards with the FOREX session template (or similar), each walk forward period may double count trades on "transition" dates."

          Is it true that it depends on the session template? only happen on 24/7 session?

          Comment


            #6
            Hi millridge,
            Yes, this limitation with walk forward tests is only seen with session templates that cross midnight (begin on one day and end on another).
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_RyanM View Post
              Hi millridge,
              Yes, this limitation with walk forward tests is only seen with session templates that cross midnight (begin on one day and end on another).
              Hi Ryan, given your description of the limitation, I created a new session template which seems to solve it. Could you verify that this is a valid workaround to avoid overlapping trades in the walk forward results?

              The template goes from 12:00 AM to 11:59 PM on the same day for 7 days. My strategy requires a look-back across all trades all the time. If I need to 'exit on close' then I write the code into my strategy to handle it.



              Thanks -Dave

              Comment


                #8
                Dave,

                That looks like it would work. You would also want to set the time zone to your local time zone.
                Adam P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by AveryFlynn, Today, 04:57 AM
                0 responses
                3 views
                0 likes
                Last Post AveryFlynn  
                Started by RubenCazorla, 08-30-2022, 06:36 AM
                3 responses
                77 views
                0 likes
                Last Post PaulMohn  
                Started by f.saeidi, Yesterday, 12:14 PM
                9 responses
                23 views
                0 likes
                Last Post f.saeidi  
                Started by Tim-c, Today, 03:54 AM
                0 responses
                3 views
                0 likes
                Last Post Tim-c
                by Tim-c
                 
                Started by FrancisMorro, Today, 03:24 AM
                0 responses
                5 views
                0 likes
                Last Post FrancisMorro  
                Working...
                X