Artificial Intelligence, Finance, Reinforcement Learning, Data Science, Innovation.
self.trade_summary = { "open_price": current_price, "open_step": self.current_step, } elif action == 2 and self.position == 1: # Sell profit = current_price - self.open_position_price reward = profit - abs(profit) * 0.01 self.balance += profit self.position = 0 trade_info = "sell"