Research Article

Predicting S&P 500 Closing Prices Using a Feedforward Neural Network: A Machine Learning Approach

Authors

  • Hirushi Thilakarathne Department of Computer and Data Science, Faculty of Computing, NSBM Green University, Pitipana-Thalagala Rd, Homagama 10200, Sri Lanka
  • Jayantha Lanel Department of Mathematics, Faculty of Applied Sciences, University of Sri Jayewardenepura, Gangodawila, Nugegoda 10250, Sri Lanka
  • Thamali Perera Department of Mathematics, Faculty of Applied Sciences, University of Sri Jayewardenepura, Gangodawila, Nugegoda 10250, Sri Lanka
  • Chathuranga Vidanage Department of Mathematics, Faculty of Applied Sciences, University of Sri Jayewardenepura, Gangodawila, Nugegoda 10250, Sri Lanka

Abstract

The Standard and Poor’s 500 index is a crucial benchmark for investors, financial analysts, and policymakers to assess stock market performance and make informed investment decisions. Accurate S&P 500 closing price prediction is vital for efficient portfolio management and risk mitigation. This study explores the application of neural networks, specifically the Feedforward Neural Network, to predict the S&P 500 closing price. The author used a dataset from 1950 to 2024, including variables such as open, high, low, close, and volume as the initial step. Various training-testing ratios are tested to evaluate the models' performance. The results highlight that an eighty to twenty split yields the best predictive accuracy, with the lowest Mean Absolute Error and Mean Absolute Percentage Error. Additionally, this study compares the Feedforward Neural Network's predictions to polynomial regression models and investigates cluster-wise fitting techniques to enhance accuracy. The findings demonstrate that neural networks can significantly improve the predictive power of S&P 500 closing prices, particularly when combined with advanced regression techniques, providing valuable insights for academic research and practical financial decisions.

Article information

Journal

Journal of Mathematics and Statistics Studies

Volume (Issue)

6 (1)

Pages

18-31

Published

2025-02-26

How to Cite

Thilakarathne, H., Jayantha Lanel, Thamali Perera, & Chathuranga Vidanage. (2025). Predicting S&P 500 Closing Prices Using a Feedforward Neural Network: A Machine Learning Approach. Journal of Mathematics and Statistics Studies, 6(1), 18-31. https://doi.org/10.32996/jmss.2025.6.1.3

Downloads

Views

34

Downloads

19

Keywords:

S&P 500 index, closing prices, Feedforward Neural Network, Machine Learning, New York, Testing Ratio, S&P 500 index