fix trading pair, loading scripts

This commit is contained in:
Oleg Sheynin
2025-07-20 18:11:45 +00:00
parent fb3dc68a1d
commit 28386cdf12
4 changed files with 15 additions and 5 deletions
+2 -2
View File
@@ -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: