Skip to main content
Top

22-05-2024 | Notes and Short Article

Neighbor Weighting and Distance Metrics in Nearest Neighbor Nowcasting of Swedish GDP

Author: Kristian Jönsson

Published in: Journal of Quantitative Economics

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

Forecasting and nowcasting of economic activity can be of great importance in many settings. Business tendency survey data, when employed in a nearest neighbor (NN) algorithm, can produce nowcasts of Swedish GDP that compare well, in terms of predictive performance, to the often-used linear indicator models. The current article probes deeper into the choices available when implementing the nearest neighbor algorithm for nowcasting Swedish GDP and traces out the possible effects on nowcasting accuracy. The dimensions explored include the number of neighbors used for producing the nowcasts, the distance metric employed and distance-weighting of neighbors. The main results indicate the so-called Manhattan distance, or \(L_1\) norm, together with equal weighting of 4 or 5 neighbors, could improve nowcasting accuracy for Swedish GDP compared to a setting where a different number of neighbors is used, the \(L_2\) or \(L_\infty\) norms are employed and/or distance-based weighting of neighbors is applied.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Footnotes
1
See National Institute of Economic Research (2022) for a closer description of the Economic Tendency Survey.
 
2
For GDP, the 2019Q2 vintage of data is used, while the 2019Q3 vintage of data is used for the ETS.
 
3
The occasions where the KNN implementations perform better than the baseline univariate model are indicated by boldface entries in Table 1.
 
4
See Table 1 where significant differences at the 10% and 5% significance levels are denoted by \(^*\) and \(^\dag\), respectively.
 
5
All the statistical significance tests are performed using the Diebold and Mariano (1995) test with the Bartlett kernel and 4 lags.
 
