FutureContract

class qf_lib.containers.futures.future_contract.FutureContract(ticker: qf_lib.common.tickers.tickers.Ticker, exp_date: datetime.datetime, data: qf_lib.containers.dataframe.prices_dataframe.PricesDataFrame)[source]

Bases: object

Class representing a single future contract.

The FutureContract is a simple class representing one futures contract. The FutureContract objects are used by the FuturesChain, in order to provide the contracts chaining possibilities. It requires 3 parameters: ticker, which is the symbol of the specific future contract (e.g. BloombergFutureTicker(“CTZ9 Comdty”)), expiration date of the contract and a PricesDataFrame, containing dates with price field values.

Parameters
  • ticker (Ticker) – symbol of the future contract

  • exp_date (datetime) – expiration date

  • data (PricesDataFrame) – data frame containing dates with price fields values