Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Walk forward optimization

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

    Walk forward optimization

    What settings would I need to use for in and out period if I want to perform a walk-forward optimization over a 15 year period using 3 years in sample 1 year out of sample and starting on 1/1 ending 12/31?

    i.e.

    1/1/2000 - 12/31/2002 in sample
    1/1/2003 - 12/31/2003 out sample

    1/1/2001 - 12/31/2003 in sample
    1/1/2004 - 12/31/2004 out sample​

    1/1/2002 - 12/31/2004 in sample
    1/1/2005 - 12/31/2004 out sample​

    etc

    #2
    Hello rodriguesdanny,

    Thank you for your post.

    If you want an in sample (Optimization) period of 3 years and 1 year test period you would have to set those settings accordingly in days.



    Please let us know if you have any further questions.

    Comment


      #3

      The issue with this approach is that when there is a leap year it throws off the start and end date. Here is a quick example I put together.

      The parameters are as follows:

      1/1/2008 - 9/26/2024
      In sample: 1095 (365 x 3)
      Out sample: 365



      Click image for larger version

Name:	dates.jpg
Views:	57
Size:	15.4 KB
ID:	1319997

      Comment


        #4
        Hello,

        Unfortunately, the Strategy Analyzer isn't going to be able to dynamically tell when to decrease or increase the Days based on whether or not is a leap year.

        You may consider breaking up your tests into several different tests to account for any years that have a leap year.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        42 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        29 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        46 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Working...
        X