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:
    Find information for Crude Oil WTI Futures Overview provided by CME Group. View Overview.


    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 NullPointStrategies, Today, 05:17 AM
    0 responses
    50 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X