Machine Learning for Real-Time Stock Market Trend Prediction in Bangladesh: A 25-Year Comprehensive Analysis of Dhaka Stock Exchange with Web Application Deployment
DOI:
https://doi.org/10.38124/ijsrmt.v5i2.1240Keywords:
Stock Trend Prediction, Machine Learning, Dhaka Stock Exchange, Ensemble Learning, Real-Time Financial AnalyticsAbstract
Accurate prediction of stock market trends remains a daunting challenge, particularly in high-volatility and structurally changing emerging economies. This paper presents a comprehensive model for binary day-to-day Dhaka Stock Exchange movement classification specifically up or down, using a 25-year historical data set from January 2000 to February 2025. We developed a comprehensive feature engineering pipeline that constructs lagged prices, price variations, daily returns, rolling means and volatilities over several horizons, momentum factors, exponential moving averages, volume lags, and calendarbased features. Three state-of-the-art tree-based classification algorithms, Random Forest, XGBoost, and LightGBM, were trained and hyperparameter-tuned under the strict time-series split cross-validation scheme to ensure temporal consistency and prevent leakage. Model hyperparameters were optimized with domain-specific tuning of tree depth, regularization coefficients, learning rates, and sampling schemes. Average cross-validated test accuracies of 85.20 percent for Random Forest, 85.42 percent for XGBoost, and 85.69 percent for LightGBM demonstrate the effectiveness of gradient boosting methods in recognizing nonlinear market trends, while weighted soft-voting ensemble also smoothed the predictions to 85.68 percent accuracy with balanced precision–recall curves. Feature importance findings reveal that rolling volatilities and momentum features have most substantial effects, impacting predictive performance. Our analysis indicates that LightGBM offers the best accuracy, computational complexity, and stability tradeoff while the ensemble offers incremental progress through complementary strengths of models. This paper fills an important gap in long-term, ensemble-based trend forecasting for the DSE. To demonstrate practical applicability, we deployed the LightGBM model (chosen for its optimal performanceefficiency tradeoff) in a production-ready web application that provides real-time trend predictions through a RESTful API and interactive interface.
Downloads
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 International Journal of Scientific Research and Modern Technology

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
PlumX Metrics takes 2–4 working days to display the details. As the paper receives citations, PlumX Metrics will update accordingly.