**22.**

**Table**

 *Summary of portfolio performance on the test data.*

## *Portfolio Optimization: A Comparative Study DOI: http://dx.doi.org/10.5772/intechopen.112407*

#### **6. Conclusion**

This chapter has presented three portfolio design approaches on ten thematic sectors listed on the NSE of India. The three approaches to portfolio design are the mean-variance portfolio (MVP), hierarchical risk parity (HRP)-based portfolio, and autoencoder-based portfolio. The portfolios are designed based on the historical prices of the ten stocks from the ten sectors which have the maximum free-float market capitalization. The stock prices from January 1, 2018, to December 31, 2021, are used for designing the portfolios. The portfolios are tested on the out-of-sample data of stock prices from January 1, 2022, to December 31, 2022. Three metrics are used in the performance evaluation, annual return, annual risk (i.e., annual volatility), and Sharpe ratios. It is observed that the MVP portfolios have yielded the highest riskadjusted returns and Sharpe ratios for the majority of the sectors on the out-of-sample data. However, autoencoder-based portfolios are found to have yielded the maximum annual returns for most of the sectors studied in this work. The results indicate that while the autoencoder models are accurate in estimating the future returns of portfolios, these models are inefficient in estimating the future volatilities of the stock prices. In future work, the performance of these portfolios will be studied on stocks listed on the major global stock exchanges.

## **Author details**

Jaydip Sen\* and Subhasis Dasgupta Department of Data Science, Praxis Business School, Kolkata, India

\*Address all correspondence to: jaydip.sen@acm.org

© 2023 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

*Portfolio Optimization: A Comparative Study DOI: http://dx.doi.org/10.5772/intechopen.112407*

#### **References**

[1] Markowitz H. Portfolio selection. Journal of Finance. 1952;**7**(1):77-91. DOI: 10.2307/2975974

[2] De Prado ML. Building diversified portfolios that outperform out of sample. Journal of Portfolio Management. 2016; **42**(4):59-69. DOI: 10.3905/ jpm.2016.42.4.059

[3] NSE Sectoral Index: https://www.nse india.com/products-services/indices-sec toral (Accessed on July 25, 2023)

[4] Sen J, Datta Chaudhuri T. An alternative framework for time series decomposition and forecasting and its relevance for portfolio choice – A comparative study of the Indian consumer durable and small cap sectors. Journal of Economics Library. 2016;**3**(2):303-326. DOI: 10.1453/jel.v3i2.787

[5] Sen J, Datta Chaudhuri T. An investigation of the structural characteristics of the Indian IT sector and the capital goods sector: An application of the R programming language in time series decomposition and forecasting. Journal of Insurance and Financial Management. 2016;**1**(4): 68-132. DOI: 10.36227/techrxiv. 16640227.v1

[6] Sen J, Datta Chaudhuri T. Understanding the sectors of the Indian economy for portfolio choice. International Journal of Business Forecasting and Marketing Intelligence (IJBFMI). 2018;**4**(2):178-222. DOI: 10.1504/IJBFMI.2018.090914

[7] Sen J. A forecasting framework for the Indian healthcare sector index. International Journal of Business Forecasting and Marketing Intelligence (IJBFMI). 2021;**7**(4):311-350. DOI: 10.1504/IJBFMI.2022.10047095

[8] Yang X, Mao S, Gao H, Duan Y, Zou Q. Novel financial capital flow forecast framework using time series theory and deep learning: A case study analysis of Yu'e Bao transaction data. IEEE Access. 2019;**7**:70662-70672. DOI: 10.1109/ ACCESS.2019.2919189

[9] Sen J. Stock composition of mutual funds and fund style: A time series decomposition approach towards testing for consistency. International Journal of Business Forecasting and Marketing Intelligence. 2018;**4**(*3*):235-292. DOI: 10.1504/IJBFMI.2018.092781

[10] Bisht K, Kumar A. A portfolio construction model based on sector analysis using Dempster-Shafer evidence theory and Granger causal network: An application to national stock exchange of India. Expert Systems with Applications. Elsevier. 2023;**215**. DOI: 10.1016/j. eswa.2022.119434

