Document Type : Research Article


1 Department of Industrial Engineering, K.N. Toosi University of Technology, Tehran, Iran

2 Department of Industrial Engineering, K.N. Toosi University of Technology, Tehran, Iran.


An online portfolio selection algorithm has been presented in this research. Online portfolio selection algorithms are concerned with capital allocation to several stocks to maximize the portfolio return over the long run by deciding the optimal portfolio in each period. Despite other online portfolio selection algorithms that follow Kelly's theory of capital growth and only focus on increasing return in the long term, this algorithm uses the beta risk parameter to exploit upside risk while hedging downside risk. This algorithm follows the pattern-matching approach, uses fuzzy clustering in the sample selection step, and the log-optimal objective function along with the transaction cost and considering the beta risk measure in the portfolio optimization step. The implementation of the proposed algorithm in this research on a 10-stock dataset from the NYSE market in the period of December 2021 to December 2022 shows the superiority of this algorithm in terms of return and risk and the overall Sharpe ratio compared to the algorithms proposed previously in the literature on online portfolio selection.


[1] Abdi, M., & Najafi, A. A., 2018, Online Portfolio Selection Using Spectral Pattern Matching,
Financial Engineering and Portfolio Management, 9(34), 175-192.
[2] Abdi, M., Ebrahimi, S. B., & Najafi, A. A., 2023, A Fuzzy Online Portfolio Selection Algorithm Based-On Pattern Matching Approach, 1st International Conference on Empowerment
of Management, Industrial Engineering, Accounting and Economics, Babol, Iran.
[3] Gy¨orfi, L., Sch¨afer, D., 2003, Nonparametric Prediction, Advances in Learning Theory: Methods, Models and Applications, Suykens, J.A.K., Horv´ath, G., Basu, S., Micchelli, C., Vandevalle, J., IOS Press, 339354.
[4] Gy¨orfi, L., Lugosi, G., & Udina, F., 2006, Nonparametric kernelbased sequential investment
strategies, Mathematical Finance: An International Journal of Mathematics, Statistics and
Financial Economics, 16(2), 337-357.
[5] Gy¨orfi, L., Urb´an, A., & Vajda, I., 2007, Kernel-based semi-log-optimal empirical portfolio
selection strategies, International Journal of Theoretical and Applied Finance, 10(03), 505-
[6] Gy¨orfi, L., & Vajda, I., 2008, Growth optimal investment with transaction costs, In International conference on algorithmic learning theory, Berlin, Heidelberg, Springer, 108-122. 13
[7] Gy¨orfi, L., Udina, F., & Walk, H., 2008, Nonparametric nearest neighbor based empirical
portfolio selection strategies, Statistics & Decisions International mathematical journal for
stochastic methods and models, 26(2), 145-157.
[8] Kelly, J. L., 1956, A new interpretation of information rate, the bell system technical journal,
35(4), 917-926.
[9] Khedmati, M., & Azin, P., 2020, An online portfolio selection algorithm using clustering
approaches and considering transaction costs, Expert Systems with Applications, 159, 113546.
[10] Li, B., Hoi, S. C., & Gopalkrishnan, V., 2011, Corn: Correlation-driven nonparametric
learning approach for portfolio selection, ACM Transactions on Intelligent Systems and
Technology (TIST), 2(3), 1-29.
[11] Li, B., & Hoi, S. C., 2014, Online portfolio selection: A survey, ACM Computing Surveys
(CSUR), 46(3), 1-36.
[12] Loonat, F., & Gebbie, T., 2018, Learning zero-cost portfolio selection with pattern matching,
Plos one, 13(9), e0202788.
[13] Markowitz, H., 1952, Portfolio Selection, The Journal of Finance, 7(1), 77-91.
[14] Ottucs´ak, G., & Vajda, I., 2007, An asymptotic analysis of the mean-variance portfolio
selection, Statistics & Decisions, 25(1/2007), 1-24.
[15] Sooklal, S., van Zyl, T. L., & Paskaramoorthy, A., 2020, Dricorn-k: A dynamic risk
correlation-driven non-parametric algorithm for online portfolio selection, Southern African
Conference for Artificial Intelligence Research, Cham: Springer International Publishing,
[16] Wang, Y., Wang, D., & Zheng, T. F., 2018, Racorn-k: risk-aversion pattern matchingbased portfolio selection, 2018 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), Honolulu, HI, USA, IEEE, 1816-1820.