top of page

I have been interested in deep learning for a long time, and the model that resonates with me the most is LSTM. Below, I would like to present the results of my analysis and show how I created the LSTM model.

​

Code and other materials are available on Github:

https://github.com/PawelTokarski95/Deep-Learning-with-LSTM-Stocks-in-Python-

​

What is LSTM? It is a deep learning model that takes into account previous time-series data, adjusting information based on it. This process allows the LSTM neural network model to detect long-term dependencies and forget them if necessary, while also considering short-term data. It is an important model, especially for tasks such as predicting stock prices, which is the goal of this project.

Here is my dataset. I included several economic factors as features for the model to predict the target variable, which is an ETF for startup stocks in the USA.

​​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

After cleaning the missing data and performing the necessary transformations (including scaling to a range of 0-1), I used the "Sequential()" model from the Keras library in TensorFlow. However, my goal was to optimize the model in such a way that its hyperparameters would be selected in the most appropriate way to meet business needs. For this purpose, I used the Random Search algorithm. Below, I present the prepared transformations and parameter selection for this training process.

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

In the next part, I will present the executed random search, the fitted model based on these hyperparameters, and the evaluation metrics/scores.

​

​​​​​​​​​​​​

model LSTM.png
Parameters.png
data.png
bottom of page