Previsão da Despesa Primária do Governo Central

Uma Análise Comparativa entre Técnicas Estatísticas, Aprendizado de Máquina, Aprendizado Profundo e Combinação de Previsões

Autores

  • Eduardo Jacomo Seraphim Nogueira

Palavras-chave:

Previsão, Séries temporais, Política fiscal

Resumo

A previsão das despesas públicas é fundamental para o planejamento fiscal, mas em muitos países ainda se utiliza métodos simples e pouco robustos. Embora o uso de técnicas estatísticas seja consolidado, a aplicação de aprendizado de máquina e profundo ainda é limitada, sobretudo em despesas. Este trabalho investiga o desempenho de diferentes classes de modelos estatísticos, de aprendizado de máquina, profundo e suas combinações na previsão de séries de despesas primárias federais brasileiras. O estudo utiliza dados oficiais, otimização automática de parâmetros, validação cruzada temporal e previsão conformal para construir previsões e intervalos de confiança. Os resultados mostram que modelos estatísticos permanecem altamente competitivos, superando algoritmos mais complexos em horizontes longos, enquanto modelos profundos se destacam em horizontes curtos. A combinação de previsões, por sua vez, apresenta desempenho equilibrado. Conclui-se que técnicas avançadas de previsão são ferramentas úteis para subsidiar a política fiscal no Brasil.

Referências

AKIBA, T. et al. Optuna: A next-generation hyperparameter optimization framework. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.

ANDO, S.; KIM, T. Systematizing macroframework forecasting: High-dimensional conditional forecasting with accounting identities. IMF Working Paper, 2022.

APICELLA, A.; ISGRò, F.; PREVETE, R. Don’t Push the Button! Exploring Data Leakage Risks in Machine Learning and Transfer Learning. 2025

ARNOLD, R. W. How cbo produces its 10-year economic forecast. CBO Working Paper, 2018.

ASIMAKOPOULOS, I.; PAREDES, J.; WARMEDINGER, T. Forecasting Fiscal Time Series Using Mixed Frequency Data, 2013. ECB Working Paper No. 1553.

BARBER, R. F. et al. Conformal prediction beyond exchangeability. The Annals of Statistics, Institute of Mathematical Statistics, v. 51, n. 2, p. 816 – 845, 2023.

BATES, J. M.; GRANGER, C. W. J. The combination of forecasts. Operational Research Quarterly, v. 20, n. 4, p. 451–468, 1969.

BERGMEIR, C.; HYNDMAN, R. J.; KOO, B. A note on the validity of crossvalidation for evaluating autoregressive time series prediction. Computational Statistics & Data Analysis, v. 120, p. 70–83, 2018.

BOLHUIS, M. A.; RAYNER, B. Deus ex machina: A framework for macroforecasting with machine learning. IMF Working Paper, 2020.

CAMERON, S. How can independent fiscal institutions make the most of assessing past economic forecasts? OECD Journal on Budgeting, v. 22/2, p. 104–113, 2022.

CARNEIRO, L. M.; COSTA, M. C. Fatores associados ao erro de previsão de despesa orçamentária nos municípios brasileiros. Cadernos de Finanças Públicas, v. 21, n. 2, p. 1–41, 2021.

CHEN, S.; RANCIERE, R. Financial information and macroeconomic forecasts. IMF Working Paper, 2016.

CICCARELLI, M. et al. Ecb macroeconometric models for forecasting and policy analysis. ECB Occasional Paper, n. 344, 2024.

CIMADOMO, J.; GIANNONE, D.; LENZA, M. Fiscal Nowcasting. [S.l.], 2017.

CLEMEN, R. T. Combining forecasts: A review and annotated bibliography. International Journal of Forecasting, v. 5, n. 4, p. 559–583, 1989.

CROSTON, J. D. Forecasting and stock control for intermittent demands. Journal of the Operational Research Society, v. 23, p. 289–303, 1972.

DEUS, J. D. B. V. d.; MENDONçA, H. F. d. Fiscal forecasting performance in na emerging economy: An empirical assessment of Brazil. Economic Systems, v. 41, n. 3, p. 408–419, 2017.

CEPAL. Revenue and Expenditure Forecasting Methods for a PER Spending. Santiago, Chile, 2015.

EICHER, T. S. et al. Forecasting in times of crises. IMF Working Paper, 2018.

FAVERO, C. A.; MARCELLINO, M. Modelling and forecasting fiscal variables for the euro area. IGIER Working Paper, n. 298, 2005.

FORONI, C. Discussion of “fiscal nowcasting”. Conference presentation. 2017.

GADELHA, S. R. d. B.; LIMA, A. F. R.; POLLI, D. A. Uso da metodologia de combinação de previsões para projeções da arrecadação de receitas brutas primárias de tributos federais. Revista Cadernos de Finanças Públicas, v. 1, n. 1, p. 1–70, 2020.

GARZA, A. et al. StatsForecast: Lightning fast forecasting with statistical and econometric models. 2022. PyCon Salt Lake City, Utah, US 2022.

GODAHEWA, R. et al. Monash time series forecasting archive. In: Neural Information Processing Systems Track on Datasets and Benchmarks. [s.n.], 2021.

