Backends.Contract¶
Classes
Contract(index_name: str, ...) |
Container class representing the notion of a futures contract. |
date |
date(year, month, day) –> date object |
-
class
Backends.Contract.Contract(index_name: str, contract_date: datetime.date)[source]¶ Container class representing the notion of a futures contract.
Parameters: index_name : str
Name of the index.
contract_date : date
Maturity of the future contract.
Examples
>>> from datetime import date >>> from Backends.Contract import Contract >>> contract = Contract("WTI", date(2017,12,1)) >>> print(contract) Contract: WTI Dec-17
Attributes
contract_dateindex_name