Source code for mlthon.instruments.future

from mlthon.instruments.instrument import Instrument
import datetime


[docs]class Future(Instrument): def __init__(self, underlying_ins_id: int = None, expiration_date_utc: datetime.date = None, settlement_method: str = None, **kwargs): """ Parameters ---------- underlying_ins_id: int underlying instrument ID. expiration_date_utc: datetime.date expiration date (in UTC) of this future. settlement_method: str settlement method for this future. kwargs: dict the arguments for base class Instrument """ super(Future, self).__init__(**kwargs) # initialize its base class with the other named arguments self.underlying_ins_id_ = underlying_ins_id self.expiration_date_utc_ = expiration_date_utc self.settlement_method_ = settlement_method
[docs] def get_underlying_ins_id(self): return self.underlying_ins_id_
[docs] def get_expiration_date_utc(self): return self.expiration_date_utc_
[docs] def get_settlement_method(self): return self.settlement_method_