def __init__(self, df, stock_dim, hmax, initial_amount, buy_cost_pct, sell_cost_pct, reward_scaling, state_space, action_space, tech_indicator_list, turbulence_threshold=None, make_plots=False, print_verbosity=10, day=0, initial=True, previous_state=[], model_name='', mode='', iteration=''):
    self.day = day
    self.df = df
    self.stock_dim = stock_dim
    self.hmax = hmax
    self.initial_amount = initial_amount
    self.buy_cost_pct = buy_cost_pct
    self.sell_cost_pct = sell_cost_pct
    self.reward_scaling = reward_scaling
    self.state_space = state_space
    self.action_space = action_space
    self.tech_indicator_list = tech_indicator_list
    self.action_space = spaces.Box(low=(- 1), high=1, shape=(self.action_space,))
    self.observation_space = spaces.Box(low=(- np.inf), high=np.inf, shape=(self.state_space,))
    self.data = self.df.loc[self.day, :]
    self.terminal = False
    self.make_plots = make_plots
    self.print_verbosity = print_verbosity
    self.turbulence_threshold = turbulence_threshold
    self.initial = initial
    self.previous_state = previous_state
    self.model_name = model_name
    self.mode = mode
    self.iteration = iteration
    self.state = self._initiate_state()
    self.reward = 0
    self.turbulence = 0
    self.cost = 0
    self.trades = 0
    self.episode = 0
    self.asset_memory = [self.initial_amount]
    self.rewards_memory = []
    self.actions_memory = []
    self.date_memory = [self._get_date()]
    self._seed()
def __init__(self, df, stock_dim, hmax, initial_amount, buy_cost_pct, sell_cost_pct, reward_scaling, state_space, action_space, tech_indicator_list, turbulence_threshold=None, make_plots=False, print_verbosity=10, day=0, initial=True, previous_state=[], model_name=, mode=, iteration=):
    self.day = day
    self.df = df
    self.stock_dim = stock_dim
    self.hmax = hmax
    self.initial_amount = initial_amount
    self.buy_cost_pct = buy_cost_pct
    self.sell_cost_pct = sell_cost_pct
    self.reward_scaling = reward_scaling
    self.state_space = state_space
    self.action_space = action_space
    self.tech_indicator_list = tech_indicator_list
    self.action_space = spaces.Box(low=(- 1), high=1, shape=(self.action_space,))
    self.observation_space = spaces.Box(low=(- np.inf), high=np.inf, shape=(self.state_space,))
    self.data = self.df.loc[self.day, :]
    self.terminal = False
    self.make_plots = make_plots
    self.print_verbosity = print_verbosity
    self.turbulence_threshold = turbulence_threshold
    self.initial = initial
    self.previous_state = previous_state
    self.model_name = model_name
    self.mode = mode
    self.iteration = iteration
    self.state = self._initiate_state()
    self.reward = 0
    self.turbulence = 0
    self.cost = 0
    self.trades = 0
    self.episode = 0
    self.asset_memory = [self.initial_amount]
    self.rewards_memory = []
    self.actions_memory = []
    self.date_memory = [self._get_date()]
    self._seed()