Article

September 30, 2026

Comparison of the predictive capacity of Holt-Winters and XGBoost in the projection of the monthly IPCA

Comparison of the Predictive Capacity of Holt-Winters and Xgboost in the Projection of the Monthly IPCA

Douglas Gonçalves Leite; Patrícia Belfiore Fávero

DOI: 10.22167/2675-6528-202602831

Article derived from a Course Conclusion Work (TCC), with content based on the student’s original work and adapted to the editorial format of the E&S Magazine with the support of the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege for textual synthesis and organization.

Summary

Inflation forecasting represents a central challenge in macroeconomic management, impacting monetary policy, indexed contracts, and fiscal planning. In Brazil, the National Broad Consumer Price Index (IPCA) combines inertial dynamics with sensitivity to exogenous shocks, requiring specific methodologies. In this study, the predictive capacity of the Holt-Winters model and the XGBoost algorithm was compared in the monthly projection of the IPCA over a six-month horizon. A historical series from January 2010 to July 2025 was used, with 186 to 187 monthly observations. Both models underwent methodological auditing, including outlier correction via STL decomposition, walk-forward temporal validation with an expanding window over five rounds, and construction of confidence intervals by non-parametric bootstrap with 3,000 iterations. In the common test subset (August to December 2025), XGBoost achieved a Mean Absolute Error (MAE) of 0.224 p.p., compared to 0.288 p.p. for Holt-Winters, a 22% advantage. However, in the walk-forward estimation, Holt-Winters presented an average MAE of 0.237 p.p. versus 0.264 p.p. for XGBoost, indicating a favorable result over a broader evaluation horizon. XGBoost demonstrated 100% coverage in the 80% and 95% confidence intervals, while Holt-Winters registered 50% and 83%, respectively. Both models failed to anticipate administered price shocks, evidencing a structural limitation of univariate approaches. The results suggest that the choice of the ideal model depends on the horizon and the prioritized metric, with potential complementarity through ensemble by projection horizon.

Keywords: Holt-Winters; IPCA; Inflation forecasting; Time series; XGBoost.

1. Introduction

Inflation forecasting is one of the central challenges of macroeconomic management, with direct implications for the effectiveness of monetary policy, the calibration of indexed contracts, and the fiscal planning of the public and private sectors. In general, the Central Bank uses economic information, such as inflation indices, to monitor the economy and provide subsidies to economic agents and the government, enabling policy formulation and promoting sustainable economic growth.

In Brazil, the Índice Nacional de Preços ao Consumidor Amplo (IPCA), the official inflation index calculated by the Instituto Brasileiro de Geografia e Estatística (IBGE), combines persistent inertial dynamics with sensitivity to exogenous shocks of high magnitude. These characteristics impose specific methodological requirements on projection models, making the task of forecasting inflation a complex and highly relevant process.

Price index forecasting is a well-established topic in the applied econometrics literature. Stock and Watson (2007) documented that simple autoregressive models have become progressively difficult to beat for forecasting U.S. inflation since the 1990s. In the context of emerging economies, García-Ferrer and Highfield (1994) demonstrated that exponential smoothing models, such as Holt-Winters, produce price index forecasts comparable to those of more elaborate structural models in short-term horizons. In Brazil, Marçal et al. (2013) identified that exponential smoothing methods favorably compete with ARIMA and factor models in short-term IPCA forecasting. However, Cecchetti et al. (2000) concluded that no single model class dominates the others across all horizons, recommending the combination of approaches for greater robustness.

More recently, machine learning algorithms, including random forests, recurrent neural networks, and boosting methods, have shown potential to outperform traditional econometric models in medium-term IPCA forecasts when fed with rich sets of macroeconomic series (Medeiros et al., 2016; Araújo and Gaglianone, 2022). XGBoost, in particular, stands out for combining high predictive performance with explicit regularization mechanisms that mitigate overfitting problems, as substantiated by Chen and Guestrin (2016) and Varian (2014).

