Examining Shocks of Factors Affecting Inflation: A Random Forest with Recursive Feature Elimination (RF-RFE) and Bayesian Vector Autoregression (BVAR) Approach

Authors
Ferdowsi University
Abstract
Inflation, as a key indicator of economic performance, directly affects household purchasing power, price stability, and the long-term planning of firms and governments. Uncontrolled inflation not only reduces public welfare and exacerbates social inequalities, but also disrupts investment and sustainable growth by creating instability in economic expectations. Therefore, identifying the drivers of inflation and understanding their transmission mechanisms is essential for designing effective monetary and fiscal policies. This study investigates the impact of economic shocks on the inflation rate by employing a combination of two approaches: first, the random forest-based variable selection method with recursive feature elimination (RF-RFE) to identify the most influential factors, and second, the Bayesian vector autoregression (BVAR) model to analyze the time dynamics and mutual interactions of these shocks.The dataset covers 42 economic variables from the first quarter of 2009 to the fourth quarter of 2021, grouped into seven categories: supply, demand, monetary and banking, taxation and budget, exchange rate, energy, and employment. In the first step, the RF-RFE method identified the most important determinants of consumer inflation. The results indicated that five key variables producer inflation, value added in the oil and gas sector, quasi-money, the market exchange rate, and banknotes and coins in circulation play a major role in explaining consumer price fluctuations.The subsequent BVAR analysis showed that shocks originating from producer inflation and the exchange rate exert strong short-term effects on consumer inflation. By contrast, variables such as oil and gas value added play a moderating role in the long term, gradually alleviating inflationary pressures. Furthermore, the variance decomposition of forecast errors suggests that, in the long run, exchange rate volatility and liquidity changes driven by quasi-money increasingly account for fluctuations in inflation
Keywords

