def initialize(self): self.ptype = ProductType.Option prod_info = mysqlaccess.load_stockopt_info(self.name) self.exchange = prod_info['exch'] self.multiple = prod_info['lot_size'] self.tick_base = prod_info['tick_size'] self.strike = prod_info['strike'] self.otype = prod_info['otype'] self.underlying = prod_info['underlying'] self.product = self.underlying self.cont_mth = prod_info['cont_mth'] self.expiry = get_opt_expiry(self.underlying, self.cont_mth)
def initialize(self): self.ptype = ProductType.Option prod_info = mysqlaccess.load_stockopt_info(self.name) self.exchange = prod_info['exch'] self.multiple = prod_info['lot_size'] self.tick_base = prod_info['tick_size'] self.strike = prod_info['strike'] self.otype = prod_info['otype'] self.underlying = prod_info['underlying'] self.product = self.underlying self.cont_mth = prod_info['cont_mth'] self.expiry = get_opt_expiry(self.underlying, self.cont_mth) return