0% found this document useful (0 votes)
13 views

Exploring Machine Learning for Stock Price Prediction and Decision Making

The document discusses the application of machine learning, specifically Support Vector Regression (SVR), for predicting stock prices and aiding decision-making in trading. It emphasizes the importance of data preprocessing, feature engineering, and model evaluation to enhance prediction accuracy while acknowledging the inherent risks and complexities of stock market dynamics. The findings suggest that the SVR model effectively balances traditional and advanced machine learning techniques, making it accessible for various users in stock trading.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Exploring Machine Learning for Stock Price Prediction and Decision Making

The document discusses the application of machine learning, specifically Support Vector Regression (SVR), for predicting stock prices and aiding decision-making in trading. It emphasizes the importance of data preprocessing, feature engineering, and model evaluation to enhance prediction accuracy while acknowledging the inherent risks and complexities of stock market dynamics. The findings suggest that the SVR model effectively balances traditional and advanced machine learning techniques, making it accessible for various users in stock trading.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Volume 10, Issue 4, April – 2025 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25apr718

Exploring Machine Learning for Stock Price


Prediction and Decision Making
Dr. Geetha T V.1; Sayandeep Mondal2; Sumran Verma3; Jeeval Chawla4
1
Department of CSBS- IOT / SCSE, SRM, Institute of Science and Technology, Ramapuram Chennai, India
2,3,4
Department of Computer Science and Engineering, SRM Institute of Science and Technology,
Ramapuram Chennai, India

Publication Date: 2025/04/19

Abstract: Intricate dynamics of the stock market makes its prediction a challenging and daunting activity. In order to create
precise predictive models, researchers are employing emerging machine learning models and methods. The research starts
with the collection of the history, the volumes of trade and other related indicators. Then the data is preprocessed feature
engineering is done, thereby producing useful input representations for machine learning models. The model employed in
the research is SVR model. Grid search CV method is utilized to discover the best possible parameters' values that are
utilized in SVR model. The model assists in predicting the intraday stock values based on recent past data. This makes the
model respond promptly to trends and changes, making it optimal for short-term and momentum trading strategies.

Keywords: Support Vector Regression (SVR), Grid Search CV.

How to Cite: Dr. Geetha T V.; Sayandeep Mondal; Sumran Verma; Jeeval Chawla. (2025). Exploring Machine Learning for Stock
Price Prediction and Decision Making. International Journal of Innovative Science and Research Technology,
10(4), 549-552. https://doi.org/10.38124/ijisrt/25apr718.

I. INTRODUCTION The biggest assest of machine learning for predicting


stock markets is its capacity to adjust to the changing nature
Machine learning-based predictive analysis of the trends of markets and find subtle patterns that human analysts may
in stock market is a fast-developing field that utilizes not perceive. Traders and investment companies are relying
sophisticated computational methods to predict future more on algorithmic models to stay competitive in high-
movements in stock prices. This data-driven methodology frequency trading, where milliseconds matter. Predictive
depends largely on past stock data, including historical prices, models are also utilized in generating trading strategies,
volumes of trades, market indicators, and even news sentiment including where to buy and sell best, when to enter and exit,
in some cases, to train machine learning models that can and how to create diversified investment portfolios. When
recognize patterns and make well-informed predictions. The applied properly, predictive models have the potential to
central concept involves pulling useful understanding from enhance returns while minimizing human emotions and
large-scale datasets that generally are too bulky or complicated biases.
to be analyzed very well by usual methods. It is an applied field
that involves the intersection of statistics, computer science, But it is critical to recognize the risks in applying
and finance, putting together ideas borrowed from all these machine learning for forecasting of stocks. The stock
fields to design strong predictive models that help inform exchange is subject to numerous uncontrollable factors, such
traders and investors to make smart choices. as changes in political and economic scenarios, international
crises, and investor sentiment, which are hard to accurately
Various Machine learning algorithms are widely applied model. Although machine learning can advance forecasting
in predicting stock market trends. Among these, deep precision up to some point, it is not possible to eradicate the
learning algorithms—particularly recurrent neural networks intrinsic volatility and uncertainty of financial markets.
(RNNs) and long short-term memory (LSTM) networks— Overfitting to past data, generalization failure, and black-box
have been increasingly popular for their capacity to learn model behavior are some of the typical issues encountered
from complexly structured data. These models are capable to during model building and deployment.
analyze trends and identify time-based dependencies in stock
price data, leading to more accurate predictions of values for II. RELATED WORK
future trends. Ensemble learning methods like random forests
and gradient boosting machines also help enhance prediction F Ghallabi et al. [2] in a study forecasted stock prices of
accuracy by taking advantage of the strengths of several base clean energy by using ESG stock market along with various
learners. ML methods and NGBoost. Stock data is given in the data set

