IDEAS home Printed from https://ideas.repec.org/a/gam/jjrfmx/v14y2021i2p48-d486224.html
   My bibliography  Save this article

A Random Forests Approach to Predicting Clean Energy Stock Prices

Author

Listed:
  • Perry Sadorsky

    (Schulich School of Business, York University, Toronto, ON M3J 1P3, Canada)

Abstract

Climate change, green consumers, energy security, fossil fuel divestment, and technological innovation are powerful forces shaping an increased interest towards investing in companies that specialize in clean energy. Well informed investors need reliable methods for predicting the stock prices of clean energy companies. While the existing literature on forecasting stock prices shows how difficult it is to predict stock prices, there is evidence that predicting stock price direction is more successful than predicting actual stock prices. This paper uses the machine learning method of random forests to predict the stock price direction of clean energy exchange traded funds. Some well-known technical indicators are used as features. Decision tree bagging and random forests predictions of stock price direction are more accurate than those obtained from logit models. For a 20-day forecast horizon, tree bagging and random forests methods produce accuracy rates of between 85% and 90% while logit models produce accuracy rates of between 55% and 60%. Tree bagging and random forests are easy to understand and estimate and are useful methods for forecasting the stock price direction of clean energy stocks.

Suggested Citation

  • Perry Sadorsky, 2021. "A Random Forests Approach to Predicting Clean Energy Stock Prices," JRFM, MDPI, vol. 14(2), pages 1-20, January.
  • Handle: RePEc:gam:jjrfmx:v:14:y:2021:i:2:p:48-:d:486224
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1911-8074/14/2/48/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1911-8074/14/2/48/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Gupta, Kartick, 2017. "Do economic and societal factors influence the financial performance of alternative energy firms?," Energy Economics, Elsevier, vol. 65(C), pages 172-182.
    2. Pönkä, Harri, 2016. "Real oil prices and the international sign predictability of stock returns," Finance Research Letters, Elsevier, vol. 17(C), pages 79-87.
    3. Sadorsky, Perry, 2012. "Modeling renewable energy company risk," Energy Policy, Elsevier, vol. 40(C), pages 39-48.
    4. Elie, Bouri & Naji, Jalkh & Dutta, Anupam & Uddin, Gazi Salah, 2019. "Gold and crude oil as safe-haven assets for clean energy stock indices: Blended copulas approach," Energy, Elsevier, vol. 178(C), pages 544-553.
    5. Cheol‐Ho Park & Scott H. Irwin, 2007. "What Do We Know About The Profitability Of Technical Analysis?," Journal of Economic Surveys, Wiley Blackwell, vol. 21(4), pages 786-826, September.
    6. Reboredo, Juan C. & Ugolini, Andrea, 2018. "The impact of energy prices on clean energy stock prices. A multivariate quantile dependence approach," Energy Economics, Elsevier, vol. 76(C), pages 136-152.
    7. Managi, Shunsuke & Okimoto, Tatsuyoshi, 2013. "Does the price of oil interact with clean energy prices in the stock market?," Japan and the World Economy, Elsevier, vol. 27(C), pages 1-9.
    8. Thabang Mokoaleli-Mokoteli & Shaun Ramsumar & 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 (JFMMI), World Scientific Publishing Co. Pte. Ltd., vol. 7(02), pages 1-18, December.
    9. Wang, Yudong & Liu, Li & Wu, Chongfeng, 2020. "Forecasting commodity prices out-of-sample: Can technical indicators help?," International Journal of Forecasting, Elsevier, vol. 36(2), pages 666-683.
    10. Libo Yin & Qingyuan Yang & Zhi Su, 2017. "Predictability of structural co-movement in commodity prices: the role of technical indicators," Quantitative Finance, Taylor & Francis Journals, vol. 17(5), pages 795-812, May.
    11. Basak, Suryoday & Kar, Saibal & Saha, Snehanshu & Khaidem, Luckyson & Dey, Sudeepa Roy, 2019. "Predicting the direction of stock market prices using tree-based classifiers," The North American Journal of Economics and Finance, Elsevier, vol. 47(C), pages 552-567.
    12. Christopher J. Neely & David E. Rapach & Jun Tu & Guofu Zhou, 2014. "Forecasting the Equity Risk Premium: The Role of Technical Indicators," Management Science, INFORMS, vol. 60(7), pages 1772-1791, July.
    13. Henriques, Irene & Sadorsky, Perry, 2008. "Oil prices and the stock prices of alternative energy companies," Energy Economics, Elsevier, vol. 30(3), pages 998-1010, May.
    14. Burton G. Malkiel, 2003. "The Efficient Market Hypothesis and Its Critics," Working Papers 111, Princeton University, Department of Economics, Center for Economic Policy Studies..
    15. Burton G. Malkiel, 2003. "The Efficient Market Hypothesis and Its Critics," Working Papers 111, Princeton University, Department of Economics, Center for Economic Policy Studies..
    16. repec:pri:cepsud:91malkiel is not listed on IDEAS
    17. Bohl, Martin T. & Kaufmann, Philipp & Stephan, Patrick M., 2013. "From hero to zero: Evidence of performance reversal and speculative bubbles in German renewable energy stocks," Energy Economics, Elsevier, vol. 37(C), pages 40-51.
    18. Peter F. Christoffersen & Francis X. Diebold, 2006. "Financial Asset Returns, Direction-of-Change Forecasting, and Volatility Dynamics," Management Science, INFORMS, vol. 52(8), pages 1273-1287, August.
    19. Andrew W. Lo & Harry Mamaysky & Jiang Wang, 2000. "Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation," Journal of Finance, American Finance Association, vol. 55(4), pages 1705-1765, August.
    20. Wen, Xiaoqian & Guo, Yanfeng & Wei, Yu & Huang, Dengshi, 2014. "How do the stock prices of new energy and fossil fuel companies correlate? Evidence from China," Energy Economics, Elsevier, vol. 41(C), pages 63-75.
    21. Kumar, Surender & Managi, Shunsuke & Matsuda, Akimi, 2012. "Stock prices of clean energy firms, oil and carbon markets: A vector autoregressive analysis," Energy Economics, Elsevier, vol. 34(1), pages 215-226.
    22. Bondia, Ripsy & Ghosh, Sajal & Kanjilal, Kakali, 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, Elsevier, vol. 101(C), pages 558-565.
    23. Dawar, Ishaan & Dutta, Anupam & Bouri, Elie & Saeed, Tareq, 2021. "Crude oil prices and clean energy stock indices: Lagged and asymmetric effects with quantile regression," Renewable Energy, Elsevier, vol. 163(C), pages 288-299.
    24. Moskowitz, Tobias J. & Ooi, Yao Hua & Pedersen, Lasse Heje, 2012. "Time series momentum," Journal of Financial Economics, Elsevier, vol. 104(2), pages 228-250.
    25. Reboredo, Juan C. & Rivera-Castro, Miguel A. & Ugolini, Andrea, 2017. "Wavelet-based test of co-movement and causality between oil and renewable energy stock prices," Energy Economics, Elsevier, vol. 61(C), pages 241-252.
    26. Dutta, Anupam & Bouri, Elie & Noor, Md Hasib, 2018. "Return and volatility linkages between CO2 emission and clean energy stock prices," Energy, Elsevier, vol. 164(C), pages 803-810.
    27. Reboredo, Juan C., 2015. "Is there dependence and systemic risk between oil and renewable energy stock prices?," Energy Economics, Elsevier, vol. 48(C), pages 32-45.
    28. Nyberg, Henri & Pönkä, Harri, 2016. "International sign predictability of stock returns: The role of the United States," Economic Modelling, Elsevier, vol. 58(C), pages 323-338.
    29. Lohrmann, Christoph & Luukka, Pasi, 2019. "Classification of intraday S&P500 returns with a Random Forest," International Journal of Forecasting, Elsevier, vol. 35(1), pages 390-407.
    30. Ghoddusi, Hamed & Creamer, Germán G. & Rafizadeh, Nima, 2019. "Machine learning in energy economics and finance: A review," Energy Economics, Elsevier, vol. 81(C), pages 709-727.
    31. Burton G. Malkiel, 2003. "The Efficient Market Hypothesis and Its Critics," Journal of Economic Perspectives, American Economic Association, vol. 17(1), pages 59-82, Winter.
    32. Maghyereh, Aktham I. & Awartani, Basel & Abdoh, Hussein, 2019. "The co-movement between oil and clean energy stocks: A wavelet-based analysis of horizon associations," Energy, Elsevier, vol. 169(C), pages 895-913.
    33. Leung, Mark T. & Daouk, Hazem & Chen, An-Sing, 2000. "Forecasting stock indices: a comparison of classification and level estimation models," International Journal of Forecasting, Elsevier, vol. 16(2), pages 173-190.
    34. Nyberg, Henri, 2011. "Forecasting the direction of the US stock market with dynamic binary probit models," International Journal of Forecasting, Elsevier, vol. 27(2), pages 561-578.
    35. Nyberg, Henri, 2011. "Forecasting the direction of the US stock market with dynamic binary probit models," International Journal of Forecasting, Elsevier, vol. 27(2), pages 561-578, April.
    36. Yin, Libo & Yang, Qingyuan, 2016. "Predicting the oil prices: Do technical indicators help?," Energy Economics, Elsevier, vol. 56(C), pages 338-350.
    37. Sendhil Mullainathan & Jann Spiess, 2017. "Machine Learning: An Applied Econometric Approach," Journal of Economic Perspectives, American Economic Association, vol. 31(2), pages 87-106, Spring.
    38. Mundaca, Luis & Luth Richter, Jessika, 2015. "Assessing ‘green energy economy’ stimulus packages: Evidence from the U.S. programs targeting renewable energy," Renewable and Sustainable Energy Reviews, Elsevier, vol. 42(C), pages 1174-1186.
    39. Uddin, Gazi Salah & Rahman, Md Lutfur & Hedström, Axel & Ahmed, Ali, 2019. "Cross-quantilogram-based correlation and dependence between renewable energy stock and other asset classes," Energy Economics, Elsevier, vol. 80(C), pages 743-759.
    40. Andreoni, Valeria, 2020. "The energy metabolism of countries: Energy efficiency and use in the period that followed the global financial crisis," Energy Policy, Elsevier, vol. 139(C).
    41. Dev Shah & Haruna Isah & Farhana Zulkernine, 2019. "Stock Market Analysis: A Review and Taxonomy of Prediction Techniques," IJFS, MDPI, vol. 7(2), pages 1-22, May.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Day, Min-Yuh & Ni, Yensen, 2023. "Do clean energy indices outperform using contrarian strategies based on contrarian trading rules?," Energy, Elsevier, vol. 272(C).
    2. Ivan Borisov Todorov & Fernando Sánchez Lasheras, 2022. "Forecasting Applied to the Electricity, Energy, Gas and Oil Industries: A Systematic Review," Mathematics, MDPI, vol. 10(21), pages 1-15, October.
    3. Farid Bagheri & Diego Reforgiato Recupero & Espen Sirnes, 2023. "Leveraging Return Prediction Approaches for Improved Value-at-Risk Estimation," Data, MDPI, vol. 8(8), pages 1-22, August.
    4. Marian Pompiliu Cristescu & Raluca Andreea Nerisanu & Dumitru Alexandru Mara & Simona-Vasilica Oprea, 2022. "Using Market News Sentiment Analysis for Stock Market Prediction," Mathematics, MDPI, vol. 10(22), pages 1-12, November.
    5. Qiang Gao & Xinzhu Zhou & Kunpeng Zhang & Li Huang & Siyuan Liu & Fan Zhou, 2022. "Incorporating Interactive Facts for Stock Selection via Neural Recursive ODEs," Papers 2210.15925, arXiv.org.
    6. Htet Htet Htun & Michael Biehl & Nicolai Petkov, 2023. "Survey of feature selection and extraction techniques for stock market prediction," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-25, December.
    7. Perry Sadorsky, 2021. "Predicting Gold and Silver Price Direction Using Tree-Based Classifiers," JRFM, MDPI, vol. 14(5), pages 1-21, April.
    8. Nawaf Almaskati, 2022. "Machine learning in finance: Major applications, issues, metrics, and future trends," International Journal of Financial Engineering (IJFE), World Scientific Publishing Co. Pte. Ltd., vol. 9(03), pages 1-32, September.
    9. Sadorsky, Perry, 2022. "Forecasting solar stock prices using tree-based machine learning classification: How important are silver prices?," The North American Journal of Economics and Finance, Elsevier, vol. 61(C).
    10. Cecilia Martinez-Castillo & Gonzalo Astray & Juan Carlos Mejuto, 2021. "Modelling and Prediction of Monthly Global Irradiation Using Different Prediction Models," Energies, MDPI, vol. 14(8), pages 1-16, April.
    11. Munish Khanna & Mohak Kulshrestha & Law K. Singh & Shankar Thawkar & Kapil Shrivastava, 2022. "Performance Evaluation of Machine Learning Algorithms for Stock Price and Stock Index Movement Prediction Using Trend Deterministic Data Prediction," International Journal of Applied Metaheuristic Computing (IJAMC), IGI Global, vol. 13(1), pages 1-30, January.
    12. Min-Yuh Day & Yensen Ni & Chinning Hsu & Paoyu Huang, 2022. "Do Investment Strategies Matter for Trading Global Clean Energy and Global Energy ETFs?," Energies, MDPI, vol. 15(9), pages 1-15, May.
    13. Ghosh, Pushpendu & Neufeld, Ariel & Sahoo, Jajati Keshari, 2022. "Forecasting directional movements of stock prices for intraday trading using LSTM and random forests," Finance Research Letters, Elsevier, vol. 46(PA).

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Sadorsky, Perry, 2022. "Forecasting solar stock prices using tree-based machine learning classification: How important are silver prices?," The North American Journal of Economics and Finance, Elsevier, vol. 61(C).
    2. Syed Abul, Basher & Perry, Sadorsky, 2022. "Forecasting Bitcoin price direction with random forests: How important are interest rates, inflation, and market volatility?," MPRA Paper 113293, University Library of Munich, Germany.
    3. Tan, Xueping & Geng, Yong & Vivian, Andrew & Wang, Xinyu, 2021. "Measuring risk spillovers between oil and clean energy stocks: Evidence from a systematic framework," Resources Policy, Elsevier, vol. 74(C).
    4. Fernanda Fuentes & Rodrigo Herrera, 2020. "Dynamics of Connectedness in Clean Energy Stocks," Energies, MDPI, vol. 13(14), pages 1-19, July.
    5. Perry Sadorsky, 2021. "Predicting Gold and Silver Price Direction Using Tree-Based Classifiers," JRFM, MDPI, vol. 14(5), pages 1-21, April.
    6. Yahya, Muhammad & Ghosh, Sajal & Kanjilal, Kakali & Dutta, Anupam & Uddin, Gazi Salah, 2020. "Evaluation of cross-quantile dependence and causality between non-ferrous metals and clean energy indexes," Energy, Elsevier, vol. 202(C).
    7. Zeyi Fu & Hongli Niu & Weiqing Wang, 2023. "Market Efficiency and Cross-Correlations of Chinese New Energy Market with Other Assets: Evidence from Multifractality Analysis," Computational Economics, Springer;Society for Computational Economics, vol. 62(3), pages 1287-1311, October.
    8. Hemrit, Wael & Benlagha, Noureddine, 2021. "Does renewable energy index respond to the pandemic uncertainty?," Renewable Energy, Elsevier, vol. 177(C), pages 336-347.
    9. Gu, Fu & Wang, Jiqiang & Guo, Jianfeng & Fan, Ying, 2020. "How the supply and demand of steam coal affect the investment in clean energy industry? Evidence from China," Resources Policy, Elsevier, vol. 69(C).
    10. Matteo Foglia & Eliana Angelini, 2020. "Volatility Connectedness between Clean Energy Firms and Crude Oil in the COVID-19 Era," Sustainability, MDPI, vol. 12(23), pages 1-22, November.
    11. Yahya, Muhammad & Kanjilal, Kakali & Dutta, Anupam & Uddin, Gazi Salah & Ghosh, Sajal, 2021. "Can clean energy stock price rule oil price? New evidences from a regime-switching model at first and second moments," Energy Economics, Elsevier, vol. 95(C).
    12. He, Xiaojuan & Mishra, Shekhar & Aman, Ameenullah & Shahbaz, Muhammad & Razzaq, Asif & Sharif, Arshian, 2021. "The linkage between clean energy stocks and the fluctuations in oil price and financial stress in the US and Europe? Evidence from QARDL approach," Resources Policy, Elsevier, vol. 72(C).
    13. Capucine Nobletz, 2021. "Return spillovers between green energy indexes and financial markets: a first sectoral approach," EconomiX Working Papers 2021-24, University of Paris Nanterre, EconomiX.
    14. Urom, Christian & Mzoughi, Hela & Ndubuisi, Gideon & Guesmi, Khaled, 2022. "Directional predictability and time-frequency spillovers among clean energy sectors and oil price uncertainty," The Quarterly Review of Economics and Finance, Elsevier, vol. 85(C), pages 326-341.
    15. Umar, Muhammad & Farid, Saqib & Naeem, Muhammad Abubakr, 2022. "Time-frequency connectedness among clean-energy stocks and fossil fuel markets: Comparison between financial, oil and pandemic crisis," Energy, Elsevier, vol. 240(C).
    16. Dutta, Anupam & Bouri, Elie & Rothovius, Timo & Uddin, Gazi Salah, 2023. "Climate risk and green investments: New evidence," Energy, Elsevier, vol. 265(C).
    17. Asl, Mahdi Ghaemi & Canarella, Giorgio & Miller, Stephen M., 2021. "Dynamic asymmetric optimal portfolio allocation between energy stocks and energy commodities: Evidence from clean energy and oil and gas companies," Resources Policy, Elsevier, vol. 71(C).
    18. Niu, Hongli, 2021. "Correlations between crude oil and stocks prices of renewable energy and technology companies: A multiscale time-dependent analysis," Energy, Elsevier, vol. 221(C).
    19. Ahmed, Walid M.A. & Sleem, Mohamed A.E., 2023. "Short- and long-run determinants of the price behavior of US clean energy stocks: A dynamic ARDL simulations approach," Energy Economics, Elsevier, vol. 124(C).
    20. Chang, C-L. & Ilomäki, J. & Laurila, H. & McAleer, M.J., 2018. "Market Timing with Moving Averages for Fossil Fuel and Renewable Energy Stocks," Econometric Institute Research Papers EI2018-44, Erasmus University Rotterdam, Erasmus School of Economics (ESE), Econometric Institute.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jjrfmx:v:14:y:2021:i:2:p:48-:d:486224. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.