FFA Working Papers 1:001 (2019)1259

Forecasting Foreign Exchange Rate Movements with k-Nearest-Neighbour, Ridge Regression and Feed-Forward Neural Networks

Milan Fičura
University of Economics, Prague, Faculty of Finance and Accounting, Department of Banking and Insurance

Three different classes of data mining methods (k-Nearest Neighbour, Ridge Regression and Multilayer Perceptron Feed-Forward Neural Networks) are applied for the purpose of quantitative trading on 10 simulated time series, as well as real world time series of 10 currency exchange rates ranging from 1.11.1999 to 12.6.2015. Each method is tested in multiple variants. The k-NN algorithm is applied alternatively with the Euclidian, Manhattan, Mahalanobis and Maximum distance function. The Ridge Regression is applied as Linear and Quadratic, and the Feed-Forward Neural Network is applied with either 1, 2 or 3 hidden layers. In addition to that Principal Component Analysis (PCA) is eventually applied for the dimensionality reduction of the predictor set and the meta-parameters of the methods are optimized on the validation sample. In the simulation study a Stochastic-Volatility Jump-Diffusion model, extended alternatively with 10 different non-linear conditional mean patterns, is used, to simulate the asset price behaviour to which the tested methods are applied. The results show that no single method was able to profit on all of the non-linear patterns in the simulated time series, but instead different methods worked well for different patterns. Alternatively, past price movements and past returns were used as predictors. In the case when the past price movements were used, quadratic ridge regression achieved the most robust results, followed by some of the k-NN methods. In the case when past returns were used, k-NN based methods were the most consistently profitable, followed by the linear ridge regression and quadratic ridge regression. Neural networks, while being able to profit on some of the time series, did not achieve profit on most of the others. No evidence was further found of the PCA method to improve the results of the tested methods in a systematic way. In the second part of the study, the models were applied to empirical foreign exchange rate time series. Overall the profitability of the methods was rather low, with most of them ending with a loss on most of the currencies. The most profitable currency was EURUSD, followed by EURJPY, GBPJPY and EURGBP. The most successful methods were the linear ridge regression and the Manhattan distance based k-NN method which both ended with profits for most of the time series (unlike the other methods). Finally, a forward selection procedure using the linear ridge regression was applied to extend the original predictor set with some technical indicators. The selection procedure achieved limited success in improving the out-sample results for the linear ridge regression model but not the other models.

Keywords: Ridge regression, k-Nearest Neighbour, Artificial Neural Networks, Principal Component Analysis, Exchange rate forecasting, Investment strategy, Market efficiency
JEL classification: C45, C63, G11, G14, G17

Received: November 13, 2019; Revised: November 24, 2019; Accepted: November 24, 2019; Prepublished online: December 1, 2019; Published online: November 22, 2019  Show citation

ACS AIP APA ASA Harvard Chicago Chicago Notes IEEE ISO690 MLA NLM Turabian Vancouver
Fičura, M. (2019). Forecasting Foreign Exchange Rate Movements with k-Nearest-Neighbour, Ridge Regression and Feed-Forward Neural Networks. FFA Working Papers1, Article 2019.001. https://doi.org/10.XXXX/xxx.2019.001
Download citation

References

  1. BERNAS, Marcin and PLACZEK, Bartlomiej, (2016). "Period-aware local modelling and data selection for time series prediction", Expert Systems With Applications, Vol. 59 (2016), pp. 60-77 Go to original source...
  2. CAGINALP, G., LAURENT, H. (1998), "The predictive power of price patterns", Applied Mathematical Finance, 1998, Vol. 5, pp. 181-205 Go to original source...
  3. CAVALCANTE, R.C., BRASILEIRO R.C., SOUZA, V.L.F., NOBREGA, J.P., OLIVEIRA, A.L.I., (2016). "Computational Intelligence and Financial Markets: A Survey and Future Directions", Expert Systems with Applications, Vol. 55 (2016), pp. 194-211 Go to original source...
  4. EXTERKATE, P., GROENEN, P.J.F., HEIJ, CH., VAN DIJK, D. (2016). "Nonlinear forecasting with many predictors using kernel ridge regression", International Journal of Forecasting, 2016, Vol. 32(3), pp. 736-753 Go to original source...
  5. FAMA, Eugene (1970). "Efficient Capital Markets: A Review of Theory and Empirical Work", Journal of Finance, 1970, 25 (2), pp. 383-417 Go to original source...
  6. FUNAHASHI, Ken-Ichi (1989). "On the Approximate Realization of Continuous Mappings by Neural Networks", Neural Networks, 1989, Vol. 2, pp. 183-192 Go to original source...
  7. GOLDBERGER, J., HINTON, G., ROWEIS, S., SALAKHUTDINOV, R. (2005). "Neighbourhood Components Analysis", Advances in Neural Information Processing Systems, 2005, Vol. 17, pp. 513-520.
  8. HORNIK, Kurt (1989). "Multilayer Feedforward Networks are Universal Approximators", Neural Networks, 1989, Vol. 2, pp. 359-366 Go to original source...
  9. CHRISTOFFERSEN, P. F., DIEBOLD, F. X., (2010). "Financial Asset Returns, Direction-of-Change Forecasting, and Volatility Dynamics", Wharton Financial Institutions Center, Working Paper, 04-2010, pp. 1-41.
  10. KROLLNER, B., VANSTONE, B., FINNIE, G., (2010). "Financial time series forecasting with machine learning techniques: A survey", European Symposium on Artificial Neural Networks: Computational and Machine Learning, Bruges, Belgium, April 2010.
  11. LAWRENCE, Ramon (1997). "Using Neural Networks to Forecast Stock Market Prices", University of Manitoba, Department of Computer Science, December 1997, pp. 1-21
  12. LO, Andrew (2004). "The Adaptive Market Hypothesis: Market Efficiency from an Evolutionary Perspective", Journal of Portfolio Management, 5-30, pp. 15-29. Go to original source...
  13. MARTENS, H.A., DARDENNE, P. (1998). "Validation and verification of regression in small data sets", Chemometrics and Intelligent Laboratory Systems, 1998, Vol. 44, pp. 99-121 Go to original source...
  14. MCNAMES, James, (2000). "Local Modeling Optimization for Time Series Prediction", ESANN 2000, 8th European Symposium on Artificial Neural Networks Proceedings, Bruges, Belgium, April 2000.
  15. WEINBERGER, K. Q., BLITZER, J. C., SAUL, L. K., (2006). "Distance Metric Learning for Large Margin Nearest Neighbor Classification", Advances in Neural Information Processing Systems, 18, 1473-1480
  16. BAILEY, D.H., BORWEIN, J.M., DE PRADO, M.L., ZHUX, Q.J., (2015). "The Probability of Backtest Overfitting", 2015 Go to original source...
  17. TEKEUCHI, Lawrence, LEE, Yu-Ying, (2013). "Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks", 2013