Explore Courses Blog Tutorials Interview Questions
0 votes
in AI and Deep Learning by (50.2k points)

I am working on a project to predict stock price using ANN. I have trained the system using previous 7 years data and it works fine to predict data for one day. Now I want to predict the stock price for the next seven days.

My Idea is to predict day 2 data using day 1, day 3 data using predicted data of day 2 and day 1 and so on. But it's not working properly.

I have trained ANN to predict closing price using opening price, the maximum and minimum price of a day.

What is the idea of predict data for the next seven days ??

1 Answer

0 votes
by (108k points)

You've arranged very well if you can predict even one day effectively. The main issues with this are:

  •  Is it overfitting? e.g. learning to replicate the characteristics of your training data exactly? If you haven't tried it yet then I'd strongly recommend testing your ANN on 20% of your data after training it with the other 80% to be sure of this.

  • Is it learning to predict absolute price values or deltas? if the former, then you are probably just getting a good fit from the fact that by far the best predictor of the next day's closing price is today's closing price. It's not rare to get 99%+ R-squared fits by making this mistake.

Considering you haven't fallen into one of the above traps, then the way to do multiple days of prediction is to simply have separate predicted variables for each of the future days independently. There isn't much further value in feeding the next day predictions into the 2nd day etc, but you can try it if you like. Note that you can't do any harm, might speed up learning by providing a useful feature detector, etc.).

If you wish to learn more about Artificial Neural Network visit this Artificial Neural Network Tutorial.

Browse Categories