Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy backtesting and rollover dates

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

    Strategy backtesting and rollover dates

    im doing a lot of backtesting on few strategies that all use different orderflow setups.
    But when i backtest for November until now - the preformance is then a lot different - when using ES-03-21 - VS ES-12-20.

    Im using 2000 ticks data series - so I can understand why this is - but then when using the 03-21 - it performs different even from beginnning november.. but I would assume that it would change only from 01.12?

    = i would assume that using ES 03-21 was basicly starting at 01.12?

    I can see this is not the case - but does this mean that for my performance to be better - i should not trade during the rollowver datest? and can you say anythign about how long that periode is?

    Thanks.

    #2
    So a simplified version of above question: What decides which contract is used - at what point for backtesting?.
    So when i choose ES 03-21 - but backtesting for a year - at which dates does it change to using all the previous 3, 6, 9 month contracts? - is it using the new one as soon as it is avilabel ?
    So 12. month is starting 1. november ? or ealier?

    Comment


      #3
      Hello KarstenKafl,

      The Merge policy and Rollover dates control which historical data loads.

      Below are links to forum posts on this.

      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thank you Chelsea

        Unfortunately now im very confused about what result im seeing + it really messes up all things.

        In the posts you say: “Then reload the historical data by right-clicking the chart -> select Reload All Historical Data.”

        Is this done automatically when doing backtesting in analyzer?
        I find it very confusing that it now also created a new folders named ##-## - because I now changed the added day series that I use in strategy – to ##-## instead of the 12-20.
        So again – I assume this means that when I try out the different merge settings then I will have to reload all historical data for both the ##-## and the 03-21 and the ES 06-20 etc – so loading all these contracts on charts and reloading historical for all those? Or can I simply reload all once?

        Comment


          #5
          Hello KarstenKafl,

          If the merge policy is changed, I would recommend you open a chart to the instrument in quesion, using the same bar type, covering the same date range, and Reload All Historical Data.

          The data would need to be reloaded before running a backtest each time the merge policy is changed or a rollover date is changed so that the data can be corrected to the new merge policy setting.

          ##-## are continuous contracts that would not be affected by rollover dates, however continuous contracts cannot be traded in NinjaTrader. These would not be reloaded as the merge policy is not applied.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Hello again Chelsea

            You write that ##-## is not affected - sinse it is continues contract. Can you explain bit more about that? -
            The reason i ask is if i write ES ##-## in my strategies, or in the intrument field in a chart - i get the exact same performance as when writing ES 03-21 - at least after i load the data after setting rollover settings as i wish.

            So i had understanding that i could use ##-## in my strategy to be able to just run on the latest contract? - instead of editing the strategy constantly?

            Thanks.

            Comment


              #7
              Hello KarstenKafl,

              When using the proper front month (03-21) NinjaTrader uses the merge policy to load data based on the rollover dates.

              When using a continuous contract, NinjaTrader cannot apply the merge policy and data is loaded as is directly from the provider.

              You will not be able to trade continuous contracts. I recommend that you use the proper front month.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hi, dealing with a few issues in backtesting.

                1 - First is a gap in MES from april 2020 to september 2020. no matter the strategy, no trades are taken during that time. I have reloaded all historical data. merge policy is merge back adjusted. the data loads on a chart. what am I missing?

                2 - no trades taken from may 2019 to april 29 2020

                Comment


                  #9
                  Hello howardtrade,

                  Welcome to the NinjaTrader forums!

                  To confirm, there is data missing on a MES 03-21 chart with that date range, is this correct?

                  Who are you connected to for data?

                  What is the merge policy selected?


                  Regarding no trades being taken, enable TraceOrders and use prints to understand the behavior.

                  Print the time of the bar, and all values used in the condition that when true submits an order.

                  Below is a link to a forum post that demonstrates using prints to understand behavior.


                  Save the output to a text file and include this with your next post. I am happy to assist with analyzing the output from prints and TraceOrders.
                  Chelsea B.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by bortz, 11-06-2023, 08:04 AM
                  47 responses
                  1,606 views
                  0 likes
                  Last Post aligator  
                  Started by jaybedreamin, Today, 05:56 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post jaybedreamin  
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  13 views
                  0 likes
                  Last Post Javierw.ok  
                  Working...
                  X