- Data Retrieval: Obtain historical futures data for each individual contract from a data source.
- Roll Date Detection: Determine the roll dates, which indicate when you should switch from
one contract to the next. Roll dates can be based on various criteria, such as
volume, open interest, or a specific calendar date.
- Price Adjustment: Apply price adjustments to account for the difference between the expiring contract
and the new one.
Common price adjustments include:
- Percentage Price Adjustment: Adjust prices based on the percentage change in the new contract's
settlement price compared to the old contract's settlement price.
- Price Ratio Adjustment: Adjust prices based on the ratio of the new contract's price to the
old contract's price.
- Dollar Value Adjustment: Adjust prices based on the change in dollar value between the two contracts.
- Combine Data: Combine the adjusted data from each individual contract to create a continuous price series.
Constructing continuous contracts is a non-trivial task and can be complex due
to variations in contract specifications, roll rules, and price adjustments for
different futures markets.
There are software libraries and tools available that
can assist in this process, such as QuantLib and the Python library
roll-contract-continuous.
Additionally, you may consider using dedicated data providers or services that offer continuous contract data to save you the effort
of manually constructing them. These services often provide accurate and
reliable continuous contract data for various futures markets.