Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about backgtesting with tick data and rollover dates and merges

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

    Question about backgtesting with tick data and rollover dates and merges

    I've downloaded tick data data for CL and MCL from The Intentional Trader and I am hoping someone can help me gain a deeper understanding of NinjaTrader's merge policy for tick data or point me to some documentation.

    Does the merge policy simply merge contracts on each rollover date or is there more to it? I'm more curious about overlapping contract data than the difference between merge back-adjusted vs non-back-adjusted (although I don't mind hearing about that too as I'm sure I will learn something new).

    What prompts my question is that The Intentional Trader has some contracts with 3-4 months of overlapping data instead of just the 30 days of the active contract and I was curious about how one might use that if at all. How would Ninjatrader use (or ignore) that extra data when merging? Should I be extra careful and mind rollover dates when downloading?

    Also sometimes I found I was getting different results in backtesting if I specified the current contract and relied on the merge policy vs if I specified the particular contract for the dates I was testing... Say by using CL & MCL 02-23 for testing Jan 01-Jan 20, 2023 instead of using the current contract 09-23.

    Thanks in advance!
    Mark
    Last edited by markdshark; 08-08-2023, 04:27 PM.

    #2
    Hello markdshark,

    Thank you for your post.

    Overlapping data will not affect how data is merged. The different merge policy options are explained in the help guide here:If you select MergeBackAdjusted, what you would see is on the date of the rollover (configured in the instrument settings) between two contract months, the data will appear to be seamlessly merged because an offset value is applied to connect the last price point of the previous contract with the first price point of the next contract. If you select MergeNonBackAdjusted, there could be gaps in data on the rollover dates because it will simply go from the last price point of the previous contract to the first price point of the next contract with no offset applied. You can see the difference in the two screenshots on the help guide page, or you could test this yourself by loading data both with back adjusted data and without back adjusted data. Finally, if you select DoNotMerge, only data from the selected expiry will be shown. If you wanted to see all data from a contract, this is how you could see it including overlapping data. You could toggle between one contract, the contract before it, and the contract after it, and you would likely see price points for several of the same dates between those contracts considering there is overlapping data. For example, you could review the Crude Oil Futures (CL) calendar on the publicly available CME website here:


    Notice how there is a lot of overlap between the First Trade and Last Trade dates across the different contract months.

    Backtests in the Strategy Analyzer will follow the merge policy set up at Control Center > Tools > Options > Market Data > Merge Policy. Results could differ based on what front month you select in your backtest settings as well as which merge policy you have selected.

    Please let us know if we may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    57 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    75 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    39 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    101 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X