Explainable Time Series Forecasting using exogenous variables – How weather affects the stock market
Abstract:
Climate Change is real, and this has been affecting the weather all around the world. With weather conditions changing, this thesis aims to understand how weather can be used to forecast market changes over a longer term. The aim is to understand how the ability to forecast weather can help mitigate risk during acute weather crises and disruptions, and help arbitrage the industries most affected by weather in order to stabilize the market. Modern Deep learning methods such as Temporal Fusion Transformers (TFTs) and Neural Hierarchical Interpolation for Time Series Forecasting (N-HiTS) are needed to allow the inclusion of static and historical exogenous variables such as weather and location data. We therefore, use the existing state-of-the-art N-HiTS architecture, as it outperforms other models in long-horizon forecasting by incorporating hierarchical interpolation and multi-rate data sampling techniques and provides a large average accuracy improvement over the latest Transformer architectures while reducing the computation time by order of magnitude. We then modify this existing architecture by developing a novel approach that integrates weather data in the model, so that it performs better for stock data and weather covariates. We call this novel approach WiN-HiTs, Weather induced N-HiTS, and show that weather covariates can help forecast the market movements better for certain sectors like Utilities and Materials over a long forecast horizon.
This research also emphasizes on the importance of forecast decomposition in AI models, particularly in a financial and stock market context where understanding the decision-making process is crucial. The WiN-HiTS architecture allows the separation of the stack prediction components of the time series forecast, which helps us interpret how different weather factors contribute to stock price fluctuations, and how these factors are chosen. In this thesis, we use a diverse set of test data for evaluation, including historical weather and stock market data from multiple geographic locations and industries across the S&P500 stocks. Baselines for comparison include traditional models such as Auto ARIMA, as well as modern machine learning approaches like Transformer-based models (TFT) and N-HiTS itself, and results show, that WiN-HiTS performs on par for most sectors, and better than these models in certain sectors. Key Performance Indicators (KPIs) used for benchmarking include Mean Absolute Error (MAE), Mean Squared Error (MSE), and Mean Absolute Percentage Error (MAPE) to assess prediction accuracy. The evaluation of this thesis ensures the robustness and practicality of the proposed WiN-HiTS model in real-world financial forecasting scenarios.
Author:
Het Dave
Advisors:
Claudia Linnhoff-Popien, Jonas Stein, Arnold Unterauer, Nico Kraus
Student Thesis | Published September 2024 | Copyright © QAR-Lab
Direct Inquiries to this work to the Advisors