def compute(self, today, assets, out, lows, highs): wl = self.window_length high_date_index = nanargmax(highs, axis=0) low_date_index = nanargmin(lows, axis=0) evaluate( '(100 * high_date_index) / (wl - 1)', local_dict={ 'high_date_index': high_date_index, 'wl': wl, }, out=out.up, ) evaluate( '(100 * low_date_index) / (wl - 1)', local_dict={ 'low_date_index': low_date_index, 'wl': wl, }, out=out.down, )
def compute(self, today, assets, out, lows, highs): wl = self.window_length high_date_index = nanargmax(highs, axis=0) low_date_index = nanargmin(lows, axis=0) evaluate( '(100 * high_date_index) / (wl - 1)', local_dict={ 'high_date_index': high_date_index, 'wl': wl, }, out=out.up, ) evaluate( '(100 * low_date_index) / (wl - 1)', local_dict={ 'low_date_index': low_date_index, 'wl': wl, }, out=out.down, )
def compute(self, today, assets, out, lows, highs): wl = self.window_length high_date_index = nanargmax(highs, axis=0) low_date_index = nanargmin(lows, axis=0) evaluate( "(100 * high_date_index) / (wl - 1)", local_dict={ "high_date_index": high_date_index, "wl": wl, }, out=out.up, ) evaluate( "(100 * low_date_index) / (wl - 1)", local_dict={ "low_date_index": low_date_index, "wl": wl, }, out=out.down, )