The Brazilian inflationary dynamics present three characteristics that shape the appropriate methodological choice for its forecasting. The first is strong inertial persistence, with significant autocorrelations in short-term lags, making models that efficiently capture the recent level of the series, such as Holt-Winters, competitive in horizons of one to two months (Atkeson and Ohanian, 2001). The second is regular structural seasonality, with the IPCA exhibiting relatively stable monthly patterns over the decades, favoring models with an explicit seasonal component (Chatfield, 2001). The third is the periodic occurrence of distinct inflationary regimes, marked by administered price shocks, abrupt exchange rate variations, and commodity cycles, which introduce nonlinearities and structural breaks that escape the reach of purely linear models (Medeiros et al., 2016; Araújo and Gaglianone, 2022). It is precisely this set of characteristics that justifies the comparison between Holt-Winters, designed to capture the first two, and XGBoost, with the capacity to model the third.

In this context, it becomes relevant to investigate whether the incorporation of greater methodological complexity, represented by a machine learning model capable of capturing non-linear relationships and complex interactions between variables, such as XGBoost, results in effective gains in accuracy in projecting Brazilian inflation compared to a traditional univariate model, such as Holt-Winters, over a six-month horizon. This comparison allows for an empirical evaluation of whether more flexible approaches outperform models predominantly based on recent inflation behavior, contributing to the continuous improvement of economic monitoring and management practices.

This work has the general objective of comparing the predictive capacity of two structurally distinct models in forecasting the monthly IPCA over a six-month horizon: the Holt-Winters model, representative of traditional statistical approaches, and XGBoost, representative of contemporary machine learning methods.

2. Material and Methods

The methodology employed in this study was based on the empirical comparison of the predictive capacity of two distinct models: the Holt-Winters model and the XGBoost algorithm. This approach was selected to evaluate the projection of the National Broad Consumer Price Index (IPCA) on a monthly basis over a six-month horizon, considering the specific characteristics of the time series in a low-dimensionality context.

The Holt-Winters model, representative of traditional statistical approaches, was chosen over alternatives such as ARIMA and SARIMA. Its preference stemmed from its parsimony in handling series that exhibit stable seasonality and the absence of a pronounced trend, characteristics observed in the IPCA profile during the analyzed period (Gardner, 1985; Makridakis, Wheelwright, and Hyndman, 1998).

Holt-Winters belongs to the class of exponential smoothing methods, structured to decompose time series into level, trend, and seasonality components. These components are recursively updated through smoothing parameters (Holt, 1957; Winters, 1960; Hyndman and Athanasopoulos, 2021). The additive variant without trend, ETS(A,N,A), was adopted after comparing three specifications using the Akaike information criterion (AIC).

In this variant, the smoothing parameters are reduced to two: α, for the level, and γ, for seasonality. The level update equation weights the current observation and the previous estimate, while the seasonal component update is performed based on the difference between the observed value and the estimated level, adjusted by the seasonal component of the previous cycle. The forecast for future periods is obtained by summing the estimated level and the projected seasonal component.

The Holt-Winters model was fitted to the historical series of IPCA from January 2010 to June 2025, totaling 186 observations. Four outliers were previously corrected using robust STL decomposition, with a threshold of 3 standard deviations. The identified points were replaced by linear interpolation between immediate neighbors.

In the machine learning methods pole, XGBoost was selected over Random Forest, Long Short-Term Memory (LSTM), and dense neural networks. Random Forest, although based on decision trees, uses bagging and tends to have lower point accuracy in time series with short-term dependency (Chen and Guestrin, 2016; Fernández-Delgado et al., 2014).

LSTM networks and other deep learning architectures were considered inadequate for the monthly series of 186 to 187 observations due to the need for substantially larger data volumes for stable convergence and sensitivity to hyperparameter choice (Mullainathan and Spiess, 2017).

XGBoost, in turn, constitutes a machine learning algorithm based on the gradient boosting technique applied to decision trees (Friedman, 2001; Chen and Guestrin, 2016). It combines multiple weak models sequentially to minimize a differentiable loss function, incorporating explicit L1 and L2 regularization mechanisms that control tree complexity.

For the application of XGBoost in time series, 18 engineered features were constructed. These included 12 monthly lags (lag_1 to lag_12), three moving averages (3, 6, and 12 months, calculated with temporal displacement to avoid data leakage), two cyclical components (sine and cosine of monthly seasonality), and a normalized trend indicator.