1. Adolfsen, J. F., Ferrari Minesso, M., Mork, J. E., & Van Robays, I. (2024). Gas price shocks and euro area inflation. Journal of International Money and Finance, 149, 103183. https://doi.org/10.1016/J.JIMONFIN.2024.103183
2. Ahmad, M., Zebo, K., Ismailova, N., Eid Balbaa, M., Akramova, N., & Ul Ain, N. (2024). Effect of the Supply-Side factors on inflation in South Asia: An analysis of oil price, technology, and labor market dynamics. Research in Globalization, 8, 100210. https://doi.org/10.1016/J.RESGLO.2024.100210
3. Asab, N. A. (2025). Are supply shocks a key driver of global Inflation? Evidence from CPI and GDP deflator analysis. Research in Globalization, 10, 100279. https://doi.org/10.1016/J.RESGLO.2025.100279
4. Barros, G. S. A. de C., Carrara, A. F., Castro, N. R., & Silva, A. F. (2022). Agriculture and inflation: Expected and unexpected shocks. The Quarterly Review of Economics and Finance, 83, 178–188. https://doi.org/10.1016/J.QREF.2021.12.002
5. Belloumi, M., Aljazea, A., & Alshehry, A. (2023). Study of the impact of crude oil prices on economic output and inflation in Saudi Arabia. Resources Policy, 86, 104179. https://doi.org/10.1016/J.RESOURPOL.2023.104179
6. Ben Mimoun, M., Boukhatem, J., & Raies, A. (2024). Aggregate demand and inflation response to monetary policy shocks in Tunisia. Journal of Policy Modeling, 46(3), 592–612. https://doi.org/10.1016/J.JPOLMOD.2024.01.009
7. Bhattacharya, R. (2014). Inflation dynamics and monetary policy transmission in Vietnam and emerging Asia. Journal of Asian Economics, 34, 16–26. https://doi.org/10.1016/J.ASIECO.2014.05.001
8. Bianchi, F., & Melosi, L. (2022). Inflation as a Fiscal Limit. SSRN Electronic Journal. https://doi.org/10.2139/ssrn.4205158
9. Blinder, A. S., & Rudd, J. B. (2013). 2. The Supply- Shock Explanation of the Great Stagflation Revisited. In M. D. Bordo & A. Orphanides (Eds.), The Rebirth of Modern Central Banking (pp. 119–178). University of Chicago Press. https://doi.org/doi:10.7208/9780226043555-006
10. Breiman, L. (2001). Random forest. Machine Learning, 45(1), 5–32. https://doi.org/10.1023/A:1010933404324
11. Cardoso, M., Ferreira, C., De España, B., Leiva, J. M., Nuño, G., Rodrigo, T., & Vazquez, S. (2022). The Heterogeneous Impact of Inflation on Households’ Balance Sheets. ideas.repec.org/p/aoz/wpaper/176.html
12. Casoli, C., Manera, M., & Valenti, D. (2024). Energy shocks in the Euro area: Disentangling the pass-through from oil and gas prices to inflation. Journal of International Money and Finance, 147, 103154. https://doi.org/10.1016/J.JIMONFIN.2024.103154
13. Charles, C. O., Ohazulume, C. G., & Emerenini. (2022). The Determinants of Inflation in Nigeria. African Journal of Economics and Sustainable Development, 5(3), 54–72. https://doi.org/10.52589/AJESD-VLI3AGIB
14. Chen, Q., Meng, Z., Liu, X., Jin, Q., & Su, R. (2018). Decision Variants for the Automatic Determination of Optimal Feature Subset in RF-RFE. Genes, 9(6), 301. https://doi.org/10.3390/genes9060301
15. Chowdhury, A. (2014). Inflation and Inflation-Uncertainty in India: The Policy Implications Inflation and Inflation-Uncertainty in India: The Policy Implications of the Relationship of the Relationship Inflation And Inflation-Uncertainty in India: The Policy Implications of The Relationship. In Journal of Economic Studies (Vol. 41, Issue 1). https://epublications.marquette.edu/econ_fac/437
16. Coibion, O., Gorodnichenko, Y., & Weber, M. (2022). Monetary Policy Communications and Their Effects on Household Inflation Expectations. Journal of Political Economy, 130(6), 1537–1584. https://doi.org/10.1086/718982
17. Darst, B. F., Malecki, K. C., & Engelman, C. D. (2018). Using recursive feature elimination in random forest to account for correlated variables in high dimensional data. BMC Genetics, 19(S1), 65. https://doi.org/10.1186/s12863-018-0633-8
18. di Giovanni, J., Kalemli-Özcan, Ş., Silva, A., & Yıldırım, M. A. (2023). Quantifying the Inflationary Impact of Fiscal Stimulus under Supply Constraints. AEA Papers and Proceedings, 113, 76–80. https://doi.org/10.1257/pandp.20231028
19. Diaz, E. M., Cunado, J., & de Gracia, F. P. (2023). Commodity price shocks, supply chain disruptions and U.S. inflation. Finance Research Letters, 58, 104495. https://doi.org/10.1016/J.FRL.2023.104495
20. Ferreira, V., Abreu, A., & Louçã, F. (2025). The rise and fall of inflation in the Euro Area (2021-2024): A heterodox perspective. Structural Change and Economic Dynamics, 72, 103–110. https://doi.org/10.1016/J.STRUECO.2024.12.004
21. Friedman, M. (1996). The Counter-Revolution in Monetary Theory. In G. E. Wood (Ed.), Explorations in Economic Liberalism: The Wincott Lectures (pp. 3–21). Palgrave Macmillan UK. https://doi.org/10.1007/978-1-349-24967-1_1
22. Friedman, M., & Schwartz, A. J. (2008). A monetary history of the United States, 1867-1960.
23. Garzon, A. J., & Hierro, L. A. (2021). Asymmetries in the transmission of oil price shocks to inflation in the eurozone. Economic Modelling, 105, 105665. https://doi.org/10.1016/J.ECONMOD.2021.105665
24. Gelman, A., & Shalizi, C. R. (2013). Philosophy and the practice of Bayesian statistics. British Journal of Mathematical and Statistical Psychology, 66(1). https://doi.org/10.1111/j.2044-8317.2011.02037.x
25. Gokmenoglu, K., Azin, V., & Taspinar, N. (2015). The Relationship between Industrial Production, GDP, Inflation and Oil Price: The Case of Turkey. Procedia Economics and Finance, 25, 497–503. https://doi.org/10.1016/S2212-5671(15)00762-5
26. Graff, M. (2008). The Quantity Theory of Money in Historical Perspective Working Paper. KOF Working Papers, 196. https://doi.org/https://doi.org/10.3929/ethz-a-005582276
27. Ha, J., Kose, M. A., & Ohnsorge, F. (2019). Inflation in Emerging and Developing Economies Evolution, Drivers, and Policies. http://www.worldbank.org/inflation
28. Ha, J., Stocker, M. M., & Yilmazkuday, H. (2020). Inflation and exchange rate pass-through. Journal of International Money and Finance, 105, 102187.‌ https://doi.org/10.1016/j.jimonfin.2020.102187
29. Hale, G., Leer, J., & Nechio, F. (2025). Fiscal policy design and inflation: The COVID-19 pandemic experience. Journal of International Money and Finance, 150, 103210. https://doi.org/10.1016/J.JIMONFIN.2024.103210
30. Iranmanesh, N., & Jalaee, S. A. (2021). Testing the long-run neutrality and superneutrality of money in a developing country: Evidence from Iran. MethodsX, 8, 101251. https://doi.org/10.1016/J.MEX.2021.101251
31. Jabeur, S. B., Mefteh-Wali, S., & Viviani, J. L. (2024). Forecasting gold price with the XGBoost algorithm and SHAP interaction values. Annals of Operations Research, 334, 679–699. https://doi.org/10.1007/s10479-021-04187-w
32. Jahan, S., & Papageorgiou, C. (2014). What is monetarism. Finance and Development, 51(1), 38–39. https://www.imf.org/external/pubs/ft/fandd/2014/03/basics.htm
33. Jain, M., Kostyshyna, O., & Zhang, X. (2024). How do people view wage and price inflation? Journal of Monetary Economics, 145, 103552. https://doi.org/10.1016/J.JMONECO.2024.01.005
34. Jiang, J., & Kim, D. (2013). Exchange rate pass-through to inflation in China. Economic Modelling, 33, 900–912. https://doi.org/10.1016/J.ECONMOD.2013.05.021
35. Jiang, X., Zhang, Y., Li, Y., & Zhang, B. (2022). Forecast and analysis of aircraft passenger satisfaction based on RF-RFE-LR model. Scientific Reports, 12(1). https://doi.org/10.1038/s41598-022-14566-3
36. Kahn, R. F. (2022). Inflation—A Keynesian View. In M. C. Marcuzzo & P. Paesani (Eds.), Richard F. Kahn: Collected Economic Essays (pp. 253–259). Springer International Publishing. https://doi.org/10.1007/978-3-030-98588-2_13
37. Liu, T. Y., & Ma, J. T. (2024). Exchange rate and inflation between China and the United States: A bootstrap rolling-window approach. Economic Systems, 48(1), 101152. https://doi.org/10.1016/J.ECOSYS.2023.101152
38. Liu, X., Ding, N., Shi, J., & Sun, C. (2023). An Identity Recognition Model Based on RF-RFE: Utilizing Eye-Movement Data. Behavioral Sciences, 13(8), 620. https://doi.org/10.3390/bs13080620
39. Luetkepohl, H., & Xu, F. (2012). The role of the log transformation in forecasting economic variables. Empirical Economics, 42(3), 619–638.
https://doi.org/10.1007/s00181-010-0440-1
40. Madsen, J. B. (2003). Inflation and Investment. Scottish Journal of Political Economy, 50(4), 375–397. https://doi.org/10.1111/1467-9485.5004002
41. Mankiw, N. G. (2020). Principles of Economics. Cengage Learning.
42. Mayer, E., Rüth, S., & Scharler, J. (2013). Government debt, inflation dynamics and the transmission of fiscal policy shocks. Economic Modelling, 33, 762–771. https://doi.org/10.1016/J.ECONMOD.2013.05.011
43. Mien, E. (2022). Impact of oil price and oil production on inflation in the CEMAC. Resources Policy, 79, 103010.‌ https://doi.org/10.1016/j.resourpol.2022.103010
44. Moridian, A., Radulescu, M., Usman, M., Mahdavian, S. M. R., Hagiu, A., & Serbanescu, L. (2024). Unemployment rate and its relationship with government size, trade, inflation, urbanization, and economic growth in Romania. Heliyon, e41579. https://doi.org/10.1016/J.HELIYON.2024.E41579
45. Nakamura, E., Steinsson, J., Sun, P., & Villar, D. (2018). The Elusive Costs of Inflation: Price Dispersion during the U.S. Great Inflation. The Quarterly Journal of Economics, 133(4), 1933–1980. https://doi.org/10.1093/qje/qjy017
46. Nasir, M. A., Huynh, T. L. D., & Vo, X. V. (2020). Exchange rate pass-through & management of inflation expectations in a small open inflation targeting economy. International Review of Economics & Finance, 69, 178-188.‌ https://doi.org/10.1016/j.iref.2020.04.010
47. Nojković, A., & Petrović, P. (2015). Monetary policy rule in inflation targeting emerging European countries: A discrete choice approach. Journal of Policy Modeling, 37(4), 577–595. https://doi.org/10.1016/J.JPOLMOD.2015.03.016
48. O’Connell, J. (2016). On Keynes on inflation and unemployment. The European Journal of the History of Economic Thought, 23(1), 82–101. https://doi.org/10.1080/09672567.2013.824998
49. Olamide, E., Ogujiuba, K., & Maredza, A. (2022). Exchange Rate Volatility, Inflation and Economic Growth in Developing Countries: Panel Data Approach for SADC. Economies, 10(3), 67. https://doi.org/10.3390/economies10030067
50. Pallotti, F., Paz-Pardo, G., Slacalek, J., Tristani, O., & Violante, G. L. (2024). Who bears the costs of inflation? Euro area households and the 2021–2023 shock. Journal of Monetary Economics, 148, 103671. https://doi.org/10.1016/J.JMONECO.2024.103671
51. Pasimeni, P. (2022). Supply or Demand, that is the Question: Decomposing Euro Area Inflation. Intereconomics, 57(6), 384–393. https://doi.org/10.1007/s10272-022-1092-z
52. Primiceri, G. E. (2006). Why Inflation Rose and Fell: Policy-Makers’ Beliefs and U. S. Postwar Stabilization Policy. Quarterly Journal of Economics, 121(3), 867–901. https://doi.org/10.1162/qjec.121.3.867
53. Rafei, M., Mamipour, S., & Bahari, N. (2023). Dynamic path through of oil price shocks into inflation in Iran: application of Markov switching and TVP-VAR models. International Journal of Energy Sector Management, 17(6), 1119–1136. https://doi.org/10.1108/IJESM-05-2022-0016
54. Raza, H., Laurentjoye, T., Byrialsen, M. R., & Valdecantos, S. (2023). Inflation and the role of macroeconomic policies: A model for the case of Denmark. Structural Change and Economic Dynamics, 67, 32–43. https://doi.org/10.1016/J.STRUECO.2023.06.006
55. Reynard, S. (2023). Central bank balance sheet, money and inflation. Economics Letters, 224, 111028.‌ https://doi.org/10.1016/j.econlet.2023.111028
56. Roncaglia de Carvalho, A., Ribeiro, R. S. M., & Marques, A. M. (2018). Economic development and inflation: a theoretical and empirical analysis. International Review of Applied Economics, 32(4), 546–565. https://doi.org/10.1080/02692171.2017.1351531
57. Ryczkowski, M. (2021). Money and inflation in inflation-targeting regimes–new evidence from time–frequency analysis. Journal of Applied Economics, 24(1), 17-44.‌ https://doi.org/10.1080/15140326.2020.1830461
58. Sarmah, A., & Bal, D. P. (2021). Does Crude Oil Price Affect the Inflation Rate and Economic Growth in India? A New Insight Based on Structural VAR Framework. The Indian Economic Journal, 69(1), 123–139. https://doi.org/10.1177/0019466221998838
59. Schwarzer, J. A. (2018). Retrospectives: Cost-Push and Demand-Pull Inflation: Milton Friedman and the “Cruel Dilemma”. Journal of Economic Perspectives, 32(1), 195–210. https://doi.org/10.1257/jep.32.1.195
60. Sharma, P., & Shrivastava, A. K. (2024). Economic Activities and Oil Price Shocks in Indian Outlook: Direction of Causality and Testing Cointegration. Global Business Review, 25(3), 771–790. https://doi.org/10.1177/0972150921990491
61. Snowdon, B., & Vane, H. R. (2005). Modern macroeconomics: its origins, development and current state. Edward Elgar Publishing. https://books.google.de/books?hl=fa&lr=&id=z-c4AgAAQBAJ&oi=fnd&pg=PR1&dq=A+modern+guide+to+macroeconomics++snowdon%E2%80%8F&ots=i5iUgDqVNu&sig=qIQox-tYWYwXpIVCBPxKDdbl0l8v=onepage&q=A%20modern%20guide%20to%20macroeconomics%20%20snowdon%E2%80%8F&f=false
62. Stantcheva, S. (2024). Why Do We Dislike Inflation? Brookings Papers on Economic Activity, 2004(1), 1–46. https://doi.org/10.1353/eca.2024.a943913
63. Stella, P. (2021). Interpreting Modern Monetary Reality. Journal of Applied Corporate Finance, 33(4), 8–23. https://doi.org/10.1111/jacf.12475
64. Takami, N. (2015). The Baffling New Inflation: How Cost-Push Inflation Theories Influenced Policy Debate in the Late-1950s United States. History of Political Economy, 47(4), 605–629. https://doi.org/10.1215/00182702-3321336
65. Valogo, M. K., Duodu, E., Yusif, H., & Baidoo, S. T. (2023). Effect of exchange rate on inflation in the inflation targeting framework: Is the threshold level relevant? Research in Globalization, 6, 100119. https://doi.org/10.1016/j.resglo.2023.100119
66. Virbickaite, A., Ausín, M. C., & Galeano, P. (2015). Bayesian inference methods for univariate and multivariate garch models: A survey. Journal of Economic Surveys, 29(1). https://doi.org/10.1111/joes.12046
67. Williamson, S., & Wright, R. (2010). New Monetarist Economics: Models. Handbook of Monetary Economics, 3(C), 25–96. https://doi.org/10.1016/B978-0-444-53238-1.00002-8
68. Wu, L., Li, J., & Zhang, Z. X. (2013). Inflationary effect of oil-price shocks in an imperfect market: A partial transmission input–output analysis. Journal of Policy Modeling, 35(2), 354–369. https://doi.org/10.1016/J.JPOLMOD.2012.01.008
69. Xiang, L., Zhang, H., Gao, K., & Xiao, Z. (2021). Oil volatility–inflation pass through in China: Evidence from wavelet analysis. Energy Reports, 7, 2165–2177. https://doi.org/10.1016/J.EGYR.2021.04.021
70. Yang, T., Dong, Q., Du, M., & Du, Q. (2023). Geopolitical risks, oil price shocks and inflation: Evidence from a TVP–SV–VAR approach. Energy Economics, 127, 107099. https://doi.org/10.1016/J.ENECO.2023.107099
71. Zion, U. Ben, Spiegel, U., & Yagil, J. (1993). Inflation, investment decisions and the Fisher Effect. International Review of Economics & Finance, 2(2), 195–206. https://doi.org/10.1016/1059-0560(93)90023-J