Skip to main content
Log in

Parallel Optimization of Sparse Portfolios with AR-HMMs

  • Published:
Computational Economics Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • Cook, S. (2013). CUDA programming: A developer’s guide to parallel computing with GPUs. Amsterdam: Elsevier.

    Google Scholar 

  • 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.

    Article  Google Scholar 

  • Durbin, R. (Ed.). (1998). Biological sequence analysis: Probabilistic models of proteins and nucleic acids. Cambridge: Cambridge University Press.

    Google Scholar 

  • Fama, E., & French, K. (1988). Permanent and temporary components of stock prices. The Journal of Political Economy, 96(2), 246–273.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • Fogarasi, N., & Levendovszky, J. (2013). Sparse, mean reverting portfolio selection using simulated annealing. Algorithmic Finance, 2(3), 197–211.

    Google Scholar 

  • Fraser, A. M. (2008). Hidden Markov models and dynamical systems. Philadelphia: SIAM.

    Book  Google Scholar 

  • Hamilton, J. D. (1990). Analysis of time series subject to changes in regime. Journal of Econometrics, 45(1), 39–70.

    Article  Google Scholar 

  • Hamilton, J. D., & Susmel, R. (1994). Autoregressive conditional heteroskedasticity and changes in regime. Journal of Econometrics, 64(1), 307–333.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • Janaki, R. D., Sreenivas, T. H., & Ganapathy, K. S. (1996). Parallel simulated annealing algorithms. Journal of Parallel and Distributed Computing, 37, 207–212.

    Article  Google Scholar 

  • 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.

    Google Scholar 

  • Kirkpatrick, S., Gelatt, C. D., & Vecchi, M. P. (1983). Optimization by simulated annealing. Science, 220, 671–680.

    Article  Google Scholar 

  • Lindholm, E., Nickolls, J., Oberman, S., & Montrym, J. (2008). NVIDIA Tesla: A unified graphics and computing architecture. Micro IEEE, 28(2), 39,55.

    Article  Google Scholar 

  • Manzan, S. (2007). Nonlinear mean reversion in stock prices. Quantitative and Qualitative Analysis in Social Sciences, 1(3), 1–20.

    Google Scholar 

  • Mamon, R. S., & Elliott, R. J. (2007). Hidden markov models in finance. New York: Springer.

    Book  Google Scholar 

  • Markowitz, H. (1952). Portfolio selection. The Journal of Finance, 7(1), 77–91.

    Google Scholar 

  • 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.

    Google Scholar 

  • Natarajan, B. K. (1995). Sparse approximate solutions to linear systems. SIAM Journal on Computing, 24(2), 227–234.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • 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.

    Article  Google Scholar 

  • Poterba, J. M., & Summers, L. H. (1988). Mean reversion in stock prices: Evidence and implications. Journal of Financial Economics, 22(1), 27–59.

    Article  Google Scholar 

  • Rabiner, L., & Juang, B.-H. (1986). An introduction to hidden Markov models. ASSP Magazine, IEEE, 3(1), 4–16.

    Article  Google Scholar 

  • Rabiner, L. (1989). A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2), 257–286.

    Article  Google Scholar 

  • Shaw, D. X., Liu, S., & Kopman, L. (2008). Lagrangian relaxation procedure for cardinality-constrained portfolio optimization. Optimisation Methods & Software, 23(3), 411–420.

    Article  Google Scholar 

  • Sipos, I. R., & Levendovszky, J. (2013). Optimizing sparse mean reverting portfolios. Algorithmic Finance, 2(2), 127–139.

    Google Scholar 

  • 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.

    Article  Google Scholar 

  • 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.

Download references

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

Authors

Corresponding author

Correspondence to I. Róbert Sipos.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10614-016-9579-y

Keywords

Navigation