Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Walk Forward Optimization

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

    Walk Forward Optimization

    I have been working on a strategy that is more profitable in walk forward optimization that fixed period optimization. Is there a way to include the "test period" and "optimization period" in the walk forward optimization?

    To clarify, is there a way to optimize the "test period" and "optimization period" while performing walk forward optimization?

    Thanks,
    eleven
    Last edited by eleven; 12-12-2010, 11:54 PM.

    #2
    Hello eleven,

    Unfortunately I am not sure if I follow. A walk-forward test will include a 'test' and 'optimization' period. The optimization period will be used to optimize your strategy. Subsequently the strategy will be backtested as per the optimized parameters for the test period. More information can be found at the link below.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Thanks for the response.

      I see another problem when performing walk forward analysis. Please see if you can repeat on your end. Perform walk forward analysis on ES with the SampleMACrossOver with the following parameters:
      session: default 24/7
      time period: 30min
      optimize on: max net profit
      fast: 10-20
      slow: 25-35
      optimization period: 10 day
      test period: 1 day

      I get repeat trades and unrealistic net profit. It looks like the test period is more than one day and many trades are counted more than once.

      Thanks,
      eleven
      Last edited by eleven; 12-14-2010, 12:42 AM.

      Comment


        #4
        Can you please tell me what From and To dates you selected. Did you use the ES 12-10 or 03-11? Perhaps you can post a screenshot of all walk forward settings, so I can perform the exact same test.

        In addition, please tell me to what data feed you connect in NinjaTrader.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Jason,

          I used the continuous contract ES ##-## from 1/1/10 - 6/1/10 in this example. From what I experienced any test period exhibits the same behavior. Here are the pictures of the WFO settings I used.

          I'm using IQFeed data source.

          eleven
          Attached Files
          Last edited by eleven; 12-14-2010, 09:13 PM.

          Comment


            #6
            Hello eleven,

            When I perform the walkforward test on my end, I do not notice anything incorrect. Can you please tell me what is exactly incorrect on your end.

            Please note that the 'Walk forward' tab will display many rows. Each row represents 1 day. From 1/11/2010 up to 5/31/2010. You used an optimization period of 10 days (1/1/2010 - 1/10/2010). Subsequently each day after 1/10/2010 will be reflected in the 'Walk forward' tab.
            JasonNinjaTrader Customer Service

            Comment


              #7
              eleven,

              Behaviour of WFO is that in any test period length (1 day test period has the most effect of this) there are potentially (re: very likely) a day before and a day after included in the trades result. I personally have not been able to locate a workaround except to manually filter out those trades.

              Comment


                #8
                Jon,

                Thanks for weighing in on this. Something isn't right. I suspect it has to do when you perform WFO with a 24 hour session (midnight to midnight) and can be complicated by time zones. I'm even getting WFO trades on Saturdays when the market is closed. I am going to post some more pictures of what I see later today.

                eleven

                Comment


                  #9
                  Even professionally made strategies have to compensate for time zones ... its all because we dont live on a flat world

                  Comment


                    #10
                    Jason,

                    In my test WFO settings above, the SampleMACrossOver netted ~$47k in a six month span (pic2). This is not real. You mentioned that you didn't notice anything incorrect. I am curious if you saw net profit in the $47k ballpark when you performed the test.

                    I looked into this further and figured out the problem. The first picture below (session1), which are the default settings for 24/5 produces erroneous results. The modified settings in picture two (session2) produces real results. Even though I'm cutting the session a minute short, it appears to be a work around.

                    eleven
                    Attached Files

                    Comment


                      #11
                      Hello eleven,

                      I see. Unfortunately you experienced a known limitation. When running walk forward tests with the Default 24/5 session template (or other templates that cross multiple days), each walk forward period may double count trades on "transition dates".

                      For example:

                      First period runs from 11/15/2010 - 11/20/2010. Second period runs from 11/21/2010 - 11/26/2010.

                      The first periods will use trades from 11/14/2010 - 11/21/2010.

                      The second periods will use trades from 11/20/2010 - 11/27/2010.

                      You see that two dates are counted double - 11/20/2010 and 11/21/2010.

                      I see you already worked around the issue by modifying the session template so it does not cross multiple days.
                      JasonNinjaTrader Customer Service

                      Comment


                        #12
                        Jason,

                        Thanks for the explanation.

                        eleven

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by aussugardefender, Today, 01:07 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post aussugardefender  
                        Started by pvincent, 06-23-2022, 12:53 PM
                        14 responses
                        238 views
                        0 likes
                        Last Post Nyman
                        by Nyman
                         
                        Started by TraderG23, 12-08-2023, 07:56 AM
                        9 responses
                        384 views
                        1 like
                        Last Post Gavini
                        by Gavini
                         
                        Started by oviejo, Today, 12:28 AM
                        0 responses
                        4 views
                        0 likes
                        Last Post oviejo
                        by oviejo
                         
                        Started by pechtri, 06-22-2023, 02:31 AM
                        10 responses
                        125 views
                        0 likes
                        Last Post Leeroy_Jenkins  
                        Working...
                        X