jgpavez / LSTM---Stock-prediction

A long term short term memory recurrent neural network to predict forex data time series
306 stars 149 forks source link

Can the LSTM predicts the stock price well ? #4

Open songqiqqq opened 7 years ago

songqiqqq commented 7 years ago

Hi, could you show us the performace of your LSTM predicting system ? I am also focusing on using (CNN+) LSTM to predict the stock data now. However, i found it's hard for the neural network to do this work well. Maybe , in my opinion, it's because the return series of a stock is too noisy.

SamuelePolimi commented 7 years ago

Yes, I saw the same. I think could be the combination of a number of factors. The first one is perhaps that stock market is chaotic, so it is difficult to make prediction. The second one is that is difficult to observe all the information necessary for the prediction. I mean, geopolitics for example has an impact on the stock market. And yes, these two reason could be seen as a source of noise. So I think that you are right. In my own opinion, to implement an autonomous trader (that I don't know if is in your interest), we must use or reinforcement learning allowing the system to choose to don't perform any action, or, equivalently, to predict the outcome with also a prediction of the accuracy of such outcome. So in this way you can choose the action also taking in account how much do you believe that your prediction is accurate or not. I think by the way that the way of RL is the more "sound" between the two methods, because the agent choose autonomously when he "thinks" to predict with enough accuracy the future prices of stocks, and act properly. So, summing up, is not important to predict always with a good accuracy, but instead to predict very well even few times, and taking the right actions in those few times.

jgpavez commented 7 years ago

Hi. Yes, I'm agree with that. The model don't work that well. The series is indeed very noisy. That was because I tried to use open-high-low-close values as a multidimensional input. However, I think there are many things to try yet, for instance adding extra information from other sources to the network input. Or maybe augmenting the data with extracted features that might help to improve performance. What I like from LSTMs or any RNN is that they are very general methods that can handle all of these improvements easily (something that is harder with classic models). RL is also a great option.