Employ a VECM to predict FANG Stocks with an ML Framework
Use a machine learning approach with the vector error correction model to increase forecast accuracy with scalecast
The Vector Error Correction Model (VECM) is a multivariate time series technique that can forecast linearly with a mix of short and long-term dynamics. The steps to effectively apply this model are well-researched and methodical, relying on the results of several hypothesis tests to determine the best parameters for any given time series data. I recently saw a Towards Data Science article that employed the VECM to forecast closing prices of the “FANG” (Facebook — which is now Meta, Amazon, Netflix, Google) stocks. Today, I want to perform the same kind of application, with extended functionality to include machine learning techniques, using the scalecast package from Python. In this article, I refer back to the article that inspired me (which is over three years old as of the time of this writing) to note contrasts in findings by using the author’s last name, Clements. Find the full notebook used in this example here.
Preparation
To get started, we install the needed packages (assuming we have packages from the Anaconda standard library already installed):