Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Walk Forward Major Bug when doing 1day Optimize Period : 1day Test Period

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

    Walk Forward Major Bug when doing 1day Optimize Period : 1day Test Period

    Hello,
    I am currently designing a strategy in which I noticed that if I use a walk forward testing that would use a 1 day Optimize and 1 day Test Period, the backtesting does not function properly.

    I noticed that the session bugs and the Optimize period usually includes 2 days. On some occasions it is also done on part of the day for which the walk forward is being made...which practically distorts the data, beacause NT provides data that are presented as being out of the sample, but in reality...to a large extent they are also part of the backtest.

    This is a major problem for me...and for anyone that is developing a high frequency strategy.

    Can someone please advise on how to fix this?
    I am optimizing for ES Mini Futures Contracts with the default trading session.

    I myself am located in Europe (+2 GMT) timezone.

    I tested this on several computers...with different NT settings. All the time, the backtests associated with the 1 day WF include more than 1 day of test data.

    I did an experiment of changing the timzone of my pc to the same as the CME exchange CET and have change from default session of ES 03-15 to 24/5 session template.

    In that case, the backtesting was again wrong. It was taking again 2 days instead of 1 to optimize on. in this case the only improvement was that the 2nd day that the backtest was made, was not overlapping with the one from the forward test.



    Thank you.
    Last edited by nikolaalx; 02-09-2015, 01:21 PM.

    #2
    Hello,

    Thanks for post.

    NT7 requests data based on sessions in a calendar day, which means that the days back work off your local PC time. Your local PC time is then converted to exchange time and we request data for that entire day and filter out any out of session data via the session template. Where the bleed over can occur is if the time zone conversion from your time to the exchange time would push you over the 24 hour window into the next (or pervious) day day then NinjaTrader will request that entire additional day of data causing the additional data being added that you did not want.

    In NinjaTrader 8 we specifically changed this so that we request days back of data based on trading hour sessions back not calendar days back.

    You should be able to limit/work around the bleed through problem by setting your PC time zone to that of the exchange time zone and being sure to use a session template that would have not span across days such as an RTH template.

    Comment


      #3
      Hi,
      I have changed my time to CET and have chosen a 24/5 session template.

      If I understood correctly your advise, this should have fixed the problem.

      However right now, the "bleed" occurs on the backtest mode.

      For example:

      If I have

      1st Jan as a Backtest
      2nd Feb as Test Period

      The Backtest would include trades from 31st Ddec and 1st Jan and the Test period would be OK

      With this being said, I have the same time zone such as the exchange and have selected a session that begins and ends in 12:00 AM. Why is the bleeding still occuring.

      Shall I change the End to e.g. 11:45 PM ...and leave a 15 min gap between the two sessions just in case?

      Also, when is NT8 expected to be released?

      Thanks.

      Comment


        #4
        Please go to Control Center -> Tools -> Session Manager then select default 24/5 and make sure that the time zone for that session template is also CET. This is what will make sure no time zone offsetting is applied. That should do the trick, if it does not then let me know and I will personally test to find some settings that will work.

        NT8 core development is complete we are working on adding the polish to be able to ship. I don't have a release date in clear sight unfortunately though.

        Comment


          #5
          I did exactly this...and it only fixed the trades for the Forward Test period.

          The backtest still spills over 2 days (when it should be 1 day Backtest : 1 day Forward Test)

          Please advise.

          Originally posted by NinjaTrader_Brett View Post
          Please go to Control Center -> Tools -> Session Manager then select default 24/5 and make sure that the time zone for that session template is also CET. This is what will make sure no time zone offsetting is applied. That should do the trick, if it does not then let me know and I will personally test to find some settings that will work.

          NT8 core development is complete we are working on adding the polish to be able to ship. I don't have a release date in clear sight unfortunately though.

          Comment


            #6
            I tested on my side and saw the same, I then tested with the CME US Index Future RTH template and only saw a single day. I believe that the time stamp of 12:00AM ios causing the other day to be included. Try shaving off a minute of the session template or using the RTH template should do the trick to get you the range your looking for.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by judysamnt7, 03-13-2023, 09:11 AM
            4 responses
            57 views
            0 likes
            Last Post DynamicTest  
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            36 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            7 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            19 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            9 views
            0 likes
            Last Post cre8able  
            Working...
            X