A Hybrid Approach Based on a Memory-Instance–Based Gated Transformer (MIGT) Algorithm and Metaheuristic Optimization for Portfolio Management with the Aim of Return Optimization and Risk Control
Keywords:
Portfolio management, financial risk control, return optimization, gated transformer algorithm, memory instancesAbstract
The objective of this study is to propose an efficient hybrid framework for portfolio management that can simultaneously optimize investment returns and effectively control risk under both normal and turbulent market conditions. The primary focus is on improving the accuracy of asset return forecasting and transforming these forecasts into optimal portfolio weighting decisions. In this research, a hybrid approach is employed that combines a memory-instance–based gated transformer model for forecasting asset returns with a hybrid metaheuristic algorithm based on adaptive differential evolution and particle swarm optimization for portfolio optimization. Financial data from the Iranian capital market covering the period from 2016 to 2024 were collected and, after preprocessing, cleaning, and feature extraction, were entered into the modeling process. The mean absolute error in the test period was 0.0068, and the root mean square error was 0.0100; these values exhibited a standard deviation of less than 0.0004 in cross-validation, indicating prediction stability. The optimal portfolio obtained by integrating these forecasts with the hybrid metaheuristic algorithm achieved an annualized return of 0.325 and an annualized standard deviation of 0.238, resulting in a Sharpe ratio of 1.16 and a Sortino ratio of 1.61. Tail risk measures also remained at controlled levels, such that the value at risk (VaR) at the 0.95 confidence level was 0.021 and the conditional value at risk (CVaR) was calculated as 0.0316. The paired Wilcoxon test conducted to compare the proposed model with benchmark methods yielded statistics above the significance threshold (for the Sharpe ratio, z = 2.51 and p = 0.012; for the Sortino ratio, z = 2.78 and p = 0.005), indicating a statistically significant improvement in performance. Based on the findings, it can be concluded that the proposed hybrid framework is capable of establishing an appropriate balance between return and risk in portfolio management by leveraging deep learning and metaheuristic optimization. The stability of the results across different temporal subsamples and the maintenance of acceptable performance under turbulent market conditions indicate that this approach possesses strong generalizability and practical applicability.
References
Antony, A. (2019). Behavioral Finance and Portfolio Management: Review of Theory and Literature. Journal of Public Affairs, 20(2). https://doi.org/10.1002/pa.1996
Ayari Salah, G. H. (2025). A meta-analysis of supervised and unsupervised machine learning algorithms and their application to active portfolio management. Expert Systems with Applications, 271, 126611. https://doi.org/10.1016/j.eswa.2025.126611
Bahramian, M. (2022). Behavioral Portfolio Management. Tehran Stock Exchange Brokers Administration.
Burkart, N., & Huber, M. F. (2021). A survey on the explainability of supervised machine learning. Journal of Artificial Intelligence Research, 70, 245-317. https://doi.org/10.1613/jair.1.12228
Chen, S., Huang, Y., & Ge, L. (2024). An early warning system for financial crises: A temporal convolutional network approach. Technological and Economic Development of Economy, 30(3), 688-711. https://doi.org/10.3846/tede.2024.20555
Drenovak, M., Ranković, V., Urošević, B., & Jelic, R. (2020). Bond Portfolio Management Under Solvency II Regulation. European Journal of Finance, 27(9), 857-879. https://doi.org/10.1080/1351847x.2020.1850499
Ghodrzi, A., Tehrani, R., & Soori, A. (2024). Optimizing Investment Portfolios of Insurance Companies Using Copula Functions and Value at Risk Approach. Investment Knowledge, 13(49), 325-352. http://www.jik-ifea.ir/article_22064.html?lang=en
Hadbaa, H. (2019). Behavioral Biases Influencing the Decision Making of Portfolio Managers of Capital Securities and Traders in Morocco. Financial Markets Institutions and Risks, 3(1), 92-105. https://doi.org/10.21272/fmir.3(1).92-105.2019
Han, Y., Liu, Y., Zhou, G., & Zhu, Y. (2024). Technical analysis in the stock market: A review. In Handbook of Investment Analysis, Portfolio Management, and Financial Derivatives (Vol. 1-4, pp. 1893-1928). https://doi.org/10.1142/9789811269943_0059
Hosseini, S. H., Shakouri G, H., Kazemi, A., Zareayan, R., & Mousavian H, M. (2020). A system dynamics investigation of project portfolio management evolution in the energy sector. Kybernetes, 49(2), 505-525. https://doi.org/10.1108/K-12-2018-0688
Johnson, L., & Moore, K. (2019). Reinforcement Learning for Financial Portfolio Management. IEEE Transactions on Neural Networks and Learning Systems, 30(5), 1306-1317ER -.
Langley, P., & Leyshon, A. (2023). FinTech platform regulation: regulating with/against platforms in the UK and China. Cambridge Journal of Regions, Economy and Society, 16(2), 257-268. https://doi.org/10.1093/cjres/rsad005
Liang, Z., Chen, H., Zhu, J., Jiang, K., & Li, Y. (2018). Adversarial deep reinforcement learning in portfolio management. arXiv preprint arXiv:1808. 09940
Liu, L., Zhou, S., Jie, Q., Du, P., Xu, Y., & Wang, J. (2024). A robust time-varying weight combined model for crude oil price forecasting. Energy, 299, 131352. https://doi.org/10.1016/j.energy.2024.131352
Liu, W., Suzuki, Y., & Du, S. (2024). Forecasting the Stock Price of Listed Innovative SMEs Using Machine Learning Methods Based on Bayesian optimization: Evidence from China. Computational Economics, 63(5), 2035-2068. https://doi.org/10.1007/s10614-023-10393-4
Montazeralhaj, N., & Rezaei Shouraki, M. (2023). Investigating the impact of investor sentiment on investment returns and financial performance in companies listed on the Tehran Stock Exchange.
Rouhi Sara, M., Taheri Nia, M., Zolqi, H., & Sarlak, A. (2023). Proposing a predictive model for financial crises in the Iranian capital market using hybrid algorithms. [Journal Not Specified]. https://journal.saim.ir/article_711394_6c636a0b32fecd90617293ebf3b44078.pdf
Safaeian, M., Moses, R., Ozguven, E. E., & Dulebenets, M. A. (2024). An optimization- based risk management framework with risk interdependence for effective disaster risk reduction. Progress in Disaster Science, 21, 100313. https://doi.org/10.1016/j.pdisas.2024.100313
Silvius, G., & Marnewick, C. (2022). Interlinking sustainability in organizational strategy, project portfolio management and project management a conceptual framework. Procedia Computer Science, 196, 938-947. https://doi.org/10.1016/j.procs.2021.12.095
Wang, N., Guo, Z., Shang, D., & Li, K. (2024). Carbon trading price forecasting in digitalization social change era using an explainable machine learning approach: The case of China as emerging country evidence. Technological Forecasting and Social Change, 200, 123178. https://doi.org/10.1016/j.techfore.2023.123178
Downloads
Published
Submitted
Revised
Accepted
Issue
Section
License
Copyright (c) 2026 Mohammad Haji Ebrahim Tehrani (Author); Amin Safarnejad Borujeni; Mohsen Hashemigohar, Sobhan Zafari, Hossein Alidadi (Author)

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

