Comparative Analysis of Deep Learning and Machine Learning Models for Stock Price Prediction By Ethan Fahy and Odyssea Drosis
- Ethan Fahy
- Nov 26, 2025
- 1 min read
This project investigates the effectiveness of machine learning models in predicting stock prices and supporting investment decisions. Using five years of historical data from Apple, Tesla, HP, CVS Health, and Chevron Corp, we trained and tested six models: Linear Regression, Decision Trees (with depths of 7, 10, and 20), Random Forest Regression (with maximum depths of 5 and 10), Multilayer Perceptron (MLP), and K-Nearest Neighbors (KNN, with neighbors of 2 and 3). We split the data into training and testing sets to ensure unbiased performance evaluation and applied techniques such as dropout and regularization to reduce overfitting in complex models. Prediction performance was measured using Mean Squared Error (MSE), while the practical financial value of each model was evaluated using a simulated buy/sell trading strategy. Our findings show that MLP consistently outperformed other models in both prediction accuracy and investment returns, particularly for volatile stocks like Tesla, while Linear Regression performed well for more stable stocks such as HP. Random Forest models, despite occasional overfitting, captured actionable patterns in trading simulations, and KNN delivered moderate results. These results suggest that deep learning approaches, combined with proper evaluation strategies and trading simulations, can provide powerful tools for stock price prediction and investment decision support.
Read the full article below.