EconPapers    
Economics at your fingertips  
 

Forecasting the Cost of a Basic Basket of Goods: a comparative analysis using machine learning models and online prices

João Felix, Michel Alexandre and Cássio Besarria

No 650, Working Papers Series from Central Bank of Brazil, Research Department

Abstract: Online prices can be used to successfully estimate and predict inflation indices represented by the cost of a basket of goods. Nevertheless, machine learning algorithms can deliver better inflation index forecasts than a simple weighted sum of prices due to their ability to handle complex relationships between predictive variables. Using data from five Brazilian state capitals (São Paulo, Porto Alegre, Rio de Janeiro, Goiânia, and Fortaleza) from February 2024 to May 2025, we attempt to predict the cost of a basket of goods using the online prices of the goods that make up such baskets as predictive features. We employ four machine learning models (k-NN, XGBoost, Random Forest, and ridge regression) and a forecast combination technique (Voting Regressor). We also verified the robustness of the machine learning models in situations where it was not possible to obtain online prices for all products. Machine learning models outperform the simple weighted sum of prices in forecasting the overall cost of the food basket, whether all the variables are available or not.

Date: 2026-08
References: Add references at CitEc
Citations:

Downloads: (external link)
https://www.bcb.gov.br/content/publicacoes/WorkingPaperSeries/WP650.pdf (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:bcb:wpaper:650

Access Statistics for this paper

More papers in Working Papers Series from Central Bank of Brazil, Research Department
Bibliographic data for series maintained by Rodrigo Barbone Gonzalez ().

 
Page updated 2026-09-02
Handle: RePEc:bcb:wpaper:650