Artificial Intelligence, Finance, Reinforcement Learning, Data Science, Innovation.
"low", "close", "adjusted_close", "volume"]] ) self.df["short_ma"] = self.df["adjusted_close"].rolling(window=50).mean() self.df["long_ma"] = self.df["adjusted_close"].rolling(window=200).mean() self.reset() def reset(self): self.balance = self.initial_balance self.position = 0