Ceruleanacg / Personae

📈 Personae is a repo of implements and environment of Deep Reinforcement Learning & Supervised Learning for Quantitative Trading.
MIT License
1.33k stars 335 forks source link

potential bug and a question #26

Closed panditthecoder closed 5 years ago

panditthecoder commented 5 years ago

Thanks for the code. found it helpful in understanding the complexities of stock price prediction. line #208 in base.env.market.py

  if date_index < self.bound_index:
      # Get y, y is not at date index, but plus 1. (Training Set)
      instruments_y = scaled_frame.iloc[date_index + 1]['close']
  else:
       # Get y, y is at date index. (Test Set)
       instruments_y = scaled_frame.iloc[date_index + 1]['close']

both the if and else conditions have the same code. should the else statement be instruments_y = scaled_frame.iloc[date_index]['close']

secondly, i had a question. how do i convert the scaled values back to the normal values after the predict function is called ? I would like to see the predicted price as a non scaled value ? thanks and appreciate your effort.

panditthecoder commented 5 years ago

ok. figured it out. it is not a bug. closing the issue