International Journal For Multidisciplinary Research

E-ISSN: 2582-2160     Impact Factor: 9.24

A Widely Indexed Open Access Peer Reviewed Multidisciplinary Bi-monthly Scholarly International Journal

Call for Paper Volume 8, Issue 5 (September-October 2026) Submit your research before last 3 days of October to publish your research paper in the issue of September-October.

Evaluating LSTM Neural Networks With Moving Average Features For Short-Term Stock Price Forecasting: A Comparative Study Of The Technology And Pharmaceutical Sectors

Author(s) Manav Patel
Country United States
Abstract This study evaluates whether historical daily trading data combined with simple moving average (SMA) features can improve the accuracy of Long Short-Term Memory (LSTM) neural networks in forecasting short-term stock prices, and whether forecasting accuracy differs systematically between the technology and pharmaceutical sectors. Daily open, high, low, close, and volume data were retrieved through the yfinance Python library for six publicly traded firms: three technology companies (Apple, Alphabet, and NVIDIA) and three pharmaceutical companies (AbbVie, Eli Lilly, and Pfizer). Simple moving averages over 10-, 20-, and 50-day windows were computed from closing prices and supplied to the models as additional inputs. LSTM architectures were implemented in both TensorFlow and PyTorch, trained on chronologically ordered data using an 80/10/10 train-validation-test split, and evaluated with mean squared error, root mean squared error, and mean absolute error. Ten-day out-of-sample forecasts were generated for closing price, daily high, daily low, and trading volume beginning July 21, 2025, and were compared against realized market values. Across the evaluation window, the pharmaceutical sector produced a lower mean absolute percentage error (3.06 percent) than the technology sector (7.27 percent), with AbbVie the most accurately forecast security (2.01 percent) and NVIDIA the least (12.33 percent). Directional accuracy remained near or below chance for every security, indicating that low percentage error reflects proximity to a slow-moving price level rather than a reliable ability to anticipate day-to-day movement. The results indicate that moving averages help LSTM models track the general level and direction of price series in stable, low-volatility conditions, but that models trained exclusively on historical price information cannot account for the exogenous news, regulatory, and innovation shocks that drive a substantial share of price variance, particularly in the technology sector.
Keywords Long Short-Term Memory, LSTM, Stock Price Prediction, Moving Averages, Deep Learning, Time Series Forecasting, Technology Sector, Pharmaceutical Sector, Financial Machine Learning, Sector Comparison
Field Computer > Data / Information
Published In Volume 8, Issue 5, September-October 2026
Published On 2026-09-12
DOI https://doi.org/10.36948/ijfmr.2026.v08i05.87413

Share this