A Machine Learning Model for Predicting Food Price Variations Under Currency Fluctuation Scenarios in Afghanistan
DOI:
https://doi.org/10.65496/jcste.2026.66Keywords:
Food Price Prediction, Machine Learning, Currency Fluctuation, Random ForestAbstract
In developing nations, particularly countries that depend significantly on imports like Afghanistan, food price volatility continues to pose a serious threat to both economic stability and food security. By using the (WFP) Food Prices dataset for Afghanistan, this study presents a machine learning based system for forecasting changes in food prices under currency fluctuation scenarios. The models reflect the implicit effects of exchange rate fluctuations on domestic food markets by combining pricing data denominated in Afghani (AFN) and U.S. dollars (USD). Three algorithms from ML: Linear Regression, Random Forest, and Long Short-Term Memory (LSTM) networks, were trained and evaluated using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and the Coefficient of Determination (R²). With an MAE of 3.2, RMSE of 4.3, and R² of 0.89, the Random Forest model outperformed both LSTM (MAE 3.8, RMSE 4.9, R² 0.86) and Linear Regression (MAE 4.5, RMSE 5.8, R² 0.82). The findings show a strong relationship between market inflation and exchange rate volatility, indicating that currency depreciation significantly increases domestic food prices. The study emphasizes the value of machine learning in creating early warning systems and policy tools that enhance food price stability and support food security in poor countries like Afghanistan.
Downloads
References
[1] World Food Programme (WFP), WFP Food Prices for Afghanistan [Dataset], Humanitarian Data Exchange (HDX), United Nations OCHA, 2025. [Online]. Available: https://data.humdata.org/dataset/wfp-food-prices-for-afghanistan
[2] S. Makridakis, E. Spiliotis, and V. Assimakopoulos, “Statistical and machine learning forecasting methods: Concerns and ways forward,” International Journal of Forecasting, vol. 34, no. 3, pp. 550–570, Jul. 2018, doi: https://doi.org/10.1371/journal.pone.0194889 DOI: https://doi.org/10.1371/journal.pone.0194889
[3] P. S. Sephton, “Modelling the link between commodity prices and exchange rates: The tale of daily data,” The Canadian Journal of Economics / Revue canadienne d’Économique, vol. 25, no. 1, pp. 156–171, Feb. 1992, doi: https://doi.org/10.2307/135716 DOI: https://doi.org/10.2307/135716
[4] O. B. Sezer, M. U. Gudelek, and A. M. Ozbayoglu, “Financial time series forecasting with deep learning: A systematic literature review,” Applied Soft Computing, vol. 90, Art. no. 106181, 2020, doi: https://doi.org/10.1016/j.asoc.2020.106181 DOI: https://doi.org/10.1016/j.asoc.2020.106181
[5] J. Fender and C. K. Yip, “Tariffs and exchange rate dynamics redux,” Journal of Economic Studies, vol. 27, no. 4/5, pp. 265–276, 2000, doi: https://doi.org/10.1016/S0261-5606(00)00027-9 DOI: https://doi.org/10.1016/S0261-5606(00)00027-9
[6] T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd ed. New York, NY, USA: Springer, 2009, doi: https://doi.org/10.1007/978-0-387-84858-7 DOI: https://doi.org/10.1007/978-0-387-84858-7
[7] Food and Agriculture Organization (FAO), Global Food Price Monitoring and Analysis, FAO, Rome, 2024. [Online]. Available: https://www.fao.org/worldfoodsituation/foodpricesindex
[8] World Bank, Afghanistan Economic Update: Managing Inflation and Food Prices, World Bank Group, Washington, DC, 2023. [Online]. Available: https://www.worldbank.org/en/country/afghanistan
[9] R. Ly, F. Traoré, and K. Dia, “Forecasting commodity prices using long-short-term memory neural networks,” IFPRI Discussion Paper 2000, Washington, DC, Jan. 2021. [Online]. Available: https://arxiv.org/abs/2101.03087 DOI: https://doi.org/10.2499/p15738coll2.134265
[10] I. Kelikume, “Do exchange rate and oil price shocks have asymmetric effect on inflation? Some evidence from Nigeria,” The Journal of Developing Areas, vol. 51, no. 4, pp. 271–283, Fall 2017. [Online]. Available: https://doi.org/10.1353/jda.2017.0101 DOI: https://doi.org/10.1353/jda.2017.0101
[11] N. Minot, “Transmission of world food price changes to markets in Sub-Saharan Africa,” IFPRI Discussion Paper 01059, International Food Policy Research Institute, Washington, DC, USA, 2011. [Online]. Available: https://www.ifpri.org/publication/transmission-world-food-price-changes-markets-sub-saharan-africa
[12] S.-N. Siami-Namini, N. Tavakoli, and A. S. Namin, “A comparison of ARIMA and LSTM in forecasting time series,” in Proc. IEEE ICMLA, 2018, pp. 1394–1401, doi: https://doi.org/10.1109/ICMLA.2018.00227 DOI: https://doi.org/10.1109/ICMLA.2018.00227
[13] M. C. Medeiros, G. F. R. Vasconcelos, Á. Veiga, and E. Zilberman, “Forecasting inflation in a data-rich environment: The benefits of machine learning methods,” Journal of Econometrics, vol. 225, no. 2, pp. 347–366, 2021, doi: https://doi.org/10.1080/07350015.2019.1637745 DOI: https://doi.org/10.1080/07350015.2019.1637745
[14] International Monetary Fund (IMF), Afghanistan: Exchange Rate Trends and Macroeconomic Stability, IMF Country Report No. 23/111, 2023. [Online]. Available: https://www.imf.org/en/Countries/AFG
[15] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997, doi: https://doi.org/10.1007/978-3-642-24797-2_4 DOI: https://doi.org/10.1162/neco.1997.9.8.1735
[16] M. C. Medeiros, G. F. R. Vasconcelos, Á. Veiga, and E. Zilberman, “Forecasting Brazilian inflation with high-dimensional models,” Journal of Business & Economic Statistics, vol. 39, no. 3, pp. 1–15, 2021, doi: https://doi.org/10.12660/bre.v99n992016.52273 DOI: https://doi.org/10.12660/bre.v99n992016.52273
[17] United Nations Office for the Coordination of Humanitarian Affairs (OCHA), Humanitarian Response Plan: Afghanistan, United Nations, 2024. [Online]. Available: https://www.unocha.org/afghanistan
[18] G. P. Zhang, “Time series forecasting using a hybrid ARIMA and neural network model,” Neurocomputing, vol. 50, pp. 159–175, 2003, doi: https://doi.org/10.1016/S0925-2312(01)00702-0 DOI: https://doi.org/10.1016/S0925-2312(01)00702-0
[19] K. J. Forbes and F. E. Warnock, “Capital flow waves: Surges, stops, flight, and retrenchment,” Journal of International Economics, vol. 88, no. 2, pp. 235–251, 2012, doi: https://doi.org/10.1016/j.jinteco.2012.03.006 DOI: https://doi.org/10.1016/j.jinteco.2012.03.006
[20] World Food Programme (WFP), Food Price and Currency Market Bulletin: Afghanistan, WFP Afghanistan Office, 2025.[Online]. Available: https://www.wfp.org/countries/afghanistan
[21] M. K. Mohanty, P. K. Guha Thakurta, and S. Kar, “Agricultural commodity price prediction model: a machine learning framework,” Neural Computing and Applications, vol. 35, no. 20, pp. 15109–15128, Apr. 2023. [Online]. Available: https://doi.org/10.1007/s00521-023-08528-7 DOI: https://doi.org/10.1007/s00521-023-08528-7
[22] E. Sediyono, K. D. Hartomo, C. Arthur, and I. Utami, “An integrated framework for multi-commodity agricultural price forecasting and anomaly detection using attention-boosted models,” Journal of Agriculture and Food Research, vol. 15, Art. no. 100679, 2025, doi: https://doi.org/10.1016/j.jafr.2025.102021 DOI: https://doi.org/10.1016/j.jafr.2025.102021
[23] M. Z. Abedin, M. H. Moon, M. K. Hassan, and P. Hajek, “Deep learning-based exchange rate prediction during the COVID-19 pandemic,” Annals of Operations Research, vol. 345, no. 2, pp. 1335–1386, Nov. 2021. [Online]. Available: https://doi.org/10.1007/s10479-021-04420-6 DOI: https://doi.org/10.1007/s10479-021-04420-6
[24] G. Koop and D. Korobilis, “Forecasting inflation using dynamic model averaging,” International Economic Review, vol. 53, no. 3, pp. 867–886, 2012, doi: https://doi.org/10.1111/j.1468-2354.2012.00704.x DOI: https://doi.org/10.1111/j.1468-2354.2012.00704.x
[25] Y. Zhang, C. C. Aggarwal, and G. J. Qi, “Stock price prediction via discovering multi-frequency trading patterns,” in Proc. 23rd ACM SIGKDD Int. Conf. Knowledge Discovery and Data Mining (KDD), Halifax, NS, Canada, 2017, pp. 2141–2149, doi: https://doi.org/10.1145/3097983.3098117 DOI: https://doi.org/10.1145/3097983.3098117