The XGBoost model was fitted on the series from January 2010 to July 2025 (187 observations), with two previously corrected outliers. Hyperparameter optimization was conducted by RandomizedSearchCV with an internal five-fold TimeSeriesSplit and 50 iterations per validation round, resulting in a learning rate of 0.01, max depth of 4, n estimators of 200, subsample of 0.90, and colsample bytree of 0.80.

Both models were subjected to a walk-forward validation protocol with an expanding window, as recommended by Bergmeir and Benitez (2012). The procedure consisted of training the model up to a cutoff point, projecting the following six periods, advancing the window by six months, and repeating the process. Five rounds were executed with an initial cutoff point in June 2022, generating 30 out-of-sample evaluation points.

The confidence intervals for both models were constructed via non-parametric bootstrap with 3,000 iterations, using a fixed random seed of 42 to ensure reproducibility. For Holt-Winters, the in-sample residuals were resampled with replacement. For XGBoost, the residuals from each walk-forward round were collected by horizon and used as the basis for the bootstrap.

The primary evaluation metric adopted was the Mean Absolute Error (MAE) in percentage points, instead of the Mean Absolute Percentage Error (MAPE), given the inadequacy of the latter for series with values close to zero. Other metrics calculated included the Mean Squared Error (RMSE), the coverage of confidence intervals (CI), and the Theil-U coefficient.

The computational development of the models was carried out entirely in Python 3.12 language. The libraries used included pandas and numpy for time series manipulation and structuring, statsmodels for the Holt-Winters model fitting and statistical tests, xgboost for the gradient boosting algorithm, and scikit-learn for validation and hyperparameter search.

In the data preparation stage, the historical series of the IPCA was read from an .xls file provided by the IBGE. Treatment of merged cells by progressive filling and conversion of month names to a monthly date index was performed. Outlier detection was carried out by STL decomposition (Cleveland et al., 1990) applied to the residual component of the series.

3. Results and Discussion

The comparative analysis of the predictive capacity of the Holt-Winters and XGBoost models in projecting the monthly IPCA revealed important nuances about the performance of traditional statistical approaches and machine learning methods in economic time series. The results obtained, subjected to a rigorous methodological audit, including outlier correction, walk-forward validation, and bootstrap confidence interval construction, offer an in-depth understanding of the strengths and limitations of each model in the context of Brazilian inflation.

Initially, observing the monthly IPCA time series, from January 2024 to July 2025, allowed for the evaluation of the in-sample fit quality of both models. It was found that XGBoost, by incorporating the ability to capture non-linear relationships between inflationary lags, reproduced the short-term movements of the series more closely. In contrast, Holt-Winters showed a tendency to smooth out oscillations, a characteristic behavior of exponential smoothing models with a moderate alpha parameter, as described by Gardner (1985).

A notable example of this difference occurred in February 2025, when the IPCA reached a peak of 1.31%. XGBoost managed to partially capture this abrupt variation, while Holt-Winters significantly attenuated it, highlighting the greater rigidity of the ETS model in the face of sudden changes in the series. This distinction underscores XGBoost’s ability to adapt to more complex and non-linear patterns, which can be crucial in scenarios of inflationary volatility.

In the projection window, which covered the period from August to December 2025, both models systematically overestimated the realized values of the IPCA. This overestimation indicates that the models were unable to capture the extent of the inflationary deceleration that actually occurred. Such behavior is expected from univariate models that base their projections predominantly on historical inertia and seasonal patterns, without access to public policy or administered price variables, confirming an inherent structural limitation of these approaches.

Monthly projections and comparison with actual values

The comparison of monthly projections with the actual values of the IPCA for the period from August to December 2025 revealed that XGBoost obtained a Mean Absolute Error (MAE) of 0.224 percentage points (p.p.), while Holt-Winters registered 0.288 p.p. This difference represents a 22% advantage for XGBoost in the common test subset. This superiority is economically relevant, as a reduction of 0.064 p.p. in the average monthly IPCA projection error can lead to more precise calibrations of real interest rates, contractual indexers, and fiscal result projections.

