def _initiate_state(self):
    if self.initial:
        if (len(self.df.tic.unique()) > 1):
            state = ((([self.initial_amount] + self.data.close.values.tolist()) + ([0] * self.stock_dim)) + sum([self.data[tech].values.tolist() for tech in self.tech_indicator_list], []))
        else:
            state = ((([self.initial_amount] + [self.data.close]) + ([0] * self.stock_dim)) + sum([[self.data[tech]] for tech in self.tech_indicator_list], []))
    elif (len(self.df.tic.unique()) > 1):
        state = ((([self.previous_state[0]] + self.data.close.values.tolist()) + self.previous_state[(self.stock_dim + 1):((self.stock_dim * 2) + 1)]) + sum([self.data[tech].values.tolist() for tech in self.tech_indicator_list], []))
    else:
        state = ((([self.previous_state[0]] + [self.data.close]) + self.previous_state[(self.stock_dim + 1):((self.stock_dim * 2) + 1)]) + sum([[self.data[tech]] for tech in self.tech_indicator_list], []))
    return state
def _initiate_state(self):
    if self.initial:
        if (len(self.df.tic.unique()) > 1):
            state = ((([self.initial_amount] + self.data.close.values.tolist()) + ([0] * self.stock_dim)) + sum([self.data[tech].values.tolist() for tech in self.tech_indicator_list], []))
        else:
            state = ((([self.initial_amount] + [self.data.close]) + ([0] * self.stock_dim)) + sum([[self.data[tech]] for tech in self.tech_indicator_list], []))
    elif (len(self.df.tic.unique()) > 1):
        state = ((([self.previous_state[0]] + self.data.close.values.tolist()) + self.previous_state[(self.stock_dim + 1):((self.stock_dim * 2) + 1)]) + sum([self.data[tech].values.tolist() for tech in self.tech_indicator_list], []))
    else:
        state = ((([self.previous_state[0]] + [self.data.close]) + self.previous_state[(self.stock_dim + 1):((self.stock_dim * 2) + 1)]) + sum([[self.data[tech]] for tech in self.tech_indicator_list], []))
    return state