IJISRT25APR718 www.ijisrt.com 549


Volume 10, Issue 4, April – 2025 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25apr718
after world crises like covid-19 etc. Use of Shapely Adaptive designing a reward function in order to make accurate stock
Explanation has also been covered in analysis of the paper for value predictions.
enhancing the interpretability of the data. The findings show
that NGBoost performs better than other ML techniques with M. S. Smai and A. Ustundang. [9]. The paper discusses
high parallels among Clean Energy stocks and ESG market. about a new prediction methodology integrating ensemble
learning with feature selection algorithms. The central
S. Gupta et al. [16]. Paper solves the problem of emphasis is placed on forecasting change in opening and
predicting the performance on individual business stock on closing stock prices by using a sliding window cross
stock market because the market is exposed to continuous validation approach. Experiments demonstrated light
change. A comparative analysis of applications and outcomes Gradient Boost machines and Shapely Additive Explanations
of various machine learning approaches is presented to be best model and demonstrate a phenomenal superiority
providing baselines for commonly used algorithms such as over buy-and-hold stratergy.
linear regression, SVM and neural network methods such as
CNN, RNN etc. A. Das. et al. [4]. Research investigates uses of various
ML methods and algorithms in predicting stock market. Paper
V. Chang et al. [15]. The research seeks to tackle the studies stocks as input values for ML algorithms and focuses
issue of unpredictability and non-linearity in data of stock on sophisticated technique to predict future stocks.
market, particularly after the pandemic. Solution proposed in
the paper is the emphasis on RNN models such as GRU and III. METHODOLOGY
LSTM and testing the efficiency of the same in forecasting the
stock prices. This project employs Support Vector Regression (SVR)
in stock price prediction. SVR employs an epsilon-tube to
The research incorporates techniques such as ARIMA manage volatility by ignoring small errors. Data is gathered
and XGB in the improvement of the model's robustness. through the yfinance API, preprocessed, and trained with
tuned hyperparameters (C, gamma, epsilon) through
Results showed GRU performed better than LSTM in GridSearchCV. Matplotlib plots predicted vs actual values for
Prediction and Training. This aided in giving insight assessment.
regarding predictive strengths of such models and
emphasized potential of GRU and XGB in accurately A. Proposed Architecture
predicting the stock market.

H. Zheng et al. [12]. Examines different applications of


machine learning using financial time series analysis such as
future trend predictions in economic data and enterprises
involved in finance. Paper elucidates on conventional models
like ARIMA and how effective they are with ML models and
Hybrid ML models. Their ability to interpret non linear data
is reiterated. Predictions and integrity analysis are carried out
on deep learning by using techniques like cross validation and
empirical analysis. Paper presents several potential avenues
of ML application in financial prediction, thereby providing a
methodological framework for more accurate and trustworthy
predictions.

J. M. Sangeetha and K. J. Alfia. [7]. Paper talks about


objective stock market prediction and access of machine
learning to acquire predictions for various stock prices.
Emphasis is on training the various models on high economic
prices, therefore, achieving good and noticeable enhancement
in automated stock market prediction. The paper highlights Fig 1: Diagram Highlighting the Proposed System
investigation of linear regression based Machine learning
methods for predicting market prices.
B. Data Collection and Preprocessing
We make use of yfinance API to get data collection. It
Y. Wu et al. [14]. The majority of the predictive models means yahoo finance. It retrieves past data from the API. For
are based on supervised learning and therefore struggle to implementation, we apply ticker_symbol. It retrieves
parse the trade information of regularly evolving stock
historical for given ticker symbol. Preprocessing the data
market. The problem is solved by the paper proposing a includes organizing raw data in the form appropriate for
hybrid model that combines unsupervised learning and
analysis and modeling. It consists of feature extraction where
reinforced learning. The paper discusses the process starting code incorporates hour and minute extraction. This is
with collecting stock data from past data and then build a achieved with the dt.hour and dt.minute properties of the
trading environment from unsupervised learning. After that pandas Datetime object. It is a data manipulation method

