Forecasting Timeseries Using Machine Learning & Deep Learning

In this post, I show you how to predict stock prices using a forecasting LSTM model & a simple Ridge regression model.

Serafeim Loukas, PhD
11 min readMar 6, 2023
Figure created by the author.

1. Introduction

1.1. Time-series & forecasting models

Most machine learning models use observations without a time dimension.

Time-series forecasting models predict future values based on previously observed values and are useful for non-stationary data. Non-stationary data, whose statistical properties vary over time, are commonly referred to as time-series, such as temperature, stock prices, and house prices over time. These models analyze a signal defined by observations taken sequentially in time.

Disclaimer (before we move on): There have been attempts to predict stock prices using time series analysis algorithms, though they still cannot be used to place bets in the real market. This is just a tutorial article that does not include intent in any way to “direct” people into buying stocks.

NEW: After a great deal of hard work and staying behind the scenes for quite a while, we’re excited to now offer our expertise through a platform, the “Data Science Hub” on Patreon…

--

--

Serafeim Loukas, PhD
Serafeim Loukas, PhD

Written by Serafeim Loukas, PhD

Data Scientist @ Natural Cycles (Switzerland). PhD, MSc, M.Eng. Bespoke services on demand