Evaluating the Accuracy of LSTM Neural Networks and Linear Regression for Microsoft Stock Prediction
Evaluating the Accuracy of LSTM Neural Networks and Linear Regression for Microsoft Stock Prediction
Huijeong Hwang
Abstract
Stock return prediction is a challenging task due to the volatility of the financial market. This paper compares a Long Short-Term Memory (LSTM) neural network with a baseline Linear Regression (LR) model for predicting next-day returns of Microsoft stock. Linear Regression is chosen for its interpretability and ability to serve as a transparent statistical baseline, while LSTM represents a modern deep learning approach capable of capturing nonlinear and temporal dependencies within sequential market data. Model performance was assessed using Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Directional Accuracy (DA). Experimental results show that the Linear Regression model achieved lower numerical errors (RMSE = 0.0138, MAE =0.0105) and trained substantially faster (≈0.011 s) than the LSTM (RMSE =0.0156, MAE =0.0127, training time ≈3.05s). The LSTM attained a marginally higher directional accuracy (46.7% vs 46.4%), suggesting a slightly better ability to detect market movement direction.
