{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,20]],"date-time":"2026-07-20T17:22:36Z","timestamp":1784568156260,"version":"3.55.0"},"reference-count":63,"publisher":"MDPI AG","issue":"5","license":[{"start":{"date-parts":[[2021,4,29]],"date-time":"2021-04-29T00:00:00Z","timestamp":1619654400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["JRFM"],"abstract":"<jats:p>Gold is often used by investors as a hedge against inflation or adverse economic times. Consequently, it is important for investors to have accurate forecasts of gold prices. This paper uses several machine learning tree-based classifiers (bagging, stochastic gradient boosting, random forests) to predict the price direction of gold and silver exchange traded funds. Decision tree bagging, stochastic gradient boosting, and random forests predictions of gold and silver price direction are much more accurate than those obtained from logit models. For a 20-day forecast horizon, tree bagging, stochastic gradient boosting, and random forests produce accuracy rates of between 85% and 90% while logit models produce accuracy rates of between 55% and 60%. Stochastic gradient boosting accuracy is a few percentage points less than that of random forests for forecast horizons over 10 days. For those looking to forecast the direction of gold and silver prices, tree bagging and random forests offer an attractive combination of accuracy and ease of estimation. For each of gold and silver, a portfolio based on the random forests price direction forecasts outperformed a buy and hold portfolio.<\/jats:p>","DOI":"10.3390\/jrfm14050198","type":"journal-article","created":{"date-parts":[[2021,4,29]],"date-time":"2021-04-29T10:30:41Z","timestamp":1619692241000},"page":"198","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":54,"title":["Predicting Gold and Silver Price Direction Using Tree-Based Classifiers"],"prefix":"10.3390","volume":"14","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-1718-6732","authenticated-orcid":false,"given":"Perry","family":"Sadorsky","sequence":"first","affiliation":[{"name":"Schulich School of Business, York University, Toronto, ON M3J 1P3, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2021,4,29]]},"reference":[{"key":"ref_1","unstructured":"Achelis, Steven B. (2013). Technical Analysis from A to Z, McGraw-Hill Education. [2nd ed.]."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"250","DOI":"10.1016\/j.resourpol.2019.02.014","article-title":"Forecasting Gold Price Fluctuations Using Improved Multilayer Perceptron Neural Network and Whale Optimization Algorithm","volume":"61","author":"Alameer","year":"2019","journal-title":"Resources Policy"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"507","DOI":"10.1080\/1351847X.2013.854821","article-title":"When Times Get Tough, Gold Is Golden","volume":"21","author":"Areal","year":"2015","journal-title":"The European Journal of Finance"},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"257","DOI":"10.1016\/j.irfa.2015.03.010","article-title":"Forecasting the Price of Gold Using Dynamic Model Averaging","volume":"41","author":"Aye","year":"2015","journal-title":"International Review of Financial Analysis"},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"7046","DOI":"10.1016\/j.eswa.2015.05.013","article-title":"Evaluating Multiple Classifiers for Stock Price Direction Prediction","volume":"42","author":"Ballings","year":"2015","journal-title":"Expert Systems with Applications"},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"552","DOI":"10.1016\/j.najef.2018.06.013","article-title":"Predicting the Direction of Stock Market Prices Using Tree-Based Classifiers","volume":"47","author":"Basak","year":"2019","journal-title":"The North American Journal of Economics and Finance"},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"217","DOI":"10.1111\/j.1540-6288.2010.00244.x","article-title":"Is Gold a Hedge or a Safe Haven? An Analysis of Stocks, Bonds and Gold","volume":"45","author":"Baur","year":"2010","journal-title":"Financial Review"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"1886","DOI":"10.1016\/j.jbankfin.2009.12.008","article-title":"Is Gold a Safe Haven? International Evidence","volume":"34","author":"Baur","year":"2010","journal-title":"Journal of Banking & Finance"},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"63","DOI":"10.1016\/j.jbef.2016.03.002","article-title":"Why Is Gold a Safe Haven?","volume":"1","author":"Baur","year":"2016","journal-title":"Journal of Behavioral and Experimental Finance"},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"16","DOI":"10.1016\/j.econmod.2014.10.044","article-title":"Does Gold Act as a Hedge or a Safe Haven for Stocks? A Smooth Transition Approach","volume":"48","author":"Beckmann","year":"2015","journal-title":"Economic Modelling"},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"317","DOI":"10.1016\/j.jimonfin.2017.02.010","article-title":"Black Swan Events and Safe Havens: The Role of Gold in Globally Integrated Emerging Markets","volume":"73","author":"Bekiros","year":"2017","journal-title":"Journal of International Money and Finance"},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"70","DOI":"10.1016\/j.csda.2017.11.003","article-title":"A Note on the Validity of Cross-Validation for Evaluating Autoregressive Time Series Prediction","volume":"120","author":"Bergmeir","year":"2018","journal-title":"Computational Statistics & Data Analysis"},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"35","DOI":"10.1016\/j.jeconbus.2009.07.001","article-title":"Gold Prices, Cost of Carry, and Expected Inflation","volume":"62","author":"Blose","year":"2010","journal-title":"Journal of Economics and Business"},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"5","DOI":"10.1023\/A:1010933404324","article-title":"Random Forests","volume":"45","author":"Breiman","year":"2001","journal-title":"Machine Learning"},{"key":"ref_15","unstructured":"Breiman, Leo, Cutler, Adele, Liaw, Andy, and Wiener, Matthew (2021, March 30). RandomForest: Breiman and Cutler\u2019s Random Forests for Classification and Regression. Available online: https:\/\/www.stat.berkeley.edu\/~breiman\/RandomForests\/."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"113464","DOI":"10.1016\/j.eswa.2020.113464","article-title":"Stock Market Movement Forecast: A Systematic Review","volume":"156","author":"Bustos","year":"2020","journal-title":"Expert Systems with Applications"},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"202","DOI":"10.1016\/j.irfa.2012.12.001","article-title":"Hedges and Safe Havens: An Examination of Stocks, Bonds, Gold, Oil and Exchange Rates","volume":"29","author":"Ciner","year":"2013","journal-title":"International Review of Financial Analysis"},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"1189","DOI":"10.1214\/aos\/1013203451","article-title":"Greedy Function Approximation: A Gradient Boosting Machine","volume":"29","author":"Friedman","year":"2001","journal-title":"The Annals of Statistics"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"6","DOI":"10.1016\/j.iimb.2015.11.001","article-title":"Forecasting the Price of Gold: An Error Correction Approach","volume":"28","author":"Gangopadhyay","year":"2016","journal-title":"IIMB Management Review"},{"key":"ref_20","unstructured":"Greenwell, Brandon, Boehmke, Bradley, Cunningham, Jay, and Developers, G. B. M. (2021, March 30). Gbm: Generalized Boosted Regression Models (version 2.1.8). Available online: https:\/\/CRAN.R-project.org\/package=gbm."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"4141","DOI":"10.1080\/00036846.2015.1026580","article-title":"Forecasting the Price of Gold","volume":"47","author":"Hassani","year":"2015","journal-title":"Applied Economics"},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Hastie, Trevor, Tibshirani, Robert, and Friedman, Jerome (2009). The Elements of Statistical Learning: Data Mining, Inference, and Prediction, Springer. [2nd ed.].","DOI":"10.1007\/978-0-387-84858-7"},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"98","DOI":"10.2469\/faj.v62.n2.4085","article-title":"Do Precious Metals Shine? An Investment Perspective","volume":"62","author":"Hillier","year":"2006","journal-title":"Financial Analysts Journal"},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"54","DOI":"10.1016\/j.econmod.2015.12.013","article-title":"Is Gold a Hedge against Inflation? New Evidence from a Nonlinear ARDL Approach","volume":"54","author":"Hoang","year":"2016","journal-title":"Economic Modelling"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"47","DOI":"10.1016\/j.rfe.2013.03.001","article-title":"Is Gold the Best Hedge and a Safe Haven under Changing Stock Market Volatility?","volume":"22","author":"Hood","year":"2013","journal-title":"Review of Financial Economics"},{"key":"ref_26","unstructured":"ICE Benchmark Administration Limited (IBA) (2021, March 30). Gold Fixing Price 10:30 a.m. (London Time) in London Bullion Market, Based in U.S. Dollars. FRED, Federal Reserve Bank of St. Louis. FRED, Federal Reserve Bank of St. Louis. 1 April 2021. Available online: https:\/\/fred.stlouisfed.org\/series\/GOLDAMGBD228NLBM."},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1016\/j.iref.2016.11.005","article-title":"Does Gold Hedge Stock Market, Inflation and Exchange Rate Risks? An Econometric Investigation","volume":"48","author":"Iqbal","year":"2017","journal-title":"International Review of Economics & Finance"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"James, Gareth, Witten, Daniela, Hastie, Trevor, and Tibshirani, Robert (2013). An Introduction to Statistical Learning: With Applications in R, Springer. Springer Texts in Statistics.","DOI":"10.1007\/978-1-4614-7138-7"},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Jiang, Zhenlong, Ji, Ran, and Chang, Kuo-Chu (2020). A Machine Learning Integrated Portfolio Rebalance Framework with Risk-Aversion Adjustment. Journal of Risk and Financial Management, 13.","DOI":"10.3390\/jrfm13070155"},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"255","DOI":"10.1016\/j.intfin.2018.01.002","article-title":"Commodity Market Based Hedging against Stock Market Risk in Times of Financial Crisis: The Case of Crude Oil and Gold","volume":"56","author":"Junttila","year":"2018","journal-title":"Journal of International Financial Markets, Institutions and Money"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Kim, Eun-chong, Jeong, Han-wook, and Lee, Nak-young (2019). Global Asset Allocation Strategy Using a Hidden Markov Model. Journal of Risk and Financial Management, 12.","DOI":"10.3390\/jrfm12040168"},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Koker, Thomas E., and Koutmos, Dimitrios (2020). Cryptocurrency Trading Using Machine Learning. Journal of Risk and Financial Management, 13.","DOI":"10.3390\/jrfm13080178"},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"7245","DOI":"10.1016\/j.eswa.2015.04.058","article-title":"Gold Price Volatility: A Forecasting Approach Using the Artificial Neural Network\u2013GARCH Model","volume":"42","author":"Kristjanpoller","year":"2015","journal-title":"Expert Systems with Applications"},{"key":"ref_34","unstructured":"Kuhn, Max, Wing, Jed, Weston, Steve, Williams, Andre, Keefer, Chris, Engelhardt, Allan, and Cooper, Tony (2021, March 30). Caret: Classification and Regression Training (version 6.0-86). Available online: https:\/\/CRAN.R-project.org\/package=caret."},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"173","DOI":"10.1016\/S0169-2070(99)00048-5","article-title":"Forecasting Stock Indices: A Comparison of Classification and Level Estimation Models","volume":"16","author":"Leung","year":"2000","journal-title":"International Journal of Forecasting"},{"key":"ref_36","unstructured":"Xu, Jiuping, Hajiyev, Asaf, Nickel, Stefan, and Gen, Mitsuo (2017). Gold Price Forecasting and Related Influence Factors Analysis Based on Random Forest. Proceedings of the Tenth International Conference on Management Science and Engineering Management, Springer. Advances in Intelligent Systems and Computing."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"17351","DOI":"10.1007\/s00521-020-04867-x","article-title":"A CNN\u2013LSTM Model for Gold Price Time-Series Forecasting","volume":"32","author":"Livieris","year":"2020","journal-title":"Neural Computing and Applications"},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"390","DOI":"10.1016\/j.ijforecast.2018.08.004","article-title":"Classification of Intraday S&P500 Returns with a Random Forest","volume":"35","author":"Lohrmann","year":"2019","journal-title":"International Journal of Forecasting"},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Mahato, P. K., and Attar, V. (, January August). Prediction of Gold and Silver Stock Price Using Ensemble Models. Paper presented at the 2014 International Conference on Advances in Engineering Technology Research (ICAETR 2014), Unnao, Kanpur, India.","DOI":"10.1109\/ICAETR.2014.7012821"},{"key":"ref_40","doi-asserted-by":"crossref","first-page":"1772","DOI":"10.1287\/mnsc.2013.1838","article-title":"Forecasting the Equity Risk Premium: The Role of Technical Indicators","volume":"60","author":"Neely","year":"2014","journal-title":"Management Science"},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"561","DOI":"10.1016\/j.ijforecast.2010.02.008","article-title":"Forecasting the Direction of the US Stock Market with Dynamic Binary Probit Models","volume":"27","author":"Nyberg","year":"2011","journal-title":"International Journal of Forecasting"},{"key":"ref_42","doi-asserted-by":"crossref","first-page":"323","DOI":"10.1016\/j.econmod.2016.06.013","article-title":"International Sign Predictability of Stock Returns: The Role of the United States","volume":"58","author":"Nyberg","year":"2016","journal-title":"Economic Modelling"},{"key":"ref_43","doi-asserted-by":"crossref","first-page":"186","DOI":"10.1016\/j.irfa.2015.07.005","article-title":"The Financial Economics of Gold\u2014A Survey","volume":"41","author":"Lucey","year":"2015","journal-title":"International Review of Financial Analysis"},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"477","DOI":"10.1016\/j.mulfin.2007.12.002","article-title":"Forecasting Gold Price Changes: Rolling and Recursive Neural Network Models","volume":"18","author":"Parisi","year":"2008","journal-title":"Journal of Multinational Financial Management"},{"key":"ref_45","doi-asserted-by":"crossref","first-page":"1167","DOI":"10.1007\/s00181-018-1558-9","article-title":"Forecasting Precious Metal Returns with Multivariate Random Forests","volume":"58","author":"Pierdzioch","year":"2020","journal-title":"Empirical Economics"},{"key":"ref_46","doi-asserted-by":"crossref","first-page":"46","DOI":"10.1080\/13504851.2014.925040","article-title":"Forecasting Gold-Price Fluctuations: A Real-Time Boosting Approach","volume":"22","author":"Pierdzioch","year":"2015","journal-title":"Applied Economics Letters"},{"key":"ref_47","doi-asserted-by":"crossref","first-page":"38","DOI":"10.1016\/j.najef.2015.10.015","article-title":"A Quantile-Boosting Approach to Forecasting Gold Returns","volume":"35","author":"Pierdzioch","year":"2016a","journal-title":"The North American Journal of Economics and Finance"},{"key":"ref_48","doi-asserted-by":"crossref","first-page":"95","DOI":"10.1016\/j.resourpol.2016.01.003","article-title":"A Boosting Approach to Forecasting the Volatility of Gold-Price Fluctuations under Flexible Loss","volume":"47","author":"Pierdzioch","year":"2016b","journal-title":"Resources Policy"},{"key":"ref_49","doi-asserted-by":"crossref","first-page":"5","DOI":"10.1007\/s10614-020-10019-z","article-title":"Gold Against the Machine","volume":"57","author":"Plakandaras","year":"2021","journal-title":"Computational Economics"},{"key":"ref_50","doi-asserted-by":"crossref","first-page":"79","DOI":"10.1016\/j.frl.2016.01.011","article-title":"Real Oil Prices and the International Sign Predictability of Stock Returns","volume":"17","year":"2016","journal-title":"Finance Research Letters"},{"key":"ref_51","unstructured":"R Core Team (2021, March 30). R: A Language and Environment for Statistical Computing, Available online: https:\/\/www.r-project.org\/."},{"key":"ref_52","doi-asserted-by":"crossref","first-page":"2665","DOI":"10.1016\/j.jbankfin.2013.03.020","article-title":"Is Gold a Safe Haven or a Hedge for the US Dollar? Implications for Risk Management","volume":"37","author":"Reboredo","year":"2013","journal-title":"Journal of Banking & Finance"},{"key":"ref_53","doi-asserted-by":"crossref","first-page":"601","DOI":"10.1016\/j.ijforecast.2018.11.008","article-title":"Combining Wavelet Decomposition with Machine Learning to Forecast Gold Returns","volume":"35","author":"Risse","year":"2019","journal-title":"International Journal of Forecasting"},{"key":"ref_54","doi-asserted-by":"crossref","unstructured":"Sadorsky, Perry (2021). A Random Forests Approach to Predicting Clean Energy Stock Prices. Journal of Risk and Financial Management, 14.","DOI":"10.3390\/jrfm14020048"},{"key":"ref_55","doi-asserted-by":"crossref","first-page":"178","DOI":"10.1016\/j.resourpol.2010.05.004","article-title":"An Overview of Global Gold Market and Gold Price Forecasting","volume":"35","author":"Shafiee","year":"2010","journal-title":"Resources Policy"},{"key":"ref_56","doi-asserted-by":"crossref","unstructured":"Suimon, Yoshiyuki, Sakaji, Hiroki, Izumi, Kiyoshi, and Matsushima, Hiroyasu (2020). Autoencoder-Based Three-Factor Model for the Yield Curve of Japanese Government Bonds and a Trading Strategy. Journal of Risk and Financial Management, 13.","DOI":"10.3390\/jrfm13040082"},{"key":"ref_57","doi-asserted-by":"crossref","unstructured":"Tronzano, Marco (2021). Financial Crises, Macroeconomic Variables, and Long-Run Risk: An Econometric Analysis of Stock Returns Correlations (2000 to 2019). Journal of Risk and Financial Management, 14.","DOI":"10.3390\/jrfm14030127"},{"key":"ref_58","doi-asserted-by":"crossref","unstructured":"Vezeris, Dimitrios, Karkanis, Ioannis, and Kyrgos, Themistoklis (2019). AdTurtle: An Advanced Turtle Trading System. Journal of Risk and Financial Management, 12.","DOI":"10.3390\/jrfm12020096"},{"key":"ref_59","doi-asserted-by":"crossref","first-page":"666","DOI":"10.1016\/j.ijforecast.2019.08.004","article-title":"Forecasting Commodity Prices Out-of-Sample: Can Technical Indicators Help?","volume":"36","author":"Wang","year":"2020","journal-title":"International Journal of Forecasting"},{"key":"ref_60","first-page":"994","article-title":"Forecasting Gold Price Changes by Using Adaptive Network Fuzzy Inference System","volume":"13","author":"Yakhchali","year":"2012","journal-title":"Journal of Business Economics and Management"},{"key":"ref_61","doi-asserted-by":"crossref","first-page":"338","DOI":"10.1016\/j.eneco.2016.03.017","article-title":"Predicting the Oil Prices: Do Technical Indicators Help?","volume":"56","author":"Yin","year":"2016","journal-title":"Energy Economics"},{"key":"ref_62","doi-asserted-by":"crossref","first-page":"795","DOI":"10.1080\/14697688.2016.1225977","article-title":"Predictability of Structural Co-Movement in Commodity Prices: The Role of Technical Indicators","volume":"17","author":"Yin","year":"2017","journal-title":"Quantitative Finance"},{"key":"ref_63","doi-asserted-by":"crossref","unstructured":"Zengeler, Nico, and Handmann, Uwe (2020). Contracts for Difference: A Reinforcement Learning Approach. Journal of Risk and Financial Management, 13.","DOI":"10.3390\/jrfm13040078"}],"container-title":["Journal of Risk and Financial Management"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1911-8074\/14\/5\/198\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T05:55:28Z","timestamp":1760162128000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1911-8074\/14\/5\/198"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,4,29]]},"references-count":63,"journal-issue":{"issue":"5","published-online":{"date-parts":[[2021,5]]}},"alternative-id":["jrfm14050198"],"URL":"https:\/\/doi.org\/10.3390\/jrfm14050198","relation":{},"ISSN":["1911-8074"],"issn-type":[{"value":"1911-8074","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021,4,29]]}}}