Dois meses em particular merecem destaque. Em agosto de 2025, o IPCA registrou uma deflação de -0,11%, impulsionada pela redução da bandeira tarifária de energia elétrica e pela queda nos preços dos combustíveis. Ambos os modelos falharam em prever essa deflação, projetando valores positivos e resultando em erros entre 0,26 e 0,41 p.p. Esse achado corrobora a literatura que aponta as limitações de modelos univariados diante de choques exógenos administrados, como discutido por Atkeson e Ohanian (2001).

In October 2025, the IPCA registered 0.09%, a level significantly below the seasonal historical standard for the month. In this scenario, XGBoost presented a smaller absolute error, of 0.31 p.p., benefited by the reduction in the relative importance of the one-month lag (lag_1), which went from 23.2% to 16.6% after hyperparameter optimization. Furthermore, the emergence of the nine- and six-month lags (lag_9 and lag_6) as relevant features indicated that medium-term memory contributed to capturing gradual inflationary slowdowns.

The month of December 2025 marked XGBoost’s best performance, with an error of only 0.09 p.p. This accuracy is attributable to the ability of cyclic features (sine and cosine) to adequately represent year-end seasonality, an aspect highlighted by Makridakis, Spiliotis, and Assimakopoulos (2020). These specific results demonstrate XGBoost’s flexibility in adapting to different seasonal and lag patterns, when properly configured.

MAE by projection horizon

The evaluation of the mean MAE by projection horizon, carried out through five rounds of walk-forward validation, offered a more detailed perspective on the performance of each model. Holt-Winters demonstrated superiority in four of the six horizons evaluated (h=1, h=3, h=4, and h=5). The most significant advantage of Holt-Winters was observed at the one-month horizon (h=1), where its MAE of 0.155 p.p. was 24% lower than the MAE of 0.204 p.p. from XGBoost.

At horizons of four and five months (h=4 and h=5), XGBoost errors were 17% and 42% higher, respectively, compared to Holt-Winters. This performance pattern of Holt-Winters is consistent with the theory of ETS models, which, by using a moderate alpha parameter, adequately weighs the current level and recent history of the series, generating short-term projections that are accurate and stable for series without a pronounced trend, as pointed out by Hyndman and Athanasopoulos (2021).

On the other hand, XGBoost outperformed Holt-Winters at the two-month (h=2) and six-month (h=6) horizons. The advantage at the two-month horizon (h=2), with an MAE of 0.347 p.p. versus 0.415 p.p. for Holt-Winters, is particularly relevant for monetary policy decisions, which are often based on short- and medium-term inflation projections. XGBoost’s superiority at h=6, with an MAE of 0.167 p.p. versus 0.208 p.p. for Holt-Winters, can be attributed to the ability of cyclical seasonal features to encode the inflation pattern of the same month in the next semester.

The Holt-Winters peak error at the two-month horizon (h=2), which was 2.7 times higher than the error at h=1, represents a structural fragility for two-month horizons in ETS models without trend, a phenomenon documented by Hyndman et al. (2002). This observation suggests that, although Holt-Winters is robust for the very short term, its performance may be compromised at slightly longer horizons, where the series dynamics may require more flexible modeling.

Overall performance and calibration of confidence intervals

In the common test subset, which covered the period from August to December 2025, XGBoost registered an MAE of 0.224 p.p., outperforming Holt-Winters, which presented 0.288 p.p., a 22.2% advantage. However, in the aggregated walk-forward validation, which considered 30 evaluation points and different inflationary regimes, Holt-Winters demonstrated an average MAE of 0.237 p.p., superior to XGBoost’s MAE of 0.264 p.p., indicating a 10.2% robustness in favor of the exponential smoothing model over a broader and methodologically more reliable evaluation horizon.

The advantage of Holt-Winters in walk-forward validation can be partially explained by its greater robustness during the 2022 inflationary shock (round 1), where it registered an MAE of 0.624 p.p. compared to XGBoost’s 0.712 p.p. The structural simplicity of Holt-Winters ensured greater stability across multiple horizons and greater resilience to periods of strong inflationary oscillation. From a theoretical point of view, the convergence of the gamma parameter (γ) to zero in Holt-Winters, even after outlier treatment, revealed that the seasonality of the IPCA behaved statically in the analyzed period.

