Document Type: Original Article
Assistant Professor, Accounting Department, Petroleum Faculty of Tehran, Petroleum University of Technology, Iran
MSc Student in Finance, Accounting Department, Petroleum Faculty of Tehran, Petroleum University of Technology, Tehran, Iran.
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 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 independent variables.
Seven different machine learning algorithms are implemented to predict stock prices. Those include Bayesian Linear, Boosted Tree, Decision Forest, Neural Network, Support Vector, and Ensemble Regression. The sample of the study is fifteen oil and gas companies active in the Tehran Stock Exchange. For each stock the data from the September 23, 2017 to September 23, 2019 gathered. Each algorithm provided two metrics for performance: 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 in the Tehran Stock Exchange.