Literature
go back to reference Abu Alfeilat, H., A. Hassanat, O. Lasassmeh, A. Tarawneh, M. Alhasanat, H. Eyal Salma, and V. Prasath. 2019. Effects of Distance Measure Choice on K-Nearest Neighbor Classifier Performance: A Review. Big Data 7(4): 1.CrossRef Abu Alfeilat, H., A. Hassanat, O. Lasassmeh, A. Tarawneh, M. Alhasanat, H. Eyal Salma, and V. Prasath. 2019. Effects of Distance Measure Choice on K-Nearest Neighbor Classifier Performance: A Review. Big Data 7(4): 1.CrossRef
go back to reference Bailey, T., and A.K. Jain. 1978. A Note on Distance-Weighted k-Nearest Neighbor Rules. IEEE Transactions on Systems, Man, and Cybernetics SMC–8(4): 311–313. Bailey, T., and A.K. Jain. 1978. A Note on Distance-Weighted k-Nearest Neighbor Rules. IEEE Transactions on Systems, Man, and Cybernetics SMC–8(4): 311–313.
go back to reference Billstam, M., K. Frändén, J. Samuelsson, and P. Österholm. 2017. Quasi-Real-Time Data of the Economic Tendency Survey. Journal of Business Cycle Research 13: 105–138.CrossRef Billstam, M., K. Frändén, J. Samuelsson, and P. Österholm. 2017. Quasi-Real-Time Data of the Economic Tendency Survey. Journal of Business Cycle Research 13: 105–138.CrossRef
go back to reference den Reijer, A., and A. Johansson. 2019. Nowcasting Swedish GDP with a Large and Unbalanced Data Set. Empirical Economics 57(4): 1351–1373.CrossRef den Reijer, A., and A. Johansson. 2019. Nowcasting Swedish GDP with a Large and Unbalanced Data Set. Empirical Economics 57(4): 1351–1373.CrossRef
go back to reference Diebold, F.X., and R.S. Mariano. 1995. Comparing Predictive Accuracy. Journal of Business & Economic Statistics 13(3): 253–263.CrossRef Diebold, F.X., and R.S. Mariano. 1995. Comparing Predictive Accuracy. Journal of Business & Economic Statistics 13(3): 253–263.CrossRef
go back to reference Fornaro, P., and H. Luomaranta. 2020. Nowcasting Finnish Real Economic Activity: A Machine Learning Approach. Empirical Economics 58: 55–71.CrossRef Fornaro, P., and H. Luomaranta. 2020. Nowcasting Finnish Real Economic Activity: A Machine Learning Approach. Empirical Economics 58: 55–71.CrossRef
go back to reference Hansson, J., P. Jansson, and M. Löf. 2005. Business Survey Data: Do They Help in Forecasting GDP Growth? Int. J. Forecast. 21: 377–389.CrossRef Hansson, J., P. Jansson, and M. Löf. 2005. Business Survey Data: Do They Help in Forecasting GDP Growth? Int. J. Forecast. 21: 377–389.CrossRef
go back to reference Hu, L.-Y., M.-W. Huang, S.-W. Ke, and C.-F. Tsai. 2016. The Distance Function Effect on k-Nearest Neighbor Classification for Medical Datasets. SpringerPlus 5(1304): 1. Hu, L.-Y., M.-W. Huang, S.-W. Ke, and C.-F. Tsai. 2016. The Distance Function Effect on k-Nearest Neighbor Classification for Medical Datasets. SpringerPlus 5(1304): 1.
go back to reference Jönsson, K. 2020. Machine Learning and Nowcasts of Swedish GDP. Journal of Business Cycle Research 16: 123–134.CrossRef Jönsson, K. 2020. Machine Learning and Nowcasts of Swedish GDP. Journal of Business Cycle Research 16: 123–134.CrossRef
go back to reference Jönsson, K. 2021. Bootstrap Aggregation Accuracy Gains in Nearest-Neighbor Nowcasting of Swedish Gross Domestic Product. Applied AI Letters 2(2): 1.CrossRef Jönsson, K. 2021. Bootstrap Aggregation Accuracy Gains in Nearest-Neighbor Nowcasting of Swedish Gross Domestic Product. Applied AI Letters 2(2): 1.CrossRef
go back to reference Kant, D., A. Pick. and J. de Winter. 2022. Nowcasting GDP Using Machine Learning Methods. Working Paper No. 754, De Nederlandsche Bank. Kant, D., A. Pick. and J. de Winter. 2022. Nowcasting GDP Using Machine Learning Methods. Working Paper No. 754, De Nederlandsche Bank.
go back to reference Kaufmann, D., and R. Scheufele. 2017. Business Tendency Surveys and Macroeconomic Fluctuations. International Journal of Forecasting 33: 878–893.CrossRef Kaufmann, D., and R. Scheufele. 2017. Business Tendency Surveys and Macroeconomic Fluctuations. International Journal of Forecasting 33: 878–893.CrossRef
go back to reference National Institute of Economic Research. 2022. User guide to the Economic Tendency Survey, 2022. Stockholm, Sweden, January: National Institute of Economic Research. National Institute of Economic Research. 2022. User guide to the Economic Tendency Survey, 2022. Stockholm, Sweden, January: National Institute of Economic Research.
go back to reference Österholm, P. 2014. Survey Data and Short-Term Forecasts of Swedish GDP Growth. Applied Economics Letters 21: 135–139.CrossRef Österholm, P. 2014. Survey Data and Short-Term Forecasts of Swedish GDP Growth. Applied Economics Letters 21: 135–139.CrossRef
go back to reference Richardson, A., T. van Florenstein Mulder. and T. Vehbi. 2018. Nowcasting New Zealand GDP Using Machine Learning Algorithms. CAMA Working Paper 47/2018, Centre for Applied Macroeconomic Analysis, Australian National University. Richardson, A., T. van Florenstein Mulder. and T. Vehbi. 2018. Nowcasting New Zealand GDP Using Machine Learning Algorithms. CAMA Working Paper 47/2018, Centre for Applied Macroeconomic Analysis, Australian National University.
go back to reference Richardson, A., T. van Florenstein Mulder, and T. Vehbi. 2021. Nowcasting GDP Using Machine-Learning Algorithms: A Real-Time Assessment. International Journal of Forecasting 37(2): 941–948.CrossRef Richardson, A., T. van Florenstein Mulder, and T. Vehbi. 2021. Nowcasting GDP Using Machine-Learning Algorithms: A Real-Time Assessment. International Journal of Forecasting 37(2): 941–948.CrossRef
go back to reference Soybilgen, B., and E. Yazgan. 2021. Nowcasting US GDP Using Tree-Based Ensemble Models and Dynamic Factors. Computational Economics 57: 387–417.CrossRef Soybilgen, B., and E. Yazgan. 2021. Nowcasting US GDP Using Tree-Based Ensemble Models and Dynamic Factors. Computational Economics 57: 387–417.CrossRef
Metadata
Title
Neighbor Weighting and Distance Metrics in Nearest Neighbor Nowcasting of Swedish GDP
Author
Kristian Jönsson
Publication date
22-05-2024
Publisher
Springer India
Published in
Journal of Quantitative Economics
Print ISSN: 0971-1554
Electronic ISSN: 2364-1045
DOI
https://doi.org/10.1007/s40953-024-00400-2

Premium Partner