IJISRT25APR718 www.ijisrt.com 550


Volume 10, Issue 4, April – 2025 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25apr718
which can assist the model in learning patterns in time. MSE, more accurate is the model. The MSE is generated
randomly based on the amount of data used and parameter
C. Training and Testing values selected.
The preprocessed data is then segregated into training
and testing set. Training and testing sets are segregated by IV. RESULTS AND DISCUSSION
maintaining the test size value as 0.4, i.e., if the total dataset
considered has 100 individual data sets, then 60 of them are The suggested model, employs support vector
utilized for training and 40 for testing. Random forest is yet regression or SVR algorithm in order to predict stock prices.
another significant feature of scitkit_learn regarding training The model accordingly employs RBF kernel function, in
and testing since it introduces consistency in the shuffling order to deal with non linearity of the data. This enables the
while splitting the data into training and testing. model to fit complexities of the financial data. By tuning the
model with optimal values of C, gamma and epsilon, we can
D. Feature Selection and Engineering easily generalize unseen data, develop the optimal decision
Discussing feature scaling, one of the crucial elements boundary for the model and minimize errors. Applying
of any model, the first scaler that we employ is standardscaler, standardscaler to feature scaling ensures that all input features
which standardizes features by stripping off mean and scaling reflect the desired contribution in prediction process thereby
to unit variance. The following features are C, gamma, enhancing the model's performance. The ability of the model,
epsilon. C is referred to as the generalization feature and aids therefore, makes it accessible to anyone from a novice in
in reducing trade- off between training and testing errors. An trading to an expert to utilize them, particularly if they have
increased value of C reflects an increased emphasis on an interest in frequency based intraday trading.
reducing training errors and vice- versa. Gamma is a
significant property w.r.t radial bias function kernel, the In total, the suggested system can produce good
kernel that aids in reading complicated and nonlinear data. performance using comparitively smaller data compared to
Gamma determines how far-reaching the impact of one more data- intensive models and can minimize data
training sample is, where "low" and “high” values imply "far" requirements and training time. It is also very helpful for
and "close," respectively. Epsilon indicates epsilon-tube in applications such as market trend analysis, stock price
which there is no penalty given meaning, if a predicted value prediction, portfolio optimization, anomaly detection etc. The
falls in the tube it is considered as the predicted output. suggested system can also generalize effectively to unseen
data and has good ability to deal with non-linear data.
E. Output Visualization
This assists us in interpreting the model performance  Starting Grid Search for best parameters... Grid
and the correlating real v/s predicted values. This is done with Search completed.
the use of the matplotlib library which graphically represents  Best parameters found:
the real and predicted values on a chart making them easily  {'C': 1, 'epsilon': 0.1, 'gamma': 0.001}
understandable.  Best cross-validated MSE: 2.915625282189881
 Values of parameters used in the best model:
F. Model Evaluation C:1,gamma:0.001,epsilon:0.1
Model evaluation measures are necessary to check the
performance of predictive model. For that we use MSE or
mean squared error function to find mean squared error
between the different (real v/s actual) data values. Less is the

Fig 2: SVR Model –Intraday Actual vs Predicted Prices

IJISRT25APR718 www.ijisrt.com 551


Volume 10, Issue 4, April – 2025 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25apr718
 Starting real-time prediction loop... [6]. S. M. Mostafavi, A. R. Hooman, Key technical
 Predicted price for the next 5 minutes: 178.26 USD, indicators for stock market prediction, Machine
Recent closing price: 178.49 USD Learning and Explanations, Volume 20, Science
 Predicted price for the next 5 minutes: 178.27 USD, direct, 2025.
Recent closing price: 179.62 USD [7]. J. M. Snageetha, K. J. Alfia, Financial stock market
 Predicted price for the next 5 minutes: 178.27 USD, Forecast using evaluated linear regression base
Recent closing price: 179.96 USD machine learning technique, Measurement: Sensors,
 Predicted price for the next 5 minutes: 178.28 USD, Volume 31, Science direct, 2024.
Recent closing price: 180.60 USD [8]. G.J. Wang, Y. Chen, Y. Zhu, C. Xie, Systematic Risk
 Finished running the prediction loop. prediction Using Machine Learning, International
