International Journal of Data and Network Science (Jan 2024)

Bayesian semi-shared temporal modeling: A comprehensive approach to forecasting multiple stock prices

  • Gatot Riwi Setyanto,
  • I Gede Nyoman Mindra Jaya,
  • Farah Kristiani

DOI
https://doi.org/10.5267/j.ijdns.2024.1.018
Journal volume & issue
Vol. 8, no. 3
pp. 1947 – 1958

Abstract

Read online

Stock prices of different companies frequently display similar temporal fluctuations because of common influencing factors. Accurate prediction of stock prices is of utmost importance for investors in determining their investment strategies. Utilizing multivariate forecasting, which involves analyzing multiple time series, has been shown to be highly effective and efficient when applied to stocks that exhibit similar temporal patterns. It is possible to model the relationship between shares by using a shared temporal model approach. Nevertheless, it is important to note that not all stocks selected for prediction demonstrate a strong correlation; certain stocks may deviate from expected patterns. Therefore, the direct implementation of a comprehensive shared temporal component model is not universally applicable. This study presents a new method called the Semi-Shared Temporal Model, which focuses on the correlation structure among variables that have similar patterns, while also modeling all stocks simultaneously. This methodology is applied to the three leading stocks of 2023: Amazon (AMZN), Alphabet (GOOG), and MercadoLibre (MELI). Based on monthly data collected from January 2010 to December 2023, the study forecasts the stock prices for the months of January to December 2024. The analysis findings suggest that the temporal patterns of AMZN and GOOG shares are highly similar, which supports the idea of modeling them together with shared temporality. Three forecasting methods are utilized: univariate models, full shared temporal models, and semi-shared temporal models. The analysis determines that the semi-shared temporal model approach produces the most precise forecasting outcomes, with a Mean Absolute Percentage Error (MAPE) of 17.97%, surpassing both univariate and full shared temporal models. The forecast for 2024 indicates a favorable trajectory for all three stocks.