Beispiel #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
Beispiel #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
Beispiel #3
0
 def _execution_price(self, data_handler: DataHandler) -> float:
     if self.executed_price is None:
         fixings = data_handler.get_data_range(self.window.start,
                                               self.window.end,
                                               self.instrument,
                                               ValuationFixingType.PRICE)
         self.executed_price = np.mean(fixings)
     return self.executed_price
Beispiel #4
0
 def execution_price(self, data_handler: DataHandler) -> float:
     fixings = data_handler.get_data_range(self.window.start,
                                           self.window.end, self.instrument,
                                           ValuationFixingType.PRICE)
     return np.mean(fixings)