The calibration of the confidence intervals (CI) also showed significant differences. XGBoost achieved 100% coverage in both the 80% and 95% CI (five out of five months), benefiting from anchoring in real out-of-sample residuals by horizon. In contrast, Holt-Winters registered 50% coverage in the 80% CI (three out of six months) and 83% in the 95% CI (five out of six months), suggesting that its intervals are excessively narrow for the first confidence level. Additionally, Holt-Winters’ Theil-U was 1.009, marginally above the critical threshold of 1.0 (Theil, 1966), indicating that the model did not outperform the naive benchmark in the specific test period.

The ratio between the training RMSE and the projection RMSE, an indicator of overfitting, for XGBoost, dropped from approximately 7.8 to 0.5 after hyperparameter optimization by walk-forward. This reduction confirmed the elimination of severe overfitting that compromised the original version of XGBoost, whose hyperparameters had been manually defined without temporal validation, as discussed by Bergmeir and Benitez (2012). Holt-Winters, on the other hand, maintained a ratio close to 1.0, an expected behavior of a parsimonious parametric model.

In summary, the comparative evaluation demonstrates that the choice of the most suitable model for IPCA forecasting depends on the projection horizon and the prioritized metric. Although XGBoost showed gains in point accuracy at specific horizons and superior calibration of confidence intervals, Holt-Winters proved more robust and stable in a more comprehensive walk-forward evaluation, especially at short-term horizons. Both models, however, share the structural limitation of not anticipating public policy shocks or administered prices, highlighting the need for complementary or multivariate approaches for scenarios of high uncertainty.

4. Conclusion

This study sought to compare the predictive capacity of the Holt-Winters model and the XGBoost algorithm in the monthly projection of the Broad National Consumer Price Index (IPCA) over a six-month horizon. It was found that XGBoost demonstrated a greater ability to capture non-linear relationships and short-term movements of the inflation series in the fitting window, while Holt-Winters exhibited a more pronounced smoothing behavior in the face of abrupt variations. In the evaluation of the common test subset, XGBoost obtained a Mean Absolute Error (MAE) of 0.224 p.p., outperforming Holt-Winters, which registered 0.288 p.p. However, in a more comprehensive walk-forward validation, Holt-Winters presented an average MAE of 0.237 p.p., indicating greater robustness and stability over a broader evaluation horizon, with superiority in four out of six projection horizons. It was observed that the choice of the most suitable model depended on the projection horizon and the prioritized error metric.

The main contribution of this work lies in the empirical and methodologically rigorous evaluation of two distinct approaches for forecasting Brazilian inflation, offering subsidies for the improvement of economic monitoring and management practices. It was identified that, although XGBoost provided gains in punctual accuracy and superior calibration of confidence intervals, both models shared the structural limitation of not anticipating public policy shocks or administered prices, such as variations in tariff flags and fuels. For future studies, it is suggested to include macroeconomic regressors through SARIMAX or multivariate XGBoost specifications, as well as the construction of an ensemble structure by projection horizon to optimize the combination of each model’s strengths. Extending the analysis with additional data from the first half of 2026 also proves relevant to broaden the test sample and strengthen the robustness of the conclusions.

Bibliographic References

Araújo, G.S.; Gaglianone, W.P. 2022. Machine learning

Cecchetti, S.G.; Chu, R.; Steindel, C. 2000. The unreliability of inflation indicators. Federal Reserve Bank of New York Current Issues in Economics and Finance, v. 6, n. 4, p. 1-6.

García-Ferrer, A.; Highfield, R.A. 1994. Business and economic forecasting: the state of the art. Journal of Forecasting, v. 13, n. 2, p. 99-114.

Marçal, E.F.; Mattos, L.B.; Teles, V.K. 2013. Forecasting Brazilian inflation using a large data set. Brazilian Review of Econometrics, v. 33, n. 2, p. 171-196.

Medeiros, M.C. et al. 2016. Forecasting inflation in a data-rich environment: the benefits of machine learning methods. Journal of Business and Economic Statistics, v. 39, n. 1, p. 98-119.

