def _execution_price(self, data_handler: DataHandler) -> float: btic_fixings = data_handler.get_data_range(self.window.start, self.window.end, self.btic_instrument, ValuationFixingType.PRICE) btic_twap = np.mean(btic_fixings) close = data_handler.get_data(self.window.end.date(), self.instrument, ValuationFixingType.PRICE) return close + btic_twap
def _execution_price(self, data_handler: DataHandler) -> float: if self.executed_price is None: btic_fixings = data_handler.get_data_range(self.window.start, self.window.end, self.btic_instrument, ValuationFixingType.PRICE) btic_twap = np.mean(btic_fixings) close = data_handler.get_data(self.window.end.date(), self.future_underlying) self.executed_price = close + btic_twap return self.executed_price
def _execution_price(self, data_handler: DataHandler) -> float: return data_handler.get_data(self.execution_datetime, self.instrument, ValuationFixingType.PRICE)
def _execution_price(self, data_handler: DataHandler) -> float: if self.executed_price is None: self.executed_price = data_handler.get_data(self.execution_datetime, self.instrument, ValuationFixingType.PRICE) return self.executed_price