This notebook illustrates a deep learning model to predict median stock market prices for a number of stock options. The stock data is fetched using the Alpha Vantage API for financial data.

Fetching the Real time Stock data

#Fetching-the-Real-time-Stock-data
Loading output library...

Data Pre Processing/Formatting and Feature Engineering

#Data-Pre-Processing/Formatting-and-Feature-Engineering

The data we presently have provides us with daily stock data for the example stock option (FB) since 2012. We need to format the data a bit such that it can be fed into our Deep Learning Model.

Loading output library...

The current data would be what we would not be enough to run a deep learning model on, we need to bring in some more meaningful features to ensure that the neural net learns enough to make accurate predictions.

Loading output library...

Integrating Google Trend Interest Rating

#Integrating-Google-Trend-Interest-Rating

Another factor that we can add is the Google Trend rating of the company which we might implement depending on the accuracy we get on our model.

Loading output library...
Loading output library...
Loading output library...

Feature Creation

#Feature-Creation
Loading output library...
Loading output library...

We're ready to put together our models.

Root-mean-squared percent error is the metric Kaggle used for this competition.

Loading output library...

We use the cardinality of each variable (that is, its number of unique values) to decide how large to make its embeddings. Each level will be associated with a vector with length defined as below.

Loading output library...
Loading output library...
Loading output library...
Loading output library...