Stock, J.H.; Watson, M.W. 2007. Why has U.S. inflation become harder to forecast? Journal of Money, Credit and Banking, v. 39, n. s1, p. 3-33.

Article originating from the Final Course Work of the Specialization in Data Science and Analytics of the MBA USP/Esalq

To learn more about the course, click here and access the MBX Academy platform

You may also like

Economy, Investments And Banking

October 23, 2026

Financial Education, Behaviors and Biases in Financial Decision Making

Personal financial management represents a growing challenge, influenced by cognitive biases that affect decision-making, even in individuals with high knowledge. The present study analyzed the relationship between the level of financial education and the occurrence of behavioral biases in the financial decision-making of adults residing in Brazil. An applied, quantitative, and descriptive-correlational field survey was conducted by administering a structured questionnaire to 163 respondents. The instrument included sociodemographic variables, financial knowledge and habits, and hypothetical situations to identify cognitive biases. The results indicated that higher levels of financial education were associated with better financial control, saving, and investment practices, with significant correlations with income and schooling. However, the presence of behavioral biases (anchoring, loss aversion, scarcity, optimism/negativity, present bias, status quo, overconfidence, and mental accounting) persisted even among individuals with higher schooling and income, with no statistically significant association with the analyzed sociodemographic variables. It was concluded that financial education, although essential for financial organization and control, was not sufficient to neutralize the influence of cognitive biases. The incorporation of behavioral approaches into financial education programs is suggested.

Keywords: Financial behavior; Behavioral economics; Personal finance; Cognitive heuristics; Cognitive biases.

October 22, 2026

Consumer Journey in the Decision to Purchase Infoproducts in the Digital Environment

The expansion of e-commerce and technological transformation have driven the need to understand consumer behavior regarding infoproducts, whose perceived experience has become crucial for professional development. The study aimed to analyze the factors that influenced the purchase decision of infoproducts in the digital environment, considering the stages of the consumer journey. An applied, quantitative, and descriptive research was conducted through a field survey with 100 consumers from Serra Gaúcha. Data collection occurred via a structured questionnaire, using non-probabilistic sampling. The results revealed a qualified audience with strong “mobile-first” behavior. It was found that the availability of detailed information and social approval were the main attraction triggers in the pre-purchase phase. In the transactional and subsequent stages, the minimization of operational friction, the agility of immediate access, and system security proved crucial for conversion and satisfaction, although gaps in human support efficiency were identified. Retention was based on the trust generated by positive past experiences, overcoming the price factor. It was concluded that the infoproduct consumer journey operates as an integrated system, requiring alignment between technological infrastructure, content curation, and support humanization to ensure engagement.

Keywords: E-commerce; Consumer behavior; Consumer experience; Loyalty; Virtual business.

October 22, 2026

Forecast of Aggregate Default in the Brazilian Financial System by Sarimax Model with Macroeconomic Variables

Aggregate non-payment in the Brazilian financial system is a crucial indicator of credit risk, the prediction of which is regulated by CMN Resolutions n.° 4.557/2017 and 4.966/2021 for the prospective measurement of expected losses. Aggregate non-payment was modeled and predicted using the SARIMAX model, projecting its trajectory until December 2026 under optimistic, base, and pessimistic scenarios. 164 monthly observations (July/2012 to February/2026) and macroeconomic variables such as unemployment, Selic, IPCA, IBC-Br, and household debt were used. The specification with contemporaneous variables was selected based on information criteria and coefficient stability, and residual diagnostics confirmed statistical adequacy, with a MAPE of 3.12%. Historical non-payment ranged between 4.33% and 7.64%. The estimation identified unemployment (β = 0.2534; p < 0.001) and Selic (β = 0.2128; p < 0.001) as the main positive determinants, with strong temporal persistence (AR(1) = 0.8965). Selic showed increasing correlation with non-payment (r = 0.62 at lag 12), while unemployment demonstrated a contemporaneous effect (r = 0.33). Projections indicated non-payment between 6.30% and 7.98% in December 2026, with a range of 1.68 percentage points, highlighting direct implications for provisioning in financial institutions.

Keywords: Unemployment; Predictive modeling; Monetary policy; Loss provisioning; Time series.