Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical data import and expiration of futures contract. How to split

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

    Historical data import and expiration of futures contract. How to split

    Hi

    I want to run backtest with more historical data than IB currently provides. I got a CSV file containing several years of FDAX data and I would like to skip the cumbersome task of creating different files for the quarterly expirations of this future (instrument).

    I imported the file as FDAX.Last.txt but this created a new instrument which is most probably not linked to the FDAX futures expirations. So I wanted to try renaming the file as the first non available expiration instrument so that all imported history is in one single bucket (the older one).

    The questions I have regarding this procedure are:
    • Would Strategy tester run through all these historical data or do I need to do the split inevitably for each quarterly expiration?
    • Is there a better way to do this large historical file import for the same backtesting purpose?
    • Usually different expiration instruments have a couple of overlaping days of data. Should these overlapping days be "re-created" so that in the imported data they exist as well just like in IB synced data?
    Thanks

    Zulok

    #2
    Hello Zulok,

    Thanks for your question.

    Ultimately, the data would need to be split into the associated contract periods and split to be used regularly in the platform and have it properly mapped to the existing futures instrument. However, if you import the historical data into a new instrument and backtest that instrument, you can avoid having to split this up and still perform your backtest.

    When the data is imported, all of the data pulled in is associated with the instrument portion of the file name. This would include the instrument and expiry. This allows NinjaTrader to separate historical data from older/newer contract months when the majority of traders have not yet rolled over to the next contract month. NinjaTrader keeps the data split and builds bars/data series following the merge policy.

    Merge Policy - https://ninjatrader.com/support/help...rge_policy.htm

    To give a workaround, I would suggest creating a new instrument, import your data for it, and use the new instrument for backtesting. Instruments can be created in the Control Center under Tools > Instruments > add. Information on editing instrument definitions is included below.



    Let us know if there is anything else we can do to help.



    Comment


      #3
      Thank you very much Jim

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      44 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      65 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