Skip to content

Predicting not the next day or hour, but more long term prediction. This NN is not very accurate yet, but I'm trying to improve this.

Notifications You must be signed in to change notification settings

FelixCodesTech/Long-Term-Stock-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Long Term Stock Prediction

This in an experiment to see how accurate long term Predictions can get from an NN which gets basic information about stock charts.

Plans

Currently the NN gets information about the chart of one stock. The last x data points are fed as context and it must predict the next x data points. This results in a long term prediction, instead of just the next day, hour or minute.

The plans are bigger though. I want this NN to get the context frame of many stocks at the same time, so it can have a meaningful understanding of the market.

Examples

I've accidentally deleted the entire README.md that I wrote a few minutes ago, so I'm going to keep this short :( Also these results are not cherrypicked, I'm not going through that hassle for some github folks.

AAPL Prediction

Blue is Context, Green is Actual, Red is Predicted. It got 1000 days context and has to predict the next 100 days. The NN was trained on AAPL so its no wonder it actually performs quite reasonable. One noteable thing: It has never seen this partion of the data, because of the Train-Test-Split.

image

GOOG Prediction

Same setup as above, except for the fact that this still is the AAPL Trained model and has never seen any Google charts. The NN can definitely get the direction the stock is heading, but details etc. are not really there.

image

MSFT

Same setup as above. Here you can see that the outcome is a bit misleading on this chart. The actual end result is about a 40% gain, while the NN predicted about 25%. This would have been a great deal, but if you imagine this going the other way around, something like an end result of -40%, whilt the NN predicts +25%, that would be a big loss.

image

Statistics

Chart V2

This is a chart showing how good the NN performs on certain combinations of Context and Solution Window. Red (1.0) is really bad, while Blue (0.0) is "good" (compared to the other really terrible predictions. Probably as good as the examples above.) You can see that the smaller the Ratio SolutionWindow/ContextWindow becomes, the better (more blue) the point gets. This chart contains way less points gives therefor a better overview.

image

Chart V1

Why is this only until 300 Context Window? Because I haven't run the statistics notebook for long enough yet.

image

About

Predicting not the next day or hour, but more long term prediction. This NN is not very accurate yet, but I'm trying to improve this.

Topics

Resources

Stars

Watchers

Forks

Packages