class_docstr: A stock trading environment for OpenAI gym
class_docstr_tok: ["A","stock","trading","environment","for","OpenAI","gym"]
code: def reset(
      self,
      *,
      seed=None,
      options=None,
  ):
      # initiate state
      self.day = 0
      self.data = self.df.loc[self.day, :]
      self.state = self._initiate_state()
  
      if self.initial:
          self.asset_memory = [
              self.initial_amount
              + np.sum(
                  np.array(self.num_stock_shares)
                  * np.array(self.state[1 : 1 + self.stock_dim])
              )
          ]
      else:
          previous_total_asset = self.previous_state[0] + sum(
              np.array(self.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.turbulence = 0
      self.cost = 0
      self.trades = 0
      self.terminal = False
      # self.iteration=self.iteration
      self.rewards_memory = []
      self.actions_memory = []
      self.date_memory = [self._get_date()]
  
      self.episode += 1
  
      return self.state, {}
  
imports: from __future__ import annotations
  from typing import List
  import gymnasium
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import pandas
  from gymnasium import spaces
  from gymnasium.utils import seeding
  from stable_baselines3.common.vec_env import DummyVecEnv
label_desc: Use image node_id 6 for calling the StockTradingEnv obj's underlying member method code with example usage: obj.reset() and returns: self,  dict