[11] Mehtab S, Sen J, Dutta A. Stock price prediction using machine learning and LSTM-based deep learning model. In: Thampi SM, Piramuthu S, Li KC, Berretti S, Wozniak M, Singh D, editors. Machine Learning and Metaheuristics Algorithms, and Applications. SoMMA 2020. Communications in Computer and Information Science. Vol. 1366. Singapore: Springer; 2021. pp. 88-106. DOI: 10.1007/978-981-16-0419-5\_8

[12] Mehtab S, Sen J. Stock price prediction using convolutional neural networks on a multivariate time series. In: Proceedings of the 2nd National Conference on Machine Learning and Artificial Intelligence (NCMLAI'20). New Delhi, India; 2020. DOI: 10.36227/ techrxiv.15088734.v1

[13] Sen J. Stock price prediction using machine learning and deep learning

frameworks. In: Proceedings of the 6th International Conference on Business Analytics and Intelligence (ICBAI'18), December 20–22. Bangalore, India; 2018

[14] Mehtab S, Sen J. Analysis and forecasting of financial time series using CNN and LSTM-based deep learning models. In: Sahoo JP, Tripathy AK, Mohanty M, Li KC, Nayak AK, editors. Advances in Distributed Computing and Machine Learning. Lecture Notes in Networks and Systems. Vol. 302. Singapore: Springer; 2022. pp. 405-423. DOI: 10.1007/978-981-16-4807-6\_39

[15] Sen J, Mondal S, Nath G. Robust portfolio design and stock price prediction using an optimized LSTM model. In: Proceedings of the IEEE 18th India Council International Conference (INDICON'21), December 19–21. Guwahati, India; 2021. pp. 1-6. DOI: 10.1109/INDICON52576.2021. 9691583

[16] Sen J, Mehtab S. Accurate stock price forecasting using robust and optimized deep learning models. In: Proceedings of the IEEE International Conference on Intelligent Technologies (CONIT'21), June 25–27. Hubballi, India; 2021. pp. 1-9. DOI: 10.1109/CONIT51480. 2021.9498565

[17] Sen J, Dutta A, Mehtab S. Profitability analysis in stock investment using an LSTM-based deep learning model. In: Proceedings of the IEEE 2nd International Conference for Emerging Technology (INCET'21), May 21–23. Belagavi, India; 2021. pp. 1-9. DOI: 10.1109/INCET51464.2021. 9456385

[18] Mehtab S, Sen J. Stock price prediction using CNN and LSTM-based deep learning models. In: Proceedings of the IEEE International Conference on Decision Aid Science and Applications

(DASA'20), November 8–9. Sakheer, Bahrain; 2020. pp. 447-453. DOI: 10.1109/DASA51403.2020.9317207

[19] Mehtab S, Sen J, Dasgupta S. Robust analysis of stock price time series using CNN and LSTM-based deep learning. In: Proceedings of the IEEE 4th International Conference on Electronics Communications and Aerospace Technology (ICECA), November 5–7. Coimbatore, India; 2020. pp. 1481-1486. DOI: 10.1109/ICECA49313.2020.9297652

[20] Mehtab S, Sen J. A time series analysis-based stock price prediction using machine learning and deep learning models. International Journal of Business Forecasting and Marketing Intelligence (IJBFMI). 2020;**6**(4): 272-335. DOI: 10.1504/ IJBFMI.2020.115691

[21] Sen J, Mehtab S. Long-and-shortterm memory (LSTM) networksarchitectures and applications in stock price prediction. In: Singh U, Murugesan S, Seth A, editors. Emerging Computing Paradigms: Principles, Advances, and Applications. USA: Wiley; 2022. pp. 143-160. DOI: 10.1002/ 9781119813439.ch8

[22] Chandola D, Mehta A, Singh S, Tikkiwal VA, Agrawal H. Forecasting directional movement of stock prices using deep learning. Annals of Data Science. Springer Nature. 2022;**2022**. DOI: 10.1007/s40745-022-00432-6

[23] Qiu J, Wang B. Forecasting stock prices with long-short term memory neural network based on attention mechanism. PLoS One. 2020;**15**(1): e0227222. DOI: 10.1371/journal. pone.0227222

[24] Mehtab S, Sen J. A robust predictive model for stock price prediction using deep learning and natural language

*Portfolio Optimization: A Comparative Study DOI: http://dx.doi.org/10.5772/intechopen.112407*

processing. In: Proceedings of the 7th International Conference on Business Analytics and Intelligence (BAICONF'19), December 5–7. Bangalore, India; 2019. DOI: 10.36227/ techrxiv.15023361.v1

[25] Sharaf M, Hemdan EE-D, El-Sayed A, El-Bahnasawy A. An efficient hybrid stock trend prediction system during COVID-19 pandemic based on stacked-LSTM and news sentiment analysis. Multimedia Tools and Applications. July 2023;**82**:(16):23945-23977

[26] Nousi C, Tjortjis C. A methodology for stock movement prediction using sentiment analysis on Twitter and stock twits data. In: Proceedings of the 6th South-East Europe Design, Automation, Computer Engineering, Computer Networks and Social Media Conference (SEEDA-CECNSM'21), September 24– 26. Preveza, Greece; 2021. pp. 1-7. DOI: 10.1109/SEEDA-CECNSM53056. 2021.9566242

[27] Bollen J, Mao H, Zeng X. Twitter mood predicts the stock market. Journal of Computational Science. 2011;**2**(1):1-8. DOI: 10.1016/j.jocs.2010.12.007

[28] Audrino F, Sigrist F, Ballinari D. The impact of sentiment and attention measures on stock market volatility. International Journal of Forecasting. 2020;**36**(2):334-357. DOI: 10.1016/j. ijforecast.2019.05.010

[29] Carta SM, Consoli S, Piras L, Podda AS, Recupero DR. Explainable machine learning exploiting news and domain-specific lexicon for stock market forecasting. IEEE Access. 2021;**9**: 30193-30205. DOI: 10.1109/ACCESS. 2021.3059960

[30] Corazza M, Di Tollo G, Fasano G, Pesenti R. A novel hybrid PSO-based metaheuristic for costly portfolio

selection problem. Annals of Operations Research. 2021;**304**:109-137. DOI: 10.1007/s10479-021-04075-3

[31] Zhao P, Gao S, Yang N. Solving multi-objective portfolio optimization problem based on MOEA/D. In: Proceedings of the 12th International Conference on Advanced Computational Intelligence (ICACI'20), August 14–16. Dali, China; 2020. pp. 30-37. DOI: 10.1109/ICACI49185.2020. 9177505

[32] Chen C, Zhou Y. Robust multiobjective portfolio with higher moments. Expert System with Application. 2018; **100**:165-181. DOI: 10.1016/j.eswa. 2018.02.004

[33] Wang Z, Zhang X, Zhang Z, Sheng D. Credit portfolio optimization: A multi-objective genetic algorithm approach. Borsa Istanbul Review. 2022; **22**(1):69-76. DOI: 10.1016/j. bir.2021.01.004

[34] Erwin K, Engelbrecht A. Improved set-based particle swarm optimization for portfolio optimization. In: Proceedings of 2020 IEEE Symposium Series on Computational Intelligence (SSCI'20). Canberra, Australia; 2020. pp. 1573-1580. DOI: 10.1109/ SSCI47803.2020.9308579

[35] Garcia F, Gujjaro F, Oliver J. Index tracking optimization with cardinality constraint: A performance comparison of genetic algorithms and tabu search heuristic. Neural Computing & Applications. 2018;**30**(8):2625-2641. DOI: 10.1007/s00521-017-2882-2

[36] Sen J, Mehtab S. A comparative study of optimum risk portfolio and Eigen portfolio on the Indian stock market. International Journal of Business Forecasting and Marketing Intelligence.

2021;**7**(2):143-193. DOI: 10.1504/ IJBFMI.2021.10043037

[37] Sen J, Dutta A, Mehtab S. Stock portfolio optimization using a deep learning LSTM model. In: Proceedings of 2021 IEEE Mysore Sub Section International Conference (MysuruCon'21), October 24–25. Hassan, India; 2021. pp. 263-271. DOI: 10.1109/ MysuruCon52639.2021.9641662

[38] Sen J, Mondal S, Mehtab S. Portfolio optimization on NIFTY thematic sector stocks using an LSTM model. In: Proceedings of the IEEE International Conference on Data Analytics for Business and Industry (ICDABI'21), October 25–26. Sakheer, Bahrain; 2021. pp. 364-369. DOI: 10.1109/ ICDABI53623.2021.9655886

[39] Sen J, Dutta A. Design and analysis of optimized portfolios for selected sectors of the Indian stock market. In: Proceedings of the 2022 International Conference on Decision Aid Sciences and Applications (DASA'22), March 23– 25. Chiangrai, Thailand; 2022. pp. 567-573. DOI: 10.1109/ DASA54658.2022.9765289

[40] Sen J, Dutta A. A comparative study of hierarchical risk parity portfolio and eigen portfolio on the NIFTY 50 stocks. In: Buyya R, Hernandez SM, Kovvur RMR, Sarma TH, editors. Computational Intelligence and Data Analytics. Lecture Notes on Data Engineering and Communications Technologies. Vol. 142. Singapore: Springer; 2022. pp. 443-460. DOI: 10.1007/978-981-19-3391-2\_34

[41] Sen J, Mehtab S, Dutta A, Mondal S. Precise stock price prediction for optimized portfolio design using an LSTM model. In: Proceedings of the IEEE 19th OITS International

Conference on Information Technology (OCIT'21), December 16–18. Bhubaneswar, India; 2021. pp. 210-215. DOI: 10.1109/OCIT53463.2021.00050

[42] Sen J, Mehtab S, Dutta A, Mondal S. Hierarchical risk parity and minimum variance portfolio design on NIFTY 50 stocks. In: Proceedings of the IEEE International Conference on Decision Aid Science and Applications (DASA'21), December 7–8. Sakheer, Bahrain; 2021. pp. 668-675. DOI: 10.1109/DASA53625.2021.9681925

[43] Sen J. Designing efficient pairtrading strategies using cointegration for the Indian stock market. In: Proceedings of the IEEE 2nd Asian Conference on Innovation in Technology (ASIANCON'22), August 26–28. Pune, India; 2022. pp. 1-9. DOI: 10.1109/ ASIANCON55314.2022.9909455

[44] Sen J, Mehtab S, Dutta A. Volatility modeling of stocks from selected sectors of the Indian economy using GARCH. In: Proceedings of the IEEE Asian Conference on Innovation in Technology (ASIANCON'21), August 28–29. Pune, India; 2021. pp. 1-9. DOI: 10.1109/ ASIANCON51346.2021.9544977

[45] Chatterjee A, Bhowmick H, Sen J. Stock volatility prediction using time series and deep learning approach. In: Proceedings of the 2022 IEEE 2nd Mysore Sub Section International Conference (MysuruCon'22), October 16–17. Mysuru, India; 2022. pp. 1-6. DOI: 10.1109/MysuruCon55714.2022. 9972559

[46] Sinha M. Portfolio optimization using reinforcement learning: A study of implementation of learning to optimize. In: Choudrie J, Mahalle P, Perumal T, Joshi A, editors. ICT with Intelligent Applications. Smart Innovation, Systems and Technologies. Vol. 311. Singapore:

*Portfolio Optimization: A Comparative Study DOI: http://dx.doi.org/10.5772/intechopen.112407*

Springer; 2023. pp. 719-728. DOI: 10.1007/978-981-19-3571-8\_65

[47] Sen J. Portfolio optimization using reinforcement learning and hierarchical risk parity approach. In: Rivera G, Cruz-Reyes D, Dorronsoro LB, Rosete-Suarez A, editors. Data Analytics and Computational Intelligence: Novel Models, Algorithms and Applications. Switzerland: Springer Nature; 2023

[48] Lim QYE, Cao Q, Quek C. Dynamic portfolio rebalancing through reinforcement learning. Neural Computing and Applications. 2022;**34**: 7125-7139. DOI: 10.1007/s00521-021- 06853-3

[49] Hu Y-J, Lin S-J. Deep reinforcement learning for optimizing finance portfolio management. In: Proceedings of 2019 Amity International Conference on Artificial Intelligence (AICAI'19), February 4–6. Dubai, UAE; 2019. pp. 14-20. DOI: 10.1109/ AICAI.2019.8701368

[50] Zha L, Dai L, Xu T, Wu D. A hierarchical reinforcement learning framework for stock selection and portfolio. In: Proceedings of the 2022 International Joint Conference on Neural Networks (IJCNN'22), July 18-23. Padua, Italy; 2022. pp. 1-7. DOI: 10.1109/ IJCNN55064.2022.9892378

[51] Wei L, Weiwei Z. Research on portfolio optimization models using deep deterministic policy gradient. In: Proceedings of 2020 International Conference on Robots & Intelligent System (ICRIS'20), November 7–8. Sanya, China; 2022. pp. 698-701. DOI: 10.1109/ICRIS52159.2020.00174

[52] Huang S-H, Miao Y-H, Hsiao Y-T. Novel deep reinforcement algorithm with adaptive sampling strategy for continuous portfolio optimization. IEEE Access. 2021;**9**:77371-77385. DOI: 10.1109/ACCESS.2021.3082186

[53] Wang H, Yu S. Robo-Advising: Enhancing investment with inverse optimization and deep reinforcement learning. In: Proceedings of the 20th IEEE International Conference on Machine Learning and Applications (ICMLA'21), December 13-16. Pasadena, CA, USA; 2021. pp. 365-372. DOI: 10.1109/ICMLA52953.2021.00063

[54] Maree C, Omlin CW. Balancing profit, risk, and sustainability for portfolio management. In: Proceedings of the 2022 IEEE Symposium on Computational Intelligence for Financial Engineering and Economics (CIFEr'22), May 4–5. Helsinki, Finland; 2022. pp. 1-8. DOI: 10.1109/ CIFEr52523.2022.9776048

[55] Gasperov B, Saric F, Begusic S, Kostanjcar Z. Adaptive rolling window selection for minimum variance portfolio estimation based on reinforcement learning. In: Proceedings of the 43rd International Convention on Information, Communication and Electronic Technology (MIPRO'20), September 28–October 2. Opatija, Croatia; 2020. pp. 1098-1102. DOI: 10.23919/MIPRO48935.2020. 9245435

[56] Ha MH, Chi S-G, Lee S, Cha Y, Ro MB. Evolutionary meta reinforcement learning for portfolio optimization. In: Proceedings of 2021 Genetic and Evolutionary Computation Conference (GECCO'21), July 10–14. Opatija, Croatia; 2021. pp. 964-972. DOI: 10.1145/3449639.3459386

[57] Gu F, Jiang Z, Su J. Application of features and neural network to enhance the performance of deep reinforcement learning in portfolio management. In: Proceedings of the 2021 IEEE 6th

International Conference on Big Data Analytics (ICBDA'21), March 5–8. Xiamen, China; 2021. pp. 92-97. DOI: 10.1109/ICBDA51983.2021. 9403044

[58] Soleymani F, Paquet E. Financial portfolio optimization with online deep reinforcement learning and restricted stacked autoencoder – DeepBreath. Expert Systems with Applications. 2020; **156**:113456. DOI: 10.1016/j.eswa.2020. 113456

[59] Baily D, de Prado ML. Balanced baskets: A new approach to trading and hedging risks. Journal of Investment Strategies. 2012;**1**(4):21-62. DOI: 10.21314/JOIS.2012.010

[60] Zhang C, Liang S, Lyu F, Fang L. Stock-index tracking optimization using auto-encoders. Frontiers in Physics. Open-access. 2020;**8**. DOI: 10.3389/ fphy.2020.00388

#### **Chapter 6**
