Using Markov-switching models with Markov chain Monte Carlo inference methods in agricultural commodities trading

  • Oscar V. De la Torre-Torres
  • Dora Aguilasocho-Montoya
  • José Álvarez-GarcíaEmail author
  • Biagio Simonetti


In this work, the use of Markov-switching GARCH (MS-GARCH) models is tested in an active trading algorithm for corn and soybean future markets. By assuming that a given investor lives in a two-regime world (with low- and high-volatility time periods), a trading algorithm was simulated (from January 2000 to March 2019), which helped the investor to forecast the probability of being in the high-volatility regime at t + 1. Once this probability was known, the investor could decide to invest either in commodities, during low-volatility periods or in the 3-month US Treasury bills, during high-volatility periods. Our results suggest that the Gaussian MS-GARCH model is the most appropriate to generate alpha or extra returns (from a passive investment strategy) in the corn market and the t-Student MS-GARCH is the best one for soybean trading.


Markov-switching GARCH Markovian chain processes Markov chain Monte Carlo Commodities Alpha creation Financial crisis Computational finance Financial market crisis prediction Commodities market trading 


Compliance with ethical standards

Conflict of interest

All authors declare that they have no conflict of interest to disclose.

Ethical approval

This article does not contain any studies with human participants or animals performed by any of the authors.


  1. Ailliot P, Bessac J, Monbet V, Pène F (2015) Non-homogeneous hidden Markov-switching models for wind time series. J Stat Plan Inference 160:75–88. MathSciNetCrossRefzbMATHGoogle Scholar
  2. Akaike H (1974) A new look at the statistical model identification. IEEE Trans Autom Control 19:716–723. MathSciNetCrossRefzbMATHGoogle Scholar
  3. Alizadeh AH, Nomikos NK, Pouliasis PK (2008) A Markov regime switching approach for hedging energy commodities. J Bank Finance 32:1970–1983. CrossRefGoogle Scholar
  4. Aloui C, Jammazi R (2009) The effects of crude oil shocks on stock market shifts behaviour: a regime switching approach. Energy Econ. CrossRefGoogle Scholar
  5. Alvarez-Plata P, Schrooten M (2006) The Argentinean currency crisis: a Markov-switching model estimation. Dev Econ 44:79–91. CrossRefGoogle Scholar
  6. Ang A, Bekaert G (2002a) International asset allocation with regime shifts. Rev Financ Stud 15:1137–1187CrossRefGoogle Scholar
  7. Ang A, Bekaert G (2002b) Regime switches in interest rates. J Bus Econ Stat 20:163–182. MathSciNetCrossRefGoogle Scholar
  8. Ang A, Bekaert G (2002c) Short rate nonlinearities and regime switches. J Econ Dyn Control 26:1243–1274. CrossRefzbMATHGoogle Scholar
  9. Ang A, Bekaert G (2004) How regimes affect asset allocation. Financ Anal J 60:86–99. CrossRefGoogle Scholar
  10. Ardia D (2008) Financial risk management with Bayesian estimation of GARCH models. Springer, BerlinCrossRefGoogle Scholar
  11. Ardia D, Bluteau K, Boudt K, Trottier D (2016) Markov-switching GARCH models in R: The MSGARCH PackageGoogle Scholar
  12. Ardia D, Kolly J, Trottier D-A (2017) The impact of parameter and model uncertainty on market risk predictions from GARCH-type models. J Forecast 36:808–823. MathSciNetCrossRefzbMATHGoogle Scholar
  13. Ardia D, Bluteau K, Boudt K, Catania L (2018) Forecasting risk with Markov-switching GARCH models: a large-scale performance study. Int J Forecast 34:733–747. CrossRefGoogle Scholar
  14. Areal N, Cortez MC, Silva F (2013) The conditional performance of US mutual funds over different market regimes: Do different types of ethical screens matter? Financ Mark Portf Manag 27:397–429. CrossRefGoogle Scholar
  15. Balcilar M, Abidin Ozdemir Z (2013) The causal nexus between oil prices and equity market in the US: a regime switching model. Energy Econ 39:271–282. CrossRefGoogle Scholar
  16. Balcilar M, Demirer R, Hammoudeh S (2013) Investor herds and regime-switching: evidence from Gulf Arab stock markets. J Int Financ Mark Inst Money 23:295–321. CrossRefGoogle Scholar
  17. Balcilar M, Gupta R, Miller SM (2015) Regime switching model of US crude oil and stock market prices: 1859 to 2013. Energy Econ 49:317–327. CrossRefGoogle Scholar
  18. Basher SA, Haug AA, Sadorsky P (2016) The impact of oil shocks on exchange rates: a Markov-switching approach. Energy Econ 54:11–23. CrossRefGoogle Scholar
  19. Basher SA, Haug AA, Sadorsky P (2018) The impact of oil-market shocks on stock returns in major oil-exporting countries. J Int Money Finance 86:264–280. CrossRefGoogle Scholar
  20. Baum LE, Petrie T, Soules G, Weiss N (1970) A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains. Ann Appl Stat 41:164–171MathSciNetzbMATHGoogle Scholar
  21. Boamah NA, Watts EJ, Loudon G (2016) Investigating temporal variation in the global and regional integration of African stock markets. J Multinatl Financ Manag 36:103–118. CrossRefGoogle Scholar
  22. Bollerslev T (1986) Generalized autoregressive conditional heteroskedasticity. J Econom 31:307–327MathSciNetCrossRefGoogle Scholar
  23. Brooks C, Persand G (2001) The trading profitability of forecasts of the gilt–equity yield ratio. Int J Forecast 17:11–29CrossRefGoogle Scholar
  24. Bundoo SK (2017) Stock market development and integration in SADC (Southern African Development Community). J Adv Res 7:64–72. CrossRefGoogle Scholar
  25. Cabrera G, Coronado S, Rojas O, Venegas-Martínez F (2017) Synchronization and changes in volatilities in the Latin America’s stock exchange markets. Int J Pure Appl Math. CrossRefGoogle Scholar
  26. Camacho M, Perez-Quiros G (2014) Commodity prices and the business cycle in Latin America: Living and dying by commodities? Emerg Mark Finance Trade 50:110–137. CrossRefGoogle Scholar
  27. Chen C-M, Lin Y-L, Hsu C-L (2017) Does air pollution drive away tourists? A case study of the Sun Moon Lake National Scenic Area, Taiwan. Transp Res Part D Transp Environ 53:398–402. CrossRefGoogle Scholar
  28. CME group I (2019) CMEG exchange volume report-monthly. In: Dly. Agric. Vol. open Interes. Accessed 22 Apr 2019
  29. Commodity Futures Trading Commission (2019) Commitments of Traders| US. Commodity Futures Trading Commission. In: Mark. Data Anal. Accessed 22 Apr 2019
  30. De la Torre O, Galeana-Figueroa E, Álvarez-García J (2018) Using Markov-switching models in Italian, British, US and Mexican equity portfolios: a performance test. Electron J Appl Stat Anal 11:489–505. CrossRefGoogle Scholar
  31. De la Torre-Torres O, Álvarez-García J, Santillán-Salgado J, López-Herrera F (2019a) Potential improvements to pension funds performance in Mexico Mejoras potenciales al desempeño de los fondos de pensiones en México. Rev Espac 40:26–41Google Scholar
  32. De la Torre-Torres OV, Aguilasocho-Montoya D, Álvarez-García J (2019b) Active portfolio management in the Andean countries’ stock markets with Markov-switching GARCH models. Rev Mex Econ y Finanz 14:601–616. CrossRefGoogle Scholar
  33. Dempster AP, Laird NM, Rubin DB (1977) Maximum likelihood from incomplete data via the EM algorithm. J R Stat Soc Ser B 39:1–38. MathSciNetCrossRefzbMATHGoogle Scholar
  34. Doğan İ, Bilgili F (2014) The non-linear impact of high and growing government external debt on economic growth: a Markov Regime-switching approach. Econ Model 39:213–220. CrossRefGoogle Scholar
  35. Dufrénot G, Keddad B (2014) Business cycles synchronization in East Asia: a Markov-switching approach. Econ Model 42:186–197. CrossRefGoogle Scholar
  36. Elias RS, Wahab MIM, Fang L (2014) Stochastics and statistics a comparison of regime-switching temperature modeling approaches for applications in weather derivatives. Eur J Oper Res 232:549–560. CrossRefzbMATHGoogle Scholar
  37. Engel J, Wahl M, Zagst R (2018) Forecasting turbulence in the Asian and European stock market using regime-switching models. Quant Finance Econ 2:388–406. CrossRefGoogle Scholar
  38. Engle R (1982) Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica 50:987–1007MathSciNetCrossRefGoogle Scholar
  39. Haas M, Mittnik S, Paolella MS (2004) A new approach to Markov-switching GARCH models. J Financ Econom 2:493–530CrossRefGoogle Scholar
  40. Hache E, Lantz F (2013) Speculative trading and oil price dynamic: a study of the WTI market. Energy Econ 36:334–340. CrossRefGoogle Scholar
  41. Hamilton JD (1989) A new approach to the economic analysis of nonstationary time series and the business cycle. Econometrica 57:357–384MathSciNetCrossRefGoogle Scholar
  42. Hamilton JD (1990) Analysis of time series subject to changes in regime. J Econom 45:39–70. MathSciNetCrossRefzbMATHGoogle Scholar
  43. Hamilton JD (1994) Time series analysis. Princeton University Press, PrincetonzbMATHGoogle Scholar
  44. Hamilton JD, Susmel R (1994) Autoregressive conditional heteroskedasticity and changes in regime. J Econom 64:307–333. CrossRefzbMATHGoogle Scholar
  45. Hastings WK (1970) Monte Carlo sampling methods using Markov chains and their applications. Biometrika 57:97–109. MathSciNetCrossRefzbMATHGoogle Scholar
  46. Hauptmann J, Hoppenkamps A, Min A et al (2014) Forecasting market turbulence using regime-switching models. Financ Mark Portf Manag 28:139–164. CrossRefGoogle Scholar
  47. Herrera R, Rodriguez A, Pino G (2017) Modeling and forecasting extreme commodity prices: a Markov-switching based extreme value model. Energy Econ 63:129–143. CrossRefGoogle Scholar
  48. Isasi P, Quintana D, Saez Y, Mochon A (2007) Applied computational intelligence for finance and economics. Comput Intell 23:111–116. MathSciNetCrossRefGoogle Scholar
  49. Kanas A (2005) Regime linkages between the Mexican currency market and emerging equity markets. Econ Model 22:109–125. CrossRefGoogle Scholar
  50. Kim C-J (1994) Dynamic linear models with Markov-switching. J Econom 60:1–22. MathSciNetCrossRefzbMATHGoogle Scholar
  51. Klaassen F (2002) Improving GARCH volatility forecasts with regime-switching GARCH. In: Advances in Markov-switching models. Physica-Verlag, Heidelberg, pp 223–254CrossRefGoogle Scholar
  52. Klein AC (2013) Time-variations in herding behavior: evidence from a Markov switching SUR model. J Int Financ Mark Inst Money 26:291–304. CrossRefGoogle Scholar
  53. Kristjanpoller WR, Michell KV (2018) A stock market risk forecasting model through integration of switching regime, ANFIS and GARCH techniques. Appl Soft Comput J 67:106–116. CrossRefGoogle Scholar
  54. Kritzman M, Page S, Turkington D (2012) Regime shifts: implications for dynamic strategies. Financ Anal J 68:22–39CrossRefGoogle Scholar
  55. Kutty G (2010) The relationship between exchange rates and stock prices: the case of Mexico. North Am J Financ Bank Res 4:1–12Google Scholar
  56. Malyshkina NV, Mannering FL, Tarko AP (2009) Markov switching negative binomial models: an application to vehicle accident frequencies. Accid Anal Prev 41:217–226. CrossRefGoogle Scholar
  57. Mejía-Reyes P (2000) Asymmetries and common cycles in Latin America: evidence from Markov-switching models. Econ Mex Nueva Época IX:189–225Google Scholar
  58. Metropolis N, Rosenbluth AW, Rosenbluth MN et al (1953) Equation of state calculations by fast computing machines. J Chem Phys 21:1087–1092. CrossRefGoogle Scholar
  59. Misas M, Ramírez MT (2007) Depressions in the Colombian economic growth during the twentieth century: a Markov switching regime model. Appl Econ Lett 14:803–808. CrossRefGoogle Scholar
  60. Mochón A, Quintana D, Isasi P, Sáez Y (2008) Soft computing techniques applied to finance. Appl Intell 29:111–115. CrossRefGoogle Scholar
  61. Monbet V, Ailliot P (2017) Sparse vector Markov switching autoregressive models. Application to multivariate time series of temperature. Comput Stat Data Anal 108:40–51. MathSciNetCrossRefzbMATHGoogle Scholar
  62. Parikakis GS, Merika A (2009) Evaluating volatility dynamics and the forecasting ability of Markov switching models. J Forecast 28:736–744. MathSciNetCrossRefGoogle Scholar
  63. Pelletier D (2006) Regime switching for dynamic correlations. J Econ 131:445–473MathSciNetCrossRefGoogle Scholar
  64. Refinitiv (2018) Refinitiv Eikon. In: Thomson Refinitiv Eikon login. Accessed 3 Jun 2019
  65. Riedel C, Thuraisamy KS, Wagner N (2013) Credit cycle dependent spread determinants in emerging sovereign debt markets. Emerg Mark Rev 17:209–223. CrossRefGoogle Scholar
  66. Rotta PN, Valls Pereira PL (2016) Analysis of contagion from the dynamic conditional correlation model with Markov regime switching. Appl Econ 48:2367–2382. CrossRefGoogle Scholar
  67. Shen X, Holmes MJ (2013) Do Asia-Pacific stock prices follow a random walk? A regime-switching perspective. Appl Econ Lett 21:189–195. CrossRefGoogle Scholar
  68. Sosa M, Ortiz E, Cabello A (2018) Dynamic linkages between stock market and exchange rate in mila countries: a Markov regime switching approach (2003–2016). Análisis Económico 33:57–74. CrossRefGoogle Scholar
  69. Sottile P (2013) On the political determinants of sovereign risk: evidence from a Markov-switching vector autoregressive model for Argentina. Emerg Mark Rev. CrossRefGoogle Scholar
  70. Thomson Reuters (2018) Thomson Reuters Eikon. In: Thomson Refinitiv Eikon login. Accessed 10 Dec 2018
  71. Uddin GS, Rahman ML, Shahzad SJH, Rehman MU (2018) Supply and demand driven oil price changes and their non-linear impact on precious metal returns: a Markov regime switching approach. Energy Econ 73:108–121. CrossRefGoogle Scholar
  72. Valera HGA, Lee J (2016) Do rice prices follow a random walk? Evidence from Markov switching unit root tests for Asian markets. Agric Econ 47:683–695. CrossRefGoogle Scholar
  73. Viterbi A (1967) Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Trans Inf Theory 13:260–269. CrossRefzbMATHGoogle Scholar
  74. Walid C, Duc Khuong D (2014) Exchange rate movements and stock market returns in a regime-switching environment: evidence for BRICS countries. Res Int Bus Finance. CrossRefGoogle Scholar
  75. Walid C, Chaker A, Masood O, Fry J (2011) Stock market volatility and exchange rates in emerging countries: a Markov-state switching approach. Emerg Mark Rev 12:272–292. CrossRefGoogle Scholar
  76. Wu J-T (2015) Markov regimes switching with monetary fundamental-based exchange rate model. Asia Pacific Manag Rev 20:79–89. CrossRefGoogle Scholar
  77. Xiong Y, Tobias JL, Mannering FL (2014) The analysis of vehicle crash injury-severity data: a Markov switching approach with road-segment heterogeneity. Transp Res Part B Methodol 67:109–128. CrossRefGoogle Scholar
  78. Zhao H (2010) Dynamic relationship between exchange rate and stock price: evidence from China. Res Int Bus Finance 24:103–112. CrossRefGoogle Scholar
  79. Zheng T, Zuo H (2013) Reexamining the time-varying volatility spillover effects: a Markov switching causality approach. North Am J Econ Finance 26:643–662. MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2020

Authors and Affiliations

  1. 1.Faculty of Accounting and ManagementMichoacán State University of Saint Nicholas and Hidalgo (UMSNH)MoreliaMexico
  2. 2.Financial Economy and Accounting Department, Faculty of Business, Finance and TourismUniversity of ExtremaduraCáceresSpain
  3. 3.University of SannioBeneventoItaly
  4. 4.WSB University in GdanskGdańskPoland
  5. 5.National Institute of Geophysics and Volcanology (INGV)NaplesItaly

Personalised recommendations