Forecasting Stock Prices for Automated Trading Using Machine Learning with Historical Data

Stock markets are notoriously complex and volatile, which makes accurate price prediction a necessity for investor decision-making, risk mitigation, and profitability. This study develops and evaluates an AI-driven trading bot using historical stock data to forecast short-term price movements. The core research question examines whether machine learning can reliably predict prices to generate profitable automated trades. The hypothesis posits that effectively trained ML models can identify patterns to enable superior trading strategies compared to traditional methods. Four models—Linear Regression, Random Forest, Decision Tree, and MLP Regressor—were trained and assessed using Mean Squared Error and a custom Mean Absolute Percentage Error metric. The Random Forest model’s predictions directed a simulated trading bot executing buy/sell decisions over 1200 time points, starting with a user-specified amount of capital and incorporating technical indicators and risk management rules. The simulation showcased a tangible potential for profit by consistently achieving considerable returns with reduced risk. These findings strongly support the use of ML for automated trading and offer investors a powerful tool to optimize portfolio performance.

Authors

Publication Details

Journal
Open Journal of Applied Sciences
Published
2025-01-01
DOI
https://doi.org/10.4236/ojapps.2025.159180
Primary Topic
Stock Market Forecasting Methods
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Forecasting Stock Prices for Automated Trading Using Machine Learning with Historical Data

Matthew Shen, Odysseas Drosis
Open Journal of Applied Sciences
Stock Market Forecasting Methods
article

Forecasting Stock Prices for Automated Trading Using Machine Learning with Historical Data

Matthew Shen, Odysseas Drosis
article en

Abstract

Stock markets are notoriously complex and volatile, which makes accurate price prediction a necessity for investor decision-making, risk mitigation, and profitability. This study develops and evaluates an AI-driven trading bot using historical stock data to forecast short-term price movements. The core research question examines whether machine learning can reliably predict prices to generate profitable automated trades. The hypothesis posits that effectively trained ML models can identify patterns to enable superior trading strategies compared to traditional methods. Four models—Linear Regression, Random Forest, Decision Tree, and MLP Regressor—were trained and assessed using Mean Squared Error and a custom Mean Absolute Percentage Error metric. The Random Forest model’s predictions directed a simulated trading bot executing buy/sell decisions over 1200 time points, starting with a user-specified amount of capital and incorporating technical indicators and risk management rules. The simulation showcased a tangible potential for profit by consistently achieving considerable returns with reduced risk. These findings strongly support the use of ML for automated trading and offer investors a powerful tool to optimize portfolio performance.

Open Journal of Applied SciencesVol. 15(09)
Openalex Percentile: Top 70%
Stock Market Forecasting Methods
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Forecasting Stock Prices for Automated Trading Using Machine Learning with Historical Data — Matthew Shen, Odysseas Drosis · Open Journal of Applied Sciences (2025) | TGRS Research Map | TGRS