Author/Authors :
Ghanbari, Ali Mohammad Accounting and Finance Department - Petroleum Faculty of Tehran - Petroleum University of Technology, Tehran , Jamshidi, Hamid Accounting and Finance Department - Petroleum Faculty of Tehran - Petroleum University of Technology, Tehran
Abstract :
Stock price prediction is one of the crucial concepts in finance area. Machine learning can provide the opportunity for traders and investors to predict stock prices more accurately. In this paper, closing price is the dependent variable and first price, last price, opening price, today’s high, today’s low, volume, total index of Tehran Stock Exchange, Brent index, WTI index, and exchange rate are the independent variables. Seven different machine learning algorithms, including Bayesian linear, boosted tree, decision forest, neural networks, support vector, and ensemble regression are implemented to predict stock prices. The sample of the study is fifteen oil and gas companies active in the Tehran Stock Exchange. For each stock, the data were gathered from September 23, 2017 to September 23, 2019. Two metrics were employed for the performance of each algorithm: root mean square error and mean absolute error. By comparing the aforementioned metrics, the Bayesian linear regression had the best performance to predict stock price in the oil and gas industry on the Tehran Stock Exchange.