Abstract
In this paper we optimize mean reverting portfolios subject to cardinality constraints. First, the parameters of the corresponding Ornstein–Uhlenbeck (OU) process are estimated by auto-regressive Hidden Markov Models (AR-HMM), in order to capture the underlying characteristics of the financial time series. Portfolio optimization is then performed by maximizing the return achieved with a predefined probability instead of optimizing the predictability parameter, which provides more profitable portfolios. The selection of the optimal portfolio according to the goal function is carried out by stochastic search algorithms. The presented solutions satisfy the cardinality constraint in terms of providing a sparse portfolios which minimize the transaction costs (and, as a result, maximize the interpretability of the results). In order to use the method for high frequency trading (HFT) we utilize a massively parallel GPGPU architecture. Both the portfolio optimization and the model identification algorithms are successfully tailored to be running on GPGPU to meet the challenges of efficient software implementation and fast execution time. The performance of the new method has been extensively tested both on historical daily and intraday FOREX data and on artificially generated data series. The results demonstrate that a good average return can be achieved by the proposed trading algorithm in realistic scenarios. The speed profiling has proven that GPGPU is capable of HFT, achieving high-throughput real-time performance.
Similar content being viewed by others
References
Baum, L. E., & Petrie, T. (1966). Statistical inference for probabilistic functions of finite state Markov chains. The Annals of Mathematical Statistics, 37(6), 1554–1563.
Baum, L. E., et al. (1970). A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains. The Annals of Mathematical Statistics, 41(1), 164–171.
Becker, S., Cevher, V., Koch, C., & Kyrillidis, A. (2013). Sparse projections onto the simplex. ICML (to appear).
Berchtold, A. (1999). The double chain Markov model. Communications in Statistics-Theory and Methods, 28(11), 2569–2589.
Chang, T. J., Meade, N., Beasley, J. E., & Sharaiha, Y. M. (2000). Heuristics for cardinality constrained portfolio optimisation. Computers & Operations Research, 27(13), 1271–1302.
Cook, S. (2013). CUDA programming: A developer’s guide to parallel computing with GPUs. Amsterdam: Elsevier.
D’Aspremont, A. (2011). Identifying small mean-reverting portfolios. Quantitative Finance, 11(3), 351–364.
Dey, S., Krishnamurthy, V., & Salmon-Legagneur, T. (1994). Estimation of Markov-modulated time-series via EM algorithm. Signal Processing Letters, IEEE, 1(10), 153–155.
Durbin, R. (Ed.). (1998). Biological sequence analysis: Probabilistic models of proteins and nucleic acids. Cambridge: Cambridge University Press.
Fama, E., & French, K. (1988). Permanent and temporary components of stock prices. The Journal of Political Economy, 96(2), 246–273.
Fieldsend, J. E., Matatko, J., & Peng, M. (2004) Cardinality constrained portfolio optimisation. In Intelligent data engineering and automated learning–IDEAL 2004 (pp. 788–793). Berlin: Springer.
Fogarasi, N., & Levendovszky, J. (2013). A simplified approach to parameter estimation and selection of sparse, mean reverting portfolios. Periodica Polytechnica Electrical Engineering and Computer Science, 56(1), 21–28.
Fogarasi, N., & Levendovszky, J. (2013). Sparse, mean reverting portfolio selection using simulated annealing. Algorithmic Finance, 2(3), 197–211.
Fraser, A. M. (2008). Hidden Markov models and dynamical systems. Philadelphia: SIAM.
Hamilton, J. D. (1990). Analysis of time series subject to changes in regime. Journal of Econometrics, 45(1), 39–70.
Hamilton, J. D., & Susmel, R. (1994). Autoregressive conditional heteroskedasticity and changes in regime. Journal of Econometrics, 64(1), 307–333.
Hassan, M. R., & Nath, B. (2005). Stock market forecasting using hidden Markov model: A new approach. In: Intelligent systems design and applications, 2005. ISDA’05. Proceedings. 5th international conference on IEEE (pp. 192–196).
Idvall, P., & Jonsson, C. (2008). Algorithmic trading: Hidden markov models on foreign exchange data. Master’s thesis, Linköping University, Department of Mathematics.
Ito, K. (1944). Stochastic integral. Proceedings of the Imperial Academy Tokyo, 20, 519–524.
Janaki, R. D., Sreenivas, T. H., & Ganapathy, K. S. (1996). Parallel simulated annealing algorithms. Journal of Parallel and Distributed Computing, 37, 207–212.
Jurafsky, D., & Martin, J. H. (2006). Speech and language processing: An introduction to natural language processing. Computational linguistics, and speech recognition (2nd ed.). London: Pearson Prentice Hall.
Kirkpatrick, S., Gelatt, C. D., & Vecchi, M. P. (1983). Optimization by simulated annealing. Science, 220, 671–680.
Lindholm, E., Nickolls, J., Oberman, S., & Montrym, J. (2008). NVIDIA Tesla: A unified graphics and computing architecture. Micro IEEE, 28(2), 39,55.
Manzan, S. (2007). Nonlinear mean reversion in stock prices. Quantitative and Qualitative Analysis in Social Sciences, 1(3), 1–20.
Mamon, R. S., & Elliott, R. J. (2007). Hidden markov models in finance. New York: Springer.
Markowitz, H. (1952). Portfolio selection. The Journal of Finance, 7(1), 77–91.
Metatrader (2014) FOREX time series [WWW]. Accessed 02 2014, Available from, http://www.metaquotes.net/en/metatrader5.
Murphy, K. P. (2012). Machine learning: A probabilistic perspective. Cambridge: MIT Press.
Natarajan, B. K. (1995). Sparse approximate solutions to linear systems. SIAM Journal on Computing, 24(2), 227–234.
NVIDIA. (2014). CUDA C programming guide [WWW]. Accessed 08 2014, Available from, http://docs.nvidia.com/cuda/cuda-c-programming-guide.
Ornstein, L. S., & Uhlenbeck, G. E. (1930). On the theory of the Brownian motion. Physical Review, 36(5), 823.
Pagès, G., & Wilbertz, B. (2011). GPGPUs in the computational finance: Massive parallel American style options. Concurrency and Computation: Practice and Experience, 24, 837–848.
Poterba, J. M., & Summers, L. H. (1988). Mean reversion in stock prices: Evidence and implications. Journal of Financial Economics, 22(1), 27–59.
Rabiner, L., & Juang, B.-H. (1986). An introduction to hidden Markov models. ASSP Magazine, IEEE, 3(1), 4–16.
Rabiner, L. (1989). A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2), 257–286.
Shaw, D. X., Liu, S., & Kopman, L. (2008). Lagrangian relaxation procedure for cardinality-constrained portfolio optimization. Optimisation Methods & Software, 23(3), 411–420.
Sipos, I. R., & Levendovszky, J. (2013). Optimizing sparse mean reverting portfolios. Algorithmic Finance, 2(2), 127–139.
Sipos, I. Róbert, & Levendovszky, János. (2015). Optimizing sparse mean reverting portfolios with AR-HMMs in the presence of secondary effects. Periodica Polytechnica Electrical Engineering and Computer Science, 59(1), 1–8.
Sipos, I. R., & Levendovszky, J. (2013). High frequency trading with Hidden Markov Models by using clustering and PPCA algorithms. In: Proceedings, 15th applied stochastic models and data analysis (ASMDA2013), Barcelona.
Tenyakov, A., & Mamon, R. (2013). Modelling high-frequency FX rate dynamics: A zero-delay multi-dimensional HMM-based approach. Department of Statistical and Actuarial Sciences, University of Western Ontario.
Acknowledgments
This work was partially supported by the European Union and the European Social Fund through project FuturICT.hu (Grant No.: TAMOP-4.2.2.C-11/1/KONV-2012-0013). Also, we gratefully acknowledge the support of NVIDIA Corporation.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Sipos, I.R., Ceffer, A. & Levendovszky, J. Parallel Optimization of Sparse Portfolios with AR-HMMs. Comput Econ 49, 563–578 (2017). https://doi.org/10.1007/s10614-016-9579-y
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10614-016-9579-y