EconPapers    
Economics at your fingertips  
 

Directional Macroeconomic Forecasting: Robustness of KNN versus Flexibility of ANN and SVM on Limited Data

Tarek Bahaa Aly and El-Masry Ahmed

MPRA Paper from University Library of Munich, Germany

Abstract: In this paper, we predicted the directional movement (up or down) of five macroeconomic variables: the equity market (EQUITY), foreign exchange rate (FX), central bank policy rate (POLRATE), GDP growth rate (GDP), and inflation rate (INF), using K-Nearest Neighbors (KNN), Artificial Neural Networks (ANN), and Support Vector Machine (SVM) classifiers, compared with a logistic regression model included as a linear benchmark. The analysis was conducted on monthly data from eight diverse markets across different geographical regions (US, UK, Mexico, Brazil, Egypt, South Africa, Indonesia, China) over forecast horizons of 1, 3, and 6 months. Our aim was to compare the predictive performance of these three fundamentally different classifiers and identify common patterns in macroeconomic variable behavior. We found that the standard KNN classifier significantly outperformed SVM and ANN, achieving the highest average out-of-sample directional accuracy. Our analysis revealed that the optimal number of neighbors, K, did not materially affect out-of-sample accuracy and remained relatively stable across forecast horizons. Feature importance analysis showed that KNN relied on a few strong signals, such as the yield curve level, while SVM and ANN distributed importance weights more broadly. The highest average prediction accuracies were achieved by the equity market and FX, while the US and China recorded the strongest country-level performance. In addition, inflation and the equity market exhibited the highest predictive power. Our results demonstrated the continued value of simple, robust models like KNN for macroeconomic directional forecasting, particularly when compared to more complex models such as SVM and ANN on limited panel data.

Keywords: Classifier; ANN; SVM; KNN; Equity Market; Foreign Exchange Rate; Inflation; Policy Rate; GDP; Feature Importance (search for similar items in EconPapers)
JEL-codes: C32 (search for similar items in EconPapers)
Date: 2024-01-31
References: Add references at CitEc
Citations:

Downloads: (external link)
https://mpra.ub.uni-muenchen.de/129067/1/MPRA_paper_127925.pdf original version (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:pra:mprapa:129067

Access Statistics for this paper

More papers in MPRA Paper from University Library of Munich, Germany Ludwigstraße 33, D-80539 Munich, Germany. Contact information at EDIRC.
Bibliographic data for series maintained by Joachim Winter ().

 
Page updated 2026-05-17
Handle: RePEc:pra:mprapa:129067