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.



    JimNinjaTrader Customer Service

    Comment


      #3
      Thank you very much Jim

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by algospoke, Yesterday, 06:40 PM
      2 responses
      21 views
      0 likes
      Last Post algospoke  
      Started by ghoul, Today, 06:02 PM
      3 responses
      14 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      45 views
      0 likes
      Last Post jeronymite  
      Started by Barry Milan, Yesterday, 10:35 PM
      7 responses
      21 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by AttiM, 02-14-2024, 05:20 PM
      10 responses
      181 views
      0 likes
      Last Post jeronymite  
      Working...
      X