GOLDBLUM, M. et al. The No Free Lunch Theorem, Kolmogorov Complexity, and the Role of Inductive Biases in Machine Learning. 2024.

GOODFELLOW, I.; BENGIO, Y.; COURVILLE, A. Deep Learning. Cambridge, MA:

MIT Press, 2016.

HADZI-VASKOV, M. et al. Authorities fiscal forecasts in latin america: Are they optimistic? IMF Working Paper, 2021.

HAMILTON, J. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.

HASTIE, T.; TIBSHIRANI, R.; FRIEDMAN, J. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. 2. ed. New York: Springer, 2009.

HYNDMAN, R. J. et al. Forecasting: Principles and Practice, the Pythonic Way. Melbourne, Australia: OTexts, 2025.

HYNDMAN, R. J.; KHANDAKAR, Y. Automatic time series forecasting: The forecast package for R. Journal of Statistical Software, v. 27, n. 3, p. 1–22, 2008.

FMI. IMF Forecasts: Process, Quality, and Country Perspectives. Washington, D.C., 2014.

JUNG, J.-K.; PATNAM, M.; TER-MARTIROSYAN, A. An algorithmic crystal ball: Forecasts based on machine learning. IMF Working Paper, 2018.

KAUSHIK, M.; GIRI, A. K. Forecasting Foreign Exchange Rate: A Multivariate Comparative Analysis between Traditional Econometric, Contemporary Machine Learning & Deep Learning Techniques. 2020.

KAVA, L. E. Além da Caixa Preta: Aprendizagem de Máquina Interpretável para Previsão de Séries Temporais Macroeconômicas Brasileiras. Dissertação (Mestrado) — Universidade Federal de Santa Catarina, 2022.

KYOBE, A. J.; DANNINGER, S. Revenue forecasting - how is it done? Results from a survey of low-income countries. IMF Working Paper, 2005.

LARSON, S. E.; OVERTON, M. Modeling approach matters, but not as much as preprocessing: Comparison of machine learning and traditional revenue forecasting techniques. Public Finance Journal, v. 1, n. 1, p. 29–48, 2024.

LEAL, T. et al. Fiscal forecasting: Lessons from the literature and challenges. Fiscal Studies, v. 29, n. 3, p. 347–386, 2008.

MAKRIDAKIS, S.; SPILIOTIS, E.; ASSIMAKOPOULOS, V. The M4 competition: 100,000 time series and 61 forecasting methods. International Journal of Forecasting, v. 36, n. 1, p. 54–74, 2020.

MEDEIROS, R. K. d.; ARAGóN, E. K. d. S. B.; BESARRIA, C. d. N. Estratégias de previsão fiscal: um estudo empírico para a economia brasileira. In: ANPEC. Anais do 50º Encontro Nacional de Economia. 2022.

MENDONçA, M. J.; MEDRANO, L. A. Um modelo de combinação de previsões para arrecadação de receita tributária no Brasil. Texto para Discussão, n. 2186, 2016.

OBR. Forecasting the Economy. [S.l.], 2011-a.

OBR. Forecasting the Public Finances. [S.l.], 2011-b.

OBR. How We Present Uncertainty. [S.l.], 2012.

OBR. In-year Fiscal Forecasting and Monitoring. [S.l.], 2018.

OLIVARES, K. G. et al. NeuralForecast: User friendly state-of-the-art neural forecasting models. 2022. PyCon Salt Lake City, Utah, US 2022.

RAHIM, F. S.; WENDLING, C.; PEDASTSAAR, E. How to prepare expenditure baselines. IMF How To Notes, 2022.

STN. Manual de Estatísticas Fiscais do Boletim Resultado do Tesouro Nacional. Brasília, 2016.

SHAW, T. Long-term fiscal sustainability analysis: Benchmarks for independent fiscal institutions. OECD Journal on Budgeting, v. 17/1, p. 125–152, 2017.

STANKEVIčIuTe, K.; ALAA, A. M.; SCHAAR, M. van der. Conformal time-series forecasting. In: Proceedings of the 35th International Conference on Neural Information Processing Systems. Red Hook, NY, USA: Curran Associates Inc., 2021. (NIPS ’21).

STERN, E. et al. CBO explains how it develops the budget baseline. CBO Report, 2023.

STOFFI, F. B.; CEVOLANI, G.; GNECCO, G. Simple models in complex worlds: Occam’s razor and statistical learning theory. Minds and Machines, v. 32, 03, 2022.

WANG, X. et al. Forecast combinations: An over 50-year review. International Journal of Forecasting, v. 39, n. 4, p. 1518–1547, 2023.

XU, C.; XIE, Y. Conformal prediction for time series. In: Proceedings of the 38th International Conference on Machine Learning. [s.n.], 2021.

Publicado

05-01-2026

Como Citar

Jacomo Seraphim Nogueira, E. (2026). Previsão da Despesa Primária do Governo Central: Uma Análise Comparativa entre Técnicas Estatísticas, Aprendizado de Máquina, Aprendizado Profundo e Combinação de Previsões. CADERNOS DE FINANÇAS PÚBLICAS , 26(01). Recuperado de https://publicacoes.tesouro.gov.br/index.php/cadernos/article/view/284