code: def step(self, actions):
      actions = (actions * self.max_stock).astype(int)
  
      self.day += 1
      price = self.price_ary[self.day]
      self.stocks_cd += 1
  
      if self.turbulence_bool[self.day] == 0:
          min_action = int(
              self.max_stock * self.min_stock_rate
          )  # stock_cd
          for index in np.where(actions < -min_action)[
              0
          ]:  # sell_index:
              if price[index] > 0:  # Sell only if current asset is > 0
                  sell_num_shares = min(
                      self.stocks[index], -actions[index]
                  )
                  self.stocks[index] -= sell_num_shares
                  self.amount += (
                      price[index]
                      * sell_num_shares
                      * (1 - self.sell_cost_pct)
                  )
                  self.stocks_cd[index] = 0
          for index in np.where(actions > min_action)[0]:  # buy_index:
              if (
                  price[index] > 0
              ):  # Buy only if the price is > 0 (no missing data in this particular date)
                  buy_num_shares = min(
                      self.amount // price[index], actions[index]
                  )
                  self.stocks[index] += buy_num_shares
                  self.amount -= (
                      price[index]
                      * buy_num_shares
                      * (1 + self.buy_cost_pct)
                  )
                  self.stocks_cd[index] = 0
  
      else:  # sell all when turbulence
          self.amount += (self.stocks * price).sum() * (
              1 - self.sell_cost_pct
          )
          self.stocks[:] = 0
          self.stocks_cd[:] = 0
  
      state = self.get_state(price)
      total_asset = self.amount + (self.stocks * price).sum()
      reward = (total_asset - self.total_asset) * self.reward_scaling
      self.total_asset = total_asset
  
      self.gamma_reward = self.gamma_reward * self.gamma + reward
      done = self.day == self.max_step
      if done:
          reward = self.gamma_reward
          self.episode_return = total_asset / self.initial_total_asset
  
      return state, reward, done, dict()
  
file_path: FinRL/finrl/meta/env_stock_trading/env_nas100_wrds.py
imports: from __future__ import annotations
  import os
  import gym
  import numpy
  from numpy import random
label_desc: Use image node_id 3 for calling the StockEnvNAS100 obj's underlying member method code with example usage: obj.step(actions) and returns: state,  reward,  done,  dict