fix trading pair, loading scripts
This commit is contained in:
@@ -381,11 +381,11 @@ class TradingPair:
|
||||
instrument_sign = -1 if instrument_open_trades["action"].iloc[0] == "SELL" else 1
|
||||
instrument_price = predicted_row[f"{self.price_column_}_{symbol}"]
|
||||
instrument_return = instrument_sign * (instrument_price - instrument_open_trades["price"].iloc[0]) / instrument_open_trades["price"].iloc[0]
|
||||
return float(instrument_return)
|
||||
return float(instrument_return) * 100.0
|
||||
|
||||
instrument_a_return = _single_instrument_return(self.symbol_a_)
|
||||
instrument_b_return = _single_instrument_return(self.symbol_b_)
|
||||
return (instrument_a_return + instrument_b_return) * 100.0
|
||||
return (instrument_a_return + instrument_b_return)
|
||||
return 0.0
|
||||
|
||||
def __repr__(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user