Review of financial Analysis, Volume 93, Science
V. CONCLUSION Direct, 2024.
[9]. S. M. Sami, and A. Ustundag. 2023. “An Adaptive and
The Support Vector Regression (SVR) model is a robust Enhanced Framework for Daily Stock Market
tool for prediction of stock prices. It balances the strengths of Prediction Using Feature Selection and Ensemble
both conventional and machine learning models. Learning Algorithms.
Conventional models are efficient and simple, particularly [10]. W. Jiang-Applications of deep learning in stock
when dealing with light data. SVR draws on this point by market prediction: Recent progress. International
having a low computational cost, hence making it simpler to Conference On Computing And Machine Learning ,
train and implement on resource- constrained systems. 2021.
Concurrently, SVR also combines the sophisticated strengths [11]. A Nayak. M M. M Pai, Radhika M. Pai Prediction
of machine learning algorithms, especially their capacity to Models for Indian Stock Market , Procedia Computer
detect and learn from non-linear, complex and volatile Science, Volume 89, 2016.
patterns in stock price data. This renders the SVR model [12]. Zeng, J. Wu, R. Song, L. Guo, Z. Xu, Predicting
extremely resilient to real-world market conditions where Financial Enterprise Stocks and Economic Data
price movement hardly traces linear patterns. Trends Using Machine Learning Time Series,
ResearchGate, 2022.
By combining these two methods, SVR offers a [13]. S. Mukherjee, B. Sadhukhan, N Sarkar, D Roy, S. De
balanced and realistic solution for stock price forecasting. Its (2021). Stock Market prediction using deep learning
efficiency means that users do not need to use high- algorithms CAAI Transactions on Intelligence
performance hardware to take advantage of its features. This Technology 2023.
makes the model available to more people, such as novice [14]. Y. Wu. S Fu, X Lui, Y Bing, Ahrybrid stock market
traders and retail investors. Additionally, its capacity to prediction model based on GNG and reinforcement
process complex data patterns improves decision- making, learning, Expert Systems with applications, Volume
facilitates short-term trading strategies, and encourages 228, Science Direct 2023.
improved risk management. Overall, SVR is an easy-to-use [15]. V Chang, Q A XU, A Chidozie, H Wang, Prediction
and smart model that provides timely and better-informed Economic Trends and Stock Market Prices with Deep
trading decisions in the stock market. Learning and Advanced Machine Learning
Techniques, Electronics, MDPI 2024.
REFERENCES [16]. S Gupta, S Nachappa, N Paramanandham, Stock
market time series forecasting using comparative
[1]. Subasi, F. Amir, K. Bagedo, A. Shams, A. Sarirete – machine learning algorithm. Procedia Computer
Stock Market prediction using ML. 18th International Science, Volume 252, Science Direct 2025.
Learning & Technology Conference in 2021. [17]. Sen, T. D. Chaudhuri - A Framework for Predictive
[2]. Ghallabi, B. Souissi, A. M. Du, S. Ali, ESG stock analysis of Stock Market Indices – A Study of the
markets and clean energies price prediction: insights Indian Auto Sector. Institute of Electrical and
from advanced machine learning, International review Electronics Engineers in 2018.
of financial analysis, volume 97,Science direct, 2025. [18]. Z. WANG, S. B. HO, Z. LIN – Stock Market Prediction
[3]. V. K. S. Reddy – Stock Market Prediction Using Analysis by Incorporating Social and News Opinion
Machine Learning. International Research Journal of and Sentiment. Institutional Knowledge at Singapore
Management University in 2018.
Engineering and Technology (IRJET), 2019.
[19]. Phayung, R. I. Rasel- Predicting Stock Market Price
[4]. Das, O. Dhar, K. Keshari, A. Chakraborty, A. Sharma,
A. Chatterjee, Stock Market Prediction using Machine Using Support Vector Regression. IEEE, 2013.
Learning, International Research Journal of [20]. P. Chen, Z. Boukouvalas, and R. Corizzo, A Deep
engineering and Technology, Volume 10, Issue 11, Fusion Model for Stock Market Prediction with News
Headlines and Time Series Data, Neural Computing
2023.
[5]. V. Kumar, M. L. Garg- Predictive Analytics: A and Applications, Volume 36, 2024.
Review of Trends and Techniques, Researchgate,
2018.

IJISRT25APR718 www.ijisrt.com 552

You might also like