I have future contracts from 10 years back that are combined in one file. There is a gap in the data every month due to rolling of the contracts. How do I remove this gap ad get a smooth time series that I can perform backtesting on.


marked as duplicate by LocalVolatility, Bob Jansen Mar 1 '17 at 9:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ There are a few ways how synthetic continuous series are constructed from raw data of futures prices. Think of how you would actually trade, which contract you would buy/sell at which time, and that will determine how you construct or alter your series. $\endgroup$ – Richard Hardy Feb 28 '17 at 19:46
  • $\begingroup$ I will use moving averege strategies. $\endgroup$ – user2300940 Feb 28 '17 at 19:52
  • $\begingroup$ By the way, the gaps your are seeing in your data are (most likely) very real, while a continuous line you would like to have would be largely illusionary. $\endgroup$ – Richard Hardy Feb 28 '17 at 19:56
  • 2
    $\begingroup$ The synthetic continuous series is nontradable, so in this sense it is not real. The actual contracts that are tradable but they produce the gaps you are seeing. $\endgroup$ – Richard Hardy Feb 28 '17 at 20:02
  • 1
    $\begingroup$ The method(s) to solve it are found by searching for 'continuous futures contracts". $\endgroup$ – noob2 Feb 28 '17 at 20:10