A Random Forests Approach to Predicting Clean Energy Stock Prices
Abstract
:1. Introduction
2. Methods and Data
2.1. The Logit Method for Prediction
2.2. The Random Forests Method for Prediction
- Divide the predictor space (all possible values for X1, …, XP) into J distinctive and non-overlapping regions, R1, …, RJ.
- For every observation that falls into the region Rj, the same prediction is made. This prediction is that each observation belongs to the most commonly occurring class of training observations to which it belongs.
2.3. The Data
3. Results
4. Discussion
5. Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Ampomah, Ernest Kwame, Zhiguang Qin, and Gabriel Nyame. 2020. Evaluation of Tree-Based Ensemble Machine Learning Models in Predicting Stock Price Direction of Movement. Information 11: 332. [Google Scholar] [CrossRef]
- Andreoni, Valeria. 2020. The Energy Metabolism of Countries: Energy Efficiency and Use in the Period That Followed the Global Financial Crisis. Energy Policy 139: 111304. [Google Scholar] [CrossRef]
- Atsalakis, George S., and Kimon P. Valavanis. 2009. Surveying Stock Market Forecasting Techniques—Part II: Soft Computing Methods. Expert Systems with Applications 36, Pt 2: 5932–41. [Google Scholar] [CrossRef]
- Ballings, Michel, Dirk Van den Poel, Nathalie Hespeels, and Ruben Gryp. 2015. Evaluating Multiple Classifiers for Stock Price Direction Prediction. Expert Systems with Applications 42: 7046–56. [Google Scholar] [CrossRef]
- Basak, Suryoday, Saibal Kar, Snehanshu Saha, Luckyson Khaidem, and Sudeepa Roy Dey. 2019. Predicting the Direction of Stock Market Prices Using Tree-Based Classifiers. The North American Journal of Economics and Finance 47: 552–67. [Google Scholar] [CrossRef]
- Bohl, Martin T., Philipp Kaufmann, and Patrick M. Stephan. 2013. From Hero to Zero: Evidence of Performance Reversal and Speculative Bubbles in German Renewable Energy Stocks. Energy Economics 37: 40–51. [Google Scholar] [CrossRef] [Green Version]
- Bondia, Ripsy, Sajal Ghosh, and Kakali Kanjilal. 2016. International Crude Oil Prices and the Stock Prices of Clean Energy and Technology Companies: Evidence from Non-Linear Cointegration Tests with Unknown Structural Breaks. Energy 101: 558–65. [Google Scholar] [CrossRef]
- Breiman, Leo. 2001. Random Forests. Machine Learning 45: 5–32. [Google Scholar] [CrossRef] [Green Version]
- Breiman, Leo, Adele Cutler, Andy Liaw, and Matthew Wiener. 2018. RandomForest: Breiman and Cutler’s Random Forests for Classification and Regression. R Package Version 4.6-14. Available online: https://www.stat.berkeley.edu/~breiman/RandomForests/ (accessed on 25 August 2020).
- Bustos, O, and A. Pomares-Quimbaya. 2020. Stock Market Movement Forecast: A Systematic Review. Expert Systems with Applications 156: 113464. [Google Scholar] [CrossRef]
- Christoffersen, Peter F., and Francis X. Diebold. 2006. Financial Asset Returns, Direction-of-Change Forecasting, and Volatility Dynamics. Management Science 52: 1273–87. [Google Scholar] [CrossRef] [Green Version]
- Dawar, Ishaan, Anupam Dutta, Elie Bouri, and Tareq Saeed. 2021. Crude Oil Prices and Clean Energy Stock Indices: Lagged and Asymmetric Effects with Quantile Regression. Renewable Energy 163: 288–99. [Google Scholar] [CrossRef]
- Dutta, Anupam. 2017. Oil Price Uncertainty and Clean Energy Stock Returns: New Evidence from Crude Oil Volatility Index. Journal of Cleaner Production 164: 1157–66. [Google Scholar] [CrossRef]
- Dutta, Anupam, Elie Bouri, and Md Hasib Noor. 2018. Return and Volatility Linkages between CO2 Emission and Clean Energy Stock Prices. Energy 164: 803–10. [Google Scholar] [CrossRef]
- Elie, Bouri, Jalkh Naji, Anupam Dutta, and Gazi Salah Uddin. 2019. Gold and Crude Oil as Safe-Haven Assets for Clean Energy Stock Indices: Blended Copulas Approach. Energy 178: 544–53. [Google Scholar] [CrossRef]
- Frankfurt School-UNEP Centre/BNEF. 2020. Global Trends in Renewable Energy Investment 2020. Frankfurt am Main: Frankfurt School of Finance & Management gGmbH. [Google Scholar]
- Ghoddusi, Hamed, Germán G. Creamer, and Nima Rafizadeh. 2019. Machine Learning in Energy Economics and Finance: A Review. Energy Economics 81: 709–27. [Google Scholar] [CrossRef]
- Gray, Wesley, and Jack Vogel. 2016. Quantitative Momentum: A Practitioner’s Guide to Building a Momentum-Based Stock Selection System. Hoboken: John Wiley & Sons. [Google Scholar]
- Gupta, Kartick. 2017. Do Economic and Societal Factors Influence the Financial Performance of Alternative Energy Firms? Energy Economics 65: 172–82. [Google Scholar] [CrossRef]
- Henrique, Bruno Miranda, Vinicius Amorim Sobreiro, and Herbert Kimura. 2019. Literature Review: Machine Learning Techniques Applied to Financial Market Prediction. Expert Systems with Applications 124: 226–51. [Google Scholar] [CrossRef]
- Henriques, Irene, and Perry Sadorsky. 2008. Oil Prices and the Stock Prices of Alternative Energy Companies. Energy Economics 30: 998–1010. [Google Scholar] [CrossRef]
- James, Gareth, Daniela Witten, Trevor Hastie, and Robert Tibshirani. 2013. An Introduction to Statistical Learning: With Applications in R. Springer Texts in Statistics. New York: Springer. [Google Scholar] [CrossRef]
- Khan, Wasiat, Mustansar Ali Ghazanfar, Muhammad Awais Azam, Amin Karami, Khaled H. Alyoubi, and Ahmed S. Alfakeeh. 2020. Stock Market Prediction Using Machine Learning Classifiers and Social Media, News. Journal of Ambient Intelligence and Humanized Computing. [Google Scholar] [CrossRef]
- Kumar, Surender, Shunsuke Managi, and Akimi Matsuda. 2012. Stock Prices of Clean Energy Firms, Oil and Carbon Markets: A Vector Autoregressive Analysis. Energy Economics 34: 215–26. [Google Scholar] [CrossRef]
- Leung, Mark T., Hazem Daouk, and An-Sing Chen. 2000. Forecasting Stock Indices: A Comparison of Classification and Level Estimation Models. International Journal of Forecasting 16: 173–90. [Google Scholar] [CrossRef]
- Lo, Andrew W., Harry Mamaysky, and Jiang Wang. 2000. Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation. The Journal of Finance 55: 1705–65. [Google Scholar] [CrossRef] [Green Version]
- Lohrmann, Christoph, and Pasi Luukka. 2019. Classification of Intraday S&P500 Returns with a Random Forest. International Journal of Forecasting 35: 390–407. [Google Scholar] [CrossRef]
- Maghyereh, Aktham I., Basel Awartani, and Hussein Abdoh. 2019. The Co-Movement between Oil and Clean Energy Stocks: A Wavelet-Based Analysis of Horizon Associations. Energy 169: 895–913. [Google Scholar] [CrossRef]
- Malkiel, Burton G. 2003. The Efficient Market Hypothesis and Its Critics. Journal of Economic Perspectives 17: 59–82. [Google Scholar] [CrossRef] [Green Version]
- Mallqui, Dennys C. A., and Ricardo A. S. Fernandes. 2019. Predicting the Direction, Maximum, Minimum and Closing Prices of Daily Bitcoin Exchange Rate Using Machine Learning Techniques. Applied Soft Computing 75: 596–606. [Google Scholar] [CrossRef]
- Managi, Shunsuke, and Tatsuyoshi Okimoto. 2013. Does the Price of Oil Interact with Clean Energy Prices in the Stock Market? Japan and the World Economy 27: 1–9. [Google Scholar] [CrossRef] [Green Version]
- Mokoaleli-Mokoteli, Thabang, Shaun Ramsumar, and Hima Vadapalli. 2019. The Efficiency of Ensemble Classifiers in Predicting the Johannesburg Stock Exchange All-Share Index Direction. Journal of Financial Management, Markets and Institutions 7: 1950001. [Google Scholar] [CrossRef]
- Moskowitz, Tobias J., Yao Hua Ooi, and Lasse Heje Pedersen. 2012. Time Series Momentum. Journal of Financial Economics 104: 228–50. [Google Scholar] [CrossRef] [Green Version]
- Mullainathan, Sendhil, and Jann Spiess. 2017. Machine Learning: An Applied Econometric Approach. Journal of Economic Perspectives 31: 87–106. [Google Scholar] [CrossRef] [Green Version]
- Mundaca, Luis, and Jessika Luth Richter. 2015. Assessing ‘Green Energy Economy’ Stimulus Packages: Evidence from the U.S. Programs Targeting Renewable Energy. Renewable and Sustainable Energy Reviews 42: 1174–86. [Google Scholar] [CrossRef] [Green Version]
- Neely, Christopher J., David E. Rapach, Jun Tu, and Guofu Zhou. 2014. Forecasting the Equity Risk Premium: The Role of Technical Indicators. Management Science 60: 1772–91. [Google Scholar] [CrossRef] [Green Version]
- Nti, Isaac Kofi, Adebayo Felix Adekoya, and Benjamin Asubam Weyori. 2020. A Comprehensive Evaluation of Ensemble Learning for Stock-Market Prediction. Journal of Big Data 7: 20. [Google Scholar] [CrossRef]
- Nyberg, Henri. 2011. Forecasting the Direction of the US Stock Market with Dynamic Binary Probit Models. International Journal of Forecasting 27: 561–78. [Google Scholar] [CrossRef]
- Nyberg, Henri, and Harri Pönkä. 2016. International Sign Predictability of Stock Returns: The Role of the United States. Economic Modelling 58: 323–38. [Google Scholar] [CrossRef] [Green Version]
- Park, Cheol-Ho, and Scott H. Irwin. 2007. What Do We Know About the Profitability of Technical Analysis? Journal of Economic Surveys 21: 786–826. [Google Scholar] [CrossRef]
- Pönkä, Harri. 2016. Real Oil Prices and the International Sign Predictability of Stock Returns. Finance Research Letters 17: 79–87. [Google Scholar] [CrossRef] [Green Version]
- R Core Team. 2019. R: A Language and Environment for Statistical Computing (Version R Version 3.6.0 (2019-04-26)). Vienna: The R Project for Statistical Computing, Available online: https://www.r-project.org/ (accessed on 25 August 2020).
- Reboredo, Juan C. 2015. Is There Dependence and Systemic Risk between Oil and Renewable Energy Stock Prices? Energy Economics 48: 32–45. [Google Scholar] [CrossRef]
- Reboredo, Juan C., and Andrea Ugolini. 2018. The Impact of Energy Prices on Clean Energy Stock Prices. A Multivariate Quantile Dependence Approach. Energy Economics 76: 136–52. [Google Scholar] [CrossRef]
- Reboredo, Juan C., Miguel A. Rivera-Castro, and Andrea Ugolini. 2017a. Wavelet-Based Test of Co-Movement and Causality between Oil and Renewable Energy Stock Prices. Energy Economics 61: 241–52. [Google Scholar] [CrossRef]
- Reboredo, Juan C., Miguel Quintela, and Luis A. Otero. 2017b. Do Investors Pay a Premium for Going Green? Evidence from Alternative Energy Mutual Funds. Renewable and Sustainable Energy Reviews 73: 512–20. [Google Scholar] [CrossRef]
- Sadorsky, Perry. 2012. Modeling Renewable Energy Company Risk. Energy Policy 40: 39–48. [Google Scholar] [CrossRef]
- Shah, Dev, Haruna Isah, and Farhana Zulkernine. 2019. Stock Market Analysis: A Review and Taxonomy of Prediction Techniques. International Journal of Financial Studies 7: 26. [Google Scholar] [CrossRef] [Green Version]
- The Economist. 2020. The World’s Energy System Must Be Transformed Completely. The Economist. [Google Scholar]
- Uddin, Gazi Salah, Md Lutfur Rahman, Axel Hedström, and Ali Ahmed. 2019. Cross-Quantilogram-Based Correlation and Dependence between Renewable Energy Stock and Other Asset Classes. Energy Economics 80: 743–59. [Google Scholar] [CrossRef]
- Wang, Yudong, Li Liu, and Chongfeng Wu. 2020. Forecasting Commodity Prices Out-of-Sample: Can Technical Indicators Help? International Journal of Forecasting 36: 666–83. [Google Scholar] [CrossRef]
- Wen, Xiaoqian, Yanfeng Guo, Yu Wei, and Dengshi Huang. 2014. How Do the Stock Prices of New Energy and Fossil Fuel Companies Correlate? Evidence from China. Energy Economics 41: 63–75. [Google Scholar] [CrossRef]
- Weng, Bin, Lin Lu, Xing Wang, Fadel M. Megahed, and Waldyn Martinez. 2018. Predicting Short-Term Stock Prices Using Ensemble Methods and Online Data Sources. Expert Systems with Applications 112: 258–73. [Google Scholar] [CrossRef]
- Yin, Libo, and Qingyuan Yang. 2016. Predicting the Oil Prices: Do Technical Indicators Help? Energy Economics 56: 338–50. [Google Scholar] [CrossRef]
- Yin, Libo, Qingyuan Yang, and Zhi Su. 2017. Predictability of Structural Co-Movement in Commodity Prices: The Role of Technical Indicators. Quantitative Finance 17: 795–812. [Google Scholar] [CrossRef]
PBW | DOWN | UP | MD Accuracy | MD Gini |
RSI | 27.25 | 25.08 | 39.08 | 83.52 |
STOFASTK | 21.72 | 32.02 | 40.34 | 88.16 |
STOFASTD | 23.57 | 30.88 | 41.60 | 87.75 |
STOSLOWD | 24.69 | 37.53 | 48.96 | 92.61 |
ADX | 47.96 | 35.96 | 59.22 | 113.76 |
MACD | 31.61 | 32.30 | 49.15 | 95.34 |
MACD SIG | 40.14 | 47.23 | 61.07 | 112.65 |
ROC | 22.92 | 31.45 | 42.71 | 89.70 |
OBV | 40.38 | 65.52 | 78.83 | 159.42 |
MA200 | 55.16 | 59.05 | 76.69 | 163.43 |
ICLN | DOWN | UP | MD Accuracy | MD Gini |
RSI | 25.22 | 26.11 | 43.73 | 84.61 |
STOFASTK | 24.96 | 28.46 | 38.39 | 90.97 |
STOFASTD | 24.25 | 29.09 | 40.42 | 90.17 |
STOSLOWD | 27.16 | 33.68 | 45.18 | 99.41 |
ADX | 42.63 | 45.21 | 57.23 | 118.19 |
MACD | 31.44 | 33.40 | 52.24 | 98.33 |
MACD SIG | 39.21 | 44.27 | 65.39 | 115.14 |
ROC | 28.61 | 34.54 | 44.93 | 94.22 |
OBV | 46.48 | 45.74 | 68.72 | 136.85 |
MA200 | 48.86 | 54.70 | 73.62 | 160.22 |
QCLN | DOWN | UP | MD Accuracy | MD Gini |
RSI | 21.12 | 27.75 | 38.94 | 80.18 |
STOFASTK | 17.55 | 31.33 | 41.97 | 82.94 |
STOFASTD | 19.79 | 25.81 | 38.73 | 79.04 |
STOSLOWD | 22.80 | 28.07 | 39.61 | 84.70 |
ADX | 48.87 | 39.29 | 57.54 | 121.13 |
MACD | 26.27 | 36.55 | 49.99 | 100.96 |
MACD SIG | 33.81 | 40.38 | 55.43 | 106.13 |
ROC | 20.09 | 28.05 | 37.88 | 83.31 |
OBV | 38.38 | 49.53 | 70.07 | 157.29 |
MA200 | 37.90 | 54.03 | 79.05 | 177.52 |
TAN | DOWN | UP | MD Accuracy | MD Gini |
RSI | 26.08 | 26.69 | 40.33 | 82.21 |
STOFASTK | 24.88 | 30.74 | 40.60 | 89.81 |
STOFASTD | 25.92 | 26.57 | 40.50 | 88.25 |
STOSLOWD | 27.52 | 31.09 | 48.16 | 92.26 |
ADX | 47.65 | 36.85 | 57.51 | 106.17 |
MACD | 35.33 | 33.96 | 57.22 | 97.09 |
MACD SIG | 46.82 | 41.11 | 63.02 | 119.30 |
ROC | 26.14 | 35.20 | 44.29 | 86.07 |
OBV | 40.31 | 44.17 | 62.35 | 143.25 |
MA200 | 57.22 | 65.98 | 87.26 | 188.03 |
FAN | DOWN | UP | MD Accuracy | MD Gini |
RSI | 19.60 | 31.69 | 40.69 | 83.58 |
STOFASTK | 29.17 | 28.86 | 40.30 | 89.74 |
STOFASTD | 24.42 | 31.22 | 39.79 | 85.90 |
STOSLOWD | 19.88 | 34.82 | 43.65 | 87.54 |
ADX | 43.40 | 43.42 | 61.05 | 106.36 |
MACD | 30.11 | 35.62 | 53.46 | 95.40 |
MACD SIG | 38.86 | 44.22 | 63.47 | 107.28 |
ROC | 29.82 | 32.87 | 42.90 | 88.70 |
OBV | 53.00 | 57.56 | 68.49 | 166.36 |
MA200 | 48.83 | 65.65 | 83.29 | 169.59 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sadorsky, P. A Random Forests Approach to Predicting Clean Energy Stock Prices. J. Risk Financial Manag. 2021, 14, 48. https://doi.org/10.3390/jrfm14020048
Sadorsky P. A Random Forests Approach to Predicting Clean Energy Stock Prices. Journal of Risk and Financial Management. 2021; 14(2):48. https://doi.org/10.3390/jrfm14020048
Chicago/Turabian StyleSadorsky, Perry. 2021. "A Random Forests Approach to Predicting Clean Energy Stock Prices" Journal of Risk and Financial Management 14, no. 2: 48. https://doi.org/10.3390/jrfm14020048
APA StyleSadorsky, P. (2021). A Random Forests Approach to Predicting Clean Energy Stock Prices. Journal of Risk and Financial Management, 14(2), 48. https://doi.org/10.3390/jrfm14020048