Portfolio Optimization Based on MPT-LSTM Neural Networks: A case study of Cryptocurrency Markets
DOI:
https://doi.org/10.37075/FABA.2025.1.07Keywords:
Markowitz Model, Cryptocurrencies, LSTM Neural Networks, Deep Learning, Portfolio OptimizationAbstract
Purpose: This study aims to examines advanced portfolio management techniques using Long Short-Term Memory (LSTM) networks, the study was applied to investing in cryptocurrencies whose markets are characterized by high-frequency trading, and using behavioral finance models based on the concept of return-risk and deep learning based on the work of artificial neural networks (ANN) and long-term memory (LSTM) algorithms
Design/Methodology/Approach: This study adopts quantitative approach. Moreover, A random portfolio consisting of 25 cryptocurrencies was selected based on the database of the website: https://finance.yahoo.com/crypto/ during the period 2021-2024 AD and programming the Python language. And an attempt to evaluate the performance of the models used in accurately predicting the optimal relative weights of the investment portfolio, which proved the relative effectiveness of deep learning models by estimating the values of the mean square error (MSE) at a level of 0.0218% to predict the optimal portfolio weights for 5 days based on training 80% and testing 20% of the study data.
Findings: The second hypothesis of this study was accepted, which states the effectiveness of deep learning algorithms to predict the weights of optimal portfolios with a return estimated at 1.7239% and a risk of 1.1219% and a Sharpe index value estimated at 1.5365%, while the Markowitz return-risk model portfolio came with a return rate estimated at 31.15% and a risk of 39.05%. With no diversification of investment on all portfolio assets and a Sharpe index value of 0.7978%.
Practical Implications: This study provides important insights that machine learning offers significant advantages in portfolio optimization, from improved forecasting of asset returns to dynamic rebalancing, better risk management, and automation. The ability to handle high-dimensional, non-linear, and non-stationary data makes ML an ideal tool for optimizing portfolios in complex and fast-moving markets; especially in cryptocurrency markets. However, challenges like data quality, overfitting, and interpretability must be addressed to ensure effective deployment of ML in real-world portfolio.
Originality/Value: This study provides an original and timely contribution to understanding the use of deep learning for portfolio optimization represents a significant advancement over traditional financial models by offering several original and valuable benefits. These include the ability to capture complex non-linear relationships, dynamic rebalancing in response to real-time data, processing of unstructured data (like sentiment analysis), advanced risk management, and the integration of high-dimensional data. The combination of these capabilities enables more accurate, adaptive, and robust portfolio optimization, ultimately enhancing portfolio performance and reducing risk.
Paper Type: Research Paper
Downloads
References
Alzaman, C. 2024. Deep learning in stock portfolio selection and predictions, Expert Systems with Applications, 237(Part B): 121404, https://doi.org/10.1016/j.eswa.2023.121404.
Cui, T., S. Ding, H. Jin, and Y. Zhang. 2023, Portfolio constructions in cryptocurrency market: A CVaR-based deep reinforcement learning approach. Economic Modelling, 119, 106078, https://doi.org/10.1016/j.econmod.2022.106078.
Das, J. D., S. Bowala, R. Thulasiram, and A. Thavaneswaran. 2024. Hybrid Data-Driven and Deep Learning Based Portfolio Optimization. Journal of Mathematical Finance, 14(3): 271-310. https://doi.org/10.4236/jmf.2024.143016.
Durall, R. 2022. Asset Allocation: From Markowitz to Deep Reinforcement Learning (June 28, 2022). Available at SSRN: https://ssrn.com/abstract=4148379.
Espiga-Fernández, F., A. García-Sánchez, and J. Ordieres-Meré. 2025. gymfolio: A Reinforcement learning environment for Portfolio Optimization in Python. SoftwareX Journal, 30(2):1-9, https://doi.org/10.1016/j.softx.2025.102106.
Heydarpour, M., H. Ghanbari, E. Mohammadi, and S. Shavvalpour. 2024. Robust Portfolio Optimization using LSTM-based Stock and Cryptocurrency Price Prediction: An Application of Algorithmic Trading Strategies; Iranian Journal of Accounting, Auditing and Finance, Articles in Press, Accepted
Manuscript, Available Online from 01 December 2024. https://ijaaf.um.ac.ir/article_46039.html.
Ibri, S., and M. Slimane. 2022. Probability Stochastic Processes and Simulation In Python. Book, Algeria. https://www.researchgate.net/publication/360767027.
Junhuan, Z., C. Kewei, and W. Jiaqi. 2024. A survey of deep learning applications in cryptocurrency. iScience Review, 27(1):1-40, 19 January, 108509 , https://doi.org/10.1016/j.isci.2023.108509.
Ketkar, N. and J. Moolayil. 2021. Learning with python: Learn Best Practices of Deep Learning Models with PyTorch, Bangalore, Karnataka, India.
Li, H., and T. Liu. 2023. Portfolio Optimization Based on the LSTM Forecasting Model. Proceedings of the 2nd International Conference on Financial Technology and Business Analysis, 48(1): 97-106. https://doi.org/10.54254/2754-1169/48/20230431.
Nafia, A., A. Yousfi, and A. Echaoui. 2023. Equity-Market-Neutral Strategy Portfolio Construction Using LSTM-Based Stock Prediction and Selection: An Application to S&P500 Consumer Staples Stocks. International Journal of Financial Studies, 11(2): 57. https://doi.org/10.3390/ijfs11020057.
Prigent, J.-L. 2007. Portfolio Optimization and Performance Analysis. Book, Financial Mathematics Series, Chapman & Hall/CRC is an imprint of Taylor & Francis Group, U.S, 70-78.
Sebastian, A., and V. Tantia. 2024. Deep Learning for Stock Price Prediction and Portfolio Optimization. International Journal of Advanced Computer Science and Applications, 15(9):926-941.
Tamuly, A., G. Bhutan, and Sukriti. 2024. Portfolio Optimization using Deep Reinforcement Learning. IEEE 5th India Council International Subsections Conference (INDISCON), Chandigarh, India, 1-6, DOI: 10.1109/INDISCON62179.2024.10744403.
Xiong, Z., M. Li, and Y. Xu. 2022, LSTM-MPT Based Quantitative Portfolio Decision Model, International Symposium on Intelligent Robotics and Systems (ISoIRS), IEEE, China, https://doi.org/10.1109/ISoIRS57349.2022.00035.
Xu, Z., X. Zhang, and Z. Zhou. 2025. Cryptocurrency Portfolio Optimisation Based on LSTM Time Series Forecasting. Applied and Computational Engineering, 134(1):144-151, https://doi.org/10.54254/27552721/2025.22255.
Yahoo. https://finance.yahoo.com/markets/crypto/all/ (15.05.2025).
Yifu, J., J. Olmo, and M. Atwi. 2024. Deep reinforcement learning for portfolio selection. Global Finance Journal, 62(4): 01-15, https://doi.org/10.1016/j.gfj.2024.101016.
Yu, M. 2023. Mean-variance Portfolio Optimization by LSTM-based Predictions. Advances in Economics Management and Political Sciences, 61(1):102-109. https://doi.org/10.54254/2754-1169/61/20231061.
Zaki, S. 2021. A Deep Learning Portfolio Optimization Framework Using Cryptocurrencies. Master thesis, school of science & engineering – al akhawayn university, Morocco.
Zeroual, A., F. Harrou, A. Dair, and Y. Sun. 2020. Deep Learning Methods for Forecasting COVID-19 Time-Series Data: A Comparative Study. Chaos, Solitons & Fractals, 140: 110121. DOI: 10.1016/j.chaos.2020.110121.
Zhang, Y., S. Yongbin, L. Weilong and Y. Xingyu. 2025. Portfolio Optimization with Lstm-Based Return and Risk Information. Available at SSRN: https://ssrn.com/abstract=4215299 or http://dx.doi.org/10.2139/ssrn.4215299 .
Zhang, Z., S. Zohren, and S. Roberts. 2020. Deep Learning for Portfolio Optimization. The Journal of Financial Data Science, 2(4): 8-20. https://doi.org/10.3905/jfds.2020.1.042.
Zouaoui, H., and M. N. Naas. 2021. Loans Portfolio Optimization of Commercial Banks using Genetic Algorithm: A Case Study of Saudi Arabia. International Journal of Banking, Risk and Insurance, 9(1): 2027.
Zouaoui, H., and M. N. Naas. 2023. Option pricing using deep learning approach based on LSTM-GRU neural networks: Case of London stock exchange. Data Science in Finance and Economics, 3(3): 267–284. https://doi.org/10.3934/DSFE.2023016.









