FuturesAdjustmentMethod

class qf_lib.containers.futures.futures_adjustment_method.FuturesAdjustmentMethod(value)[source]

Bases: Enum

Method used to join the prices of different future contracts, belonging to one future chain.

Attributes:

BACK_ADJUSTED

BACK_ADJUST - the historical price discontinuities are corrected, so that they would align smoothly on the expiry date.

NTH_NEAREST

NTH_NEAREST - the price data for a certain period of time is taken from the N-th contract, there is no discontinuities correction at the contract expiry dates

BACK_ADJUSTED = 1

BACK_ADJUST - the historical price discontinuities are corrected, so that they would align smoothly on the expiry date. The gaps between consecutive contracts are being adjusted, by shifting the historical data by the difference between the Open price on the first day of new contract and Close price on the last day of the old contract. The back adjustment considers only the Open, High, Low, Close price values. The Volumes are not being adjusted.

NTH_NEAREST = (0,)

NTH_NEAREST - the price data for a certain period of time is taken from the N-th contract, there is no discontinuities correction at the contract expiry dates