def reset(self):
    if self.initial:
        self.asset_memory = [self.initial_amount]
    else:
        previous_total_asset = (self.previous_state[0] + sum((np.array(self.previous_state[1:(self.stock_dim + 1)]) * np.array(self.previous_state[(self.stock_dim + 1):((self.stock_dim * 2) + 1)]))))
        self.asset_memory = [previous_total_asset]
    self.day = 0
    self.data = self.df.loc[self.day, :]
    self.turbulence = 0
    self.cost = 0
    self.trades = 0
    self.terminal = False
    self.rewards_memory = []
    self.actions_memory = []
    self.date_memory = [self._get_date()]
    self.state = self._initiate_state()
    self.episode += 1
    return self.state
def reset(self):
    if self.initial:
        self.asset_memory = [self.initial_amount]
    else:
        previous_total_asset = (self.previous_state[0] + sum((np.array(self.previous_state[1:(self.stock_dim + 1)]) * np.array(self.previous_state[(self.stock_dim + 1):((self.stock_dim * 2) + 1)]))))
        self.asset_memory = [previous_total_asset]
    self.day = 0
    self.data = self.df.loc[self.day, :]
    self.turbulence = 0
    self.cost = 0
    self.trades = 0
    self.terminal = False
    self.rewards_memory = []
    self.actions_memory = []
    self.date_memory = [self._get_date()]
    self.state = self._initiate_state()
    self.episode += 1
    return self.state