Abstract
The research investigates the performance of four machine learning algorithms ‘Linear Regression, Support Vector Machine, Gradient Boost and Random Forest’ in predicting stock prices in Pakistan during the COVID-19 pandemic. Utilizing 15 trading factors sourced from the Pakistan Stock Exchange website and analyzed using Python programming language, the study calculates volatility during the pandemic period. Results reveal that the Random Forest model consistently exhibits robust predictive capabilities across various metrics, outperforming other algorithms by accurately predicting stock prices based on factors such as the previous day’s closing price, open price, average price, turnover and P/E ratio, with over 90% accuracy. Notably, Random Forest also surpasses in predicting the lowest price, highest price, P/B ratio, P/S ratio, fluctuations in currency (in Rupees), turnover rate, total market capitalization and total equity. This study contributes to the literature on stock return algorithms, uniquely examining the effectiveness of different financial factors with various machine learning algorithms in the context of Pakistan’s stock market during a challenging period. The findings hold significance for investors, traders and policymakers, offering insight for decision-making and regulation formulation amid market instability.
Get full access to this article
View all access options for this article.
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
