示例#1
0
    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
示例#2
0
 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
示例#3
0
 def _execution_price(self, data_handler: DataHandler) -> float:
     return data_handler.get_data(self.execution_datetime, self.instrument,
                                  ValuationFixingType.PRICE)
示例#4
0
 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