code: def __init__(
      self,
      config,
      initial_account=1e6,
      gamma=0.99,
      turbulence_thresh=99,
      min_stock_rate=0.1,
      max_stock=1e2,
      initial_capital=1e6,
      buy_cost_pct=1e-3,
      sell_cost_pct=1e-3,
      reward_scaling=2**-11,
      initial_stocks=None,
  ):
      price_ary = config["price_array"]
      tech_ary = config["tech_array"]
      turbulence_ary = config["turbulence_array"]
      if_train = config["if_train"]
      self.price_ary = price_ary.astype(np.float32)
      self.tech_ary = tech_ary.astype(np.float32)
      self.turbulence_ary = turbulence_ary
  
      self.tech_ary = self.tech_ary * 2**-7
      self.turbulence_bool = (
          turbulence_ary > turbulence_thresh
      ).astype(np.float32)
      self.turbulence_ary = (
          self.sigmoid_sign(turbulence_ary, turbulence_thresh) * 2**-5
      ).astype(np.float32)
  
      stock_dim = self.price_ary.shape[1]
      self.gamma = gamma
      self.max_stock = max_stock
      self.min_stock_rate = min_stock_rate
      self.buy_cost_pct = buy_cost_pct
      self.sell_cost_pct = sell_cost_pct
      self.reward_scaling = reward_scaling
      self.initial_capital = initial_capital
      self.initial_stocks = (
          np.zeros(stock_dim, dtype=np.float32)
          if initial_stocks is None
          else initial_stocks
      )
  
      # reset()
      self.day = None
      self.amount = None
      self.stocks = None
      self.total_asset = None
      self.gamma_reward = None
      self.initial_total_asset = None
  
      # environment information
      self.env_name = "StockEnv"
      # self.state_dim = 1 + 2 + 2 * stock_dim + self.tech_ary.shape[1]
      # # amount + (turbulence, turbulence_bool) + (price, stock) * stock_dim + tech_dim
      self.state_dim = 1 + 2 + 3 * stock_dim + self.tech_ary.shape[1]
      # amount + (turbulence, turbulence_bool) + (price, stock) * stock_dim + tech_dim
      self.stocks_cd = None
      self.action_dim = stock_dim
      self.max_step = self.price_ary.shape[0] - 1
      self.if_train = if_train
      self.if_discrete = False
      self.target_return = 10.0
      self.episode_return = 0.0
  
      self.observation_space = gym.spaces.Box(
          low=-3000,
          high=3000,
          shape=(self.state_dim,),
          dtype=np.float32,
      )
      self.action_space = gym.spaces.Box(
          low=-1, high=1, shape=(self.action_dim,), dtype=np.float32
      )
  
file_path: FinRL/finrl/meta/env_stock_trading/env_stocktrading_np.py
imports: from __future__ import annotations
  import gymnasium
  import numpy
  from numpy import random
label_desc: Use image node_id 1 to create a new StockTradingEnv object from inherited base classes: gym with example: obj = StockTradingEnv(config, initial_account, gamma, turbulence_thresh, min_stock_rate, max_stock, initial_capital, buy_cost_pct, sell_cost_pct, reward_scaling, initial_stocks)