Forecasting Stock Prices using XGBoost (Part 2/5)
A Follow-up to Part 1
So after I published my first article (here) on forecasting stock prices using XGBoost, I received feedback that the signal should first be made stationary before making any predictions, otherwise it is like trying to shoot at a fast-moving and erratic target. This article aims to repeat the analysis we did in Part 1, but we use stock returns instead of the raw stock prices.
Problem Statement
Exploratory Data Analysis
Feature Engineering
Training, Validation, Test split
Hyperparameter Tuning
Applying the Model
Findings
Problem Statement
Here, we aim to predict the daily returns of Vanguard Total Stock Market ETF (VTI), using data from the previous N days. In this experiment, we will use 6 years of historical prices for VTI from 2013–01–02 to 2018–12–28, which can be easily downloaded from yahoo finance. After downloading, the dataset looks like this: