Design and Validation of an Optimal Dynamic Portfolio Management Model Based on Investment Portfolio Simulation in the Tehran Stock Exchange Using Artificial Intelligence and Machine Learning Methods
Subject Areas : Financial EngineeringMostafa Allameh 1 , Hassan Ghodrati 2 * , Hossein Panahian 3 , Meysam Arabzadeh 4 , Ali Akbar Farzin Far 5
1 - Department of Accounting, Kashan Branch., Islamic Azad University, Kashan, Iran
2 - Department of Accounting, Kashan Branch., Islamic Azad University, Kashan, Iran
3 - Department of Accounting, Kashan Branch., Islamic Azad University, Kashan, Iran
4 - Department of Accounting, Kashan Branch., Islamic Azad University, Kashan, Iran
5 - Department of Accounting, Kashan Branch., Islamic Azad University, Kashan, Iran
Keywords: Feasible Investment Option , Dynamic Approach, Forensic-Based Investigation(FBI) , Machine Learning Efficiency,
Abstract :
In this research, first the financial criteria used in capital decision-making were identified and refined, then the most effective criteria were selected based on the deep learning algorithms including: RF, XGBoost, and LightGBM. In this stage, 11 factors were selected from the 35 factors found in previous research. In the next stage, based on the Forensic-Based Investigation algorithm (FBI), feasible investment options were identified and the internal rate of return was calculated over a 5-year period, and 42 companies that had an internal rate of return higher than the risk-free investment were selected as feasible investment options. During the next stage, different random combinations were used as investment portfolios using three methods: equal weight allocation, mean-variance model, and hierarchical risk preference model. Investment weights were determined for each invested share (combination) and investment returns were evaluated using different metrics. Finally, in order to validate the findings, the feasible investment options were divided into two categories of companies active in the financial industry and others, and the superiority of decision-making (higher returns) in a dynamic process was accepted.
[1] Alexander, G.J., Baptista, A.M., Economic implications of using a mean-VaR model for portfolio selec-tion: A comparison with mean-variance analysis, Journal of Economic Dynamics and Control, 2002; 26(7–8):1159–1193. doi: 10.1016/S0165-1889(01)00041-0
[2] Alirezaei, S., Khodabakhshi Parijan, K., Kalaei, M., The impact of financial factors on sales forecasting with supervised machine learning methods: a case study of food and beverage companies admitted to the Tehran Stock Exchange, Advances in Mathematical Finance and Applications (AMFA), 2025; 4(1): 117-136. doi: https://sanad.iau.ir/en/Article/1186785
[3] Breiman, L., Random Forest, Machine Learning, 2001;45(1):5–32. doi: 10.1023/A:1010933404324
[4] Bustos, O., Pomares-Quimbaya, A., Stock market movement forecast: A systematic review, Expert Sys-tems with Applications, 2020;156:113464. doi: 10.1016/j.eswa.2020.113464
[5] Chen, J., Yeh, C., Tan, J., Ferrer, R., Using publicly available satellite imagery and deep learning to understand economic well-being in Africa, Nat Commun, 2020;11(1):1–9. doi: 10.1038/s41467-020-16185-w
[6] Chen, T., Guestrin, C., XGBoost: A scalable tree boosting system, In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD’16), 2016; 785–794. doi: 10.1145/2939672.2939785
[7] Chen, W., Zhang, H., Kumar, M., Jia, L., Mean–variance portfolio optimization using machine learning-based stock price prediction, Applied Soft Computing, 2021;100:106943. Doi: 10.1016/j.asoc.2020.106943
[8] Chou, J.S., Chen, K.E., Optimizing investment portfolios with a sequential ensemble of decision tree based models and the FBI algorithm for efficient financial analysis, Applied Soft Computing, 2024; 158:111550. doi: 10.1016/j.asoc.2024.111550
[9] Chou, J.S., Nguyen, N.M., FBI inspired meta optimization, Applied Soft Computing, 2020;106339. doi: 10.1016/j.asoc.2020.106339
[10] Firouz, A., FarizinFar, A.A., Ghodrati, H., Identification Reporting Readability Measurement Metrics and Factors Affecting the Cost of Capital Based on Knowledge Domain Analysis Using Content Analysis, Dynamic management and business analysis, 2024;3(5):290–312. doi: 10.22034/dmbaj.2025.2049905.1227 (In Persian)
[11] Gopinathan, R., Durai, S.R.S., Stock market and macroeconomic variables: New evidence from India, Financial Innovation, 2019;5(1):29. doi: 10.1186/s40854-019-0145-1
[12] Hiransha, M., Gopalakrishnan, E.A., Menon, V.K., Soman, K.P., NSE stock market prediction using deep-learning models, Procedia Computer Science, 2018;132:1351–1362. doi: 10.1016/j.procs.2018.05.050
[13] Jamshidi Eini, E., Khaloozadeh, H., The Tail Mean-Variance Model and Extended Efficient Frontier. Advances in Mathematical Finance and Applications (AMFA), 2021;6(1): 179-193. doi: https://sanad.iau.ir/en/Article/914486
[14] Kaczmarek, T., Perez, K., Building portfolios based on machine learning predictions, Economic Re-search Ekonomska Istraživanja, 2021; 35(1): 19–37. doi:10.1080/1331677x.2021.1875865
[15] Kapsos, M., Christofides, N., Rustem, B., Worst-case robust Omega ratio, European Journal of Oper-ational Research, 2014; 234(2): 499-507. doi: 10.1016/j.ejor.2013.04.025
[16] Ke, G., Meng, Q., Finley, T., Wang, T., Chen, W., Ma, W., Ye, Q., Liu, TY., LightGBM: A highly effi-cient gradient boosting decision tree, Advances in Neural Information Processing Systems, 2017;30:3146–3154. doi: 10.48550/arXiv.1712.01017
[17] Konno, H., Yamazaki, H., Mean-absolute deviation portfolio optimization model and its applications to Tokyo stock market, Management Science, 1991;37(5):519–531. doi: 10.1287/mnsc.37.5.519
[18] Min, L., Dong, J., Liu, J., Gong, X., Robust mean‑risk portfolio optimization using machine learn-ing‑based trade‑off parameter, Applied Soft Computing, 2021;113:107948. doi:10.1016/j.asoc.2021.107948
[19] Novykov, V., Bilson, C., Deep learning applications in investment portfolio management: a systemat-ic literature review, Journal of Accounting Literature, 2024; 47(2):245–276. Doi: 10.1108/JAL-07-2023-0119
[20] Paiva, F.D., Cardoso, R.T.N., Hanaoka, G.P., Duarte, WM., Decision-making for financial trading: A fusion approach of machine learning and portfolio selection, Expert Systems with Applications, 2019;115:635–655. doi: 10.1016/j.eswa.2018.08.003
[21] Rockafellar, R.T., Uryasev, S., Optimization of conditional value-at-risk, Journal of Risk, 2000; 2(3): 21–41. doi: 10.21314/JOR.2000.038
[22] Salo, A., Doumpos, M., Liesiö, J., Zopounidis, C., Fifty years of portfolio optimization, European Journal of Operational Research, 2024; 318(1): 1–18. doi: 10.1016/j.ejor.2023.12.031
[23] Shirtavani, S., Homayoonfar, M., Azadi, K., Daneshvar, A., Developing a Model to Analyze Decision Maker's Preference in Portfolio Selection, Advances in Mathematical Finance and Applications, 2023;15(2). doi: https://sanad.iau.ir/en/Article/1189992
[24] Wang, M., Zhang, L., Liu, M., Zhang, D., A survey on deep learning for neuroimaging-based brain disorder analysis, Frontiers in Neuroscience, 2020; 14:779. doi: 10.3389/fnins.2020.00779
Adv. Math. Fin. App., 2026, 11(1), P. 61-80 | |
| Advances in Mathematical Finance & Applications www.amfa.iau-arak.ac.ir Print ISSN: 2538-5569 Online ISSN: 2645-4610 Doi: |
Original Research
Design and Validation of an Optimal Dynamic Portfolio Management Model Based on Investment Portfolio Simulation in the Tehran Stock Exchange Using Artificial Intelligence and Machine Learning Methods
| ||
|
Article Info Article history: Received 2025-06-02 Accepted 2025-08-08
Keywords: Feasible Investment Option Dynamic Approach Forensic-Based Investigation(FBI) Machine Learning Efficiency |
| Abstract |
In this research, first the financial criteria used in capital decision-making were identified and refined, then the most effective criteria were selected based on the deep learning algorithms including: RF, XGBoost, and LightGBM. In this stage, 11 factors were selected from the 35 factors found in previous research. In the next stage, based on the Forensic-Based Investigation algorithm (FBI), feasible investment options were identified and the internal rate of return was calculated over a 5-year period, and 42 companies that had an internal rate of return higher than the risk-free investment were selected as feasible investment options. During the next stage, different random combinations were used as investment portfolios using three methods: equal weight allocation, mean-variance model, and hierarchical risk preference model. Investment weights were determined for each invested share (combination) and investment returns were evaluated using different metrics. Finally, in order to validate the findings, the feasible investment options were divided into two categories of companies active in the financial industry and others, and the superiority of decision-making (higher returns) in a dynamic process was accepted. |
1 Introduction
Creating a portfolio based on the correct selection of asset combinations such as stocks is considered an essential task for individual and institutional investors. Therefore, improving portfolio management has become one of the most concerning issues in modern financial research and investment decision-making [3]. Accordingly, the success of selecting an appropriate investment portfolio largely depends on the future performance of stock markets as well as the availability of reasonable and accurate predictions. Such forecasts have the potential to generate high investment returns and mitigate associated risks [5]. Fundamental analysis supports trading strategies based on financial statement data and stock price volatility, offering explanations with clear economic rationale. However, its effectiveness is limited by the infrequent release of financial information by companies, making it challenging to use for daily price forecasting [8]. Furthermore, selecting the micro financial and macroeconomic variables that influence the stock market is challenging [11]. A content-based review of the literature reveals that existing research on long-term investment is limited, with most prior studies primarily focused on short-term forecasting of daily stock prices [19].An analysis of investor behavior, based on empirical evidence from previous studies, indicates that individual investors in the stock market typically aim to estimate the future returns of their selected stocks and subsequently determine the optimal weight of each stock to construct an investment portfolio. Therefore, following the security pre-selection process, investors should also determine the optimal investment weight for each selected stock prior to making trade decisions — a process primarily guided by modern portfolio theory [20,22,24]. Modern portfolio theory encompasses various models for calculating the optimal weight assigned to each asset in a portfolio—whether stocks, other securities, or capital assets such as coins, currencies, real estate, or derivatives. Given a set of assets, portfolio management models aim to optimize one or more objective functions under specific constraints. In general, solving the portfolio optimization problem yields the optimal investment weight for each asset [18].
2 Theoretical Foundations and Research Background
Markowitz’s (1952) mean-variance (MV) model, regarded as the foundation of modern portfolio theory, formulates a portfolio optimization framework that seeks to maximize expected returns while minimizing investment risk. However, this model has several limitations in practical use, such as strict assumptions, high computational complexity for large-scale assets, and the assumption that returns follow a normal distribution [13]. Therefore, several models have been gradually proposed to solve these problems and the limitations of the mean-variance (MV) model. For example, Kono and Yamazaki (1991) developed the mean deviation (MAD) model, in which they used the absolute value of deviations from the mean return to replace variance as a measure of risk in the mean-variance (MV) model [17].
Alexander and Baptista (2002) proposed the Average Value-at-Risk (AVaR) model by integrating the mean-variance (MV) framework with the Value-at-Risk (VaR) approach, where VaR estimates potential losses at a given confidence level [1]. The Value at Risk (VaR) criterion often results in multiple local minima, making it less effective for portfolio risk management. To address these limitations, Rockafellar and Uryasev (2000) proposed the Conditional Value at Risk (CVaR) model as a more robust alternative [21]. In this context, Kapsos, Christofides, and Rustem (2014) employed the Omega model for portfolio optimization. This model focuses on maximizing the Omega ratio to optimize the relative probability of portfolio returns or losses exceeding a specified threshold, based on the asymmetric distribution of returns. It also aims to overcome the limitations of the Sharpe ratio [15].
Since the ARIMA model relies on assumptions of linearity and normally distributed errors, it may not be well-suited for modeling stock return series, which often violate these assumptions. In contrast, machine learning (ML) models, which do not depend on such restrictive assumptions, have demonstrated superior performance in forecasting stock returns [19]. In addition, deep learning (DL) models, as new machine learning technologies, have shown promising performance in stock market forecasting and portfolio management [12]. A review of the empirical literature indicates that decision tree-based models, as a subset of machine learning (ML) algorithms, excel in extracting features and financial metrics with superior performance. Due to their diverse architectures and specialized capabilities, machine learning (ML) models perform well with smaller datasets. Compared to artificial neural networks (ANN) and support vector machines (SVM), ML models offer a practical and scalable approach to handling complex portfolio management challenges, such as a large number of variables, high stock diversity, and substantial data volume. Machine learning (ML) algorithms, known for their simplicity and flexibility, are powerful tools that can automatically eliminate irrelevant predictor variables from the analysis. These machine learning (ML) models enable advanced feature analysis, resulting in significant accuracy improvements. In particular, decision tree-based algorithms are effective tools for assessing factor influence in existing research [2]. A literature review based on content analysis of previous studies demonstrates that tree-based machine learning models, including RF, XGBoost, and LightGBM, consistently exhibit strong classification performance significantly outperforming others even without fine-tuning internal parameters. Triple machine models have been used as efficient methods to identify critical financial features in numerous existing studies on various financial issues [22,19]. Therefore, in the present study, a combination of them has been used to select the optimal combination of financial ratios and exploit the superior performance of these three models in data classification.
A) Random Forest Algorithm:
This deep learning approach, introduced by Breiman (2001), utilizes a set of decision-making options structured as a decision tree model. The researcher defines his proposed model as a classifier composed of multiple random decision trees that collectively vote. In the Random Forest (RF) algorithm, random vectors are used to split subsets of parameters or influential factors—here, financial metrics measuring corporate performance. For the kth decision tree, the random forest (RF) algorithm generates a random vector Θκ with a uniform distribution, but this vector is completely independent of the previously generated vectors Θκ−1. The decision tree classifier h (X, Θκ) is generated using training data x and a random vector Θκ. The random forest (RF) algorithm improves the classification and ranking performance of influential factors by using multiple decision tree classifiers for voting [4].
B) Extreme Gradient Boosting Algorithm:
This decision tree model, based on a set of parameters or criteria, was first introduced by Chen and Gastrin (2016). Its superior regression and classification performance has made it a popular choice in machine learning (ML) research and competitions. The Extreme Gradient Boosting (XGBoost) algorithm is a decision tree booster that combines multiple classification or regression tree models. Its final prediction is derived from the aggregated outputs of all the individual trees [6].
C) Light-boosted gradient machine:
Developed by Microsoft in 2017, this deep learning (DL) algorithm addresses computational inefficiencies in big data by introducing two innovative enhancements to gradient boosting decision tree methods, resulting in the efficient and accurate Light Gradient Boosting Machine (LightGBM) model. These approaches are Gradient-based One-Side Sampling (GOSS) and Exclusive Feature Bundling (EFB). GOSS retains samples with larger gradients during the sampling process while randomly discarding those with smaller gradients. The Microsoft team's research demonstrated that this approach achieves higher accuracy in capturing information at a fixed sampling rate compared to uniform sampling. Exclusive Feature Bundling (EFB) leverages the sparsity in high-dimensional data by grouping mutually exclusive features those that do not have non-zero values simultaneously—thereby reducing the problem’s dimensionality (e.g., the number of criteria used in evaluating investment options) without losing critical information [16].
Despite the crucial impact of stock pre-selection on portfolio performance, few studies have addressed this area. This research uniquely develops criteria for selecting portfolio candidates, characterized by three fundamental elements: selection, operator, and threshold. This study dynamically identifies optimal stock selection conditions using a forensic-based investigation (FBI) algorithm. The FBI algorithm sequentially processes key financial indicators to establish multi-factor stock selection criteria, effectively performing stock pre-selection. Often, a specific industry or a predefined set of sectors is considered as the feasible investment universe. Optimization or mathematical simulation methods are then applied to determine the final investment mix based on cross-sectional performance data. In contrast, this study dynamically determines the feasible investment portfolio using artificial intelligence and the FBI algorithm applied to seasonal data over an extended period, followed by capital allocation decisions.
FBI algorithm in stock pre-selection. The Forensic-Based Investigation (FBI) algorithm is a simple yet effective method that has demonstrated efficiency in financial applications like portfolio management, as well as in other domains. Inspired by the process of criminal forensic investigations, the algorithm operates with two main components: an investigation team and a prosecution team. The first team performs a broad search to identify potential suspects. In contrast, the second team conducts a focused, in-depth local search around the suspects’ likely locations to pinpoint the target for prosecution. This target location represents the overall or final optimal solution to the optimization problem. The FBI approach assesses the legal health and transparency of companies’ financial information by analyzing financial ratios and key performance indicators against predefined numerical thresholds. For each financial criterion, an allowable range (lower and upper limits) is established, and companies with values within this range are assigned a positive score. Finally, the total of these scores is computed as the FBI index, and companies exceeding a specified threshold are selected as suitable candidates with transparent and legally compliant financial profiles [8]. In FBI-based financial projects, there are typically three stages. The first stage involves selecting legal-financial criteria, including corporate governance, adequacy of disclosure and transparency, key financial ratios, liquidity ratios, legal and audit risks, and the history of financial crimes and violations. Data mining and machine learning models are then applied to these metrics to detect unusual patterns or suspicious behaviors, filtering out unhealthy companies. Finally, based on model outputs and company scores, suspicious or high-risk firms are eliminated, and companies with a legally compliant and healthy financial profile are selected for the final weighting and ranking stage in the portfolio [9].
Classical portfolio optimization models often use average historical returns as expected returns, resulting in limited sensitivity to stock market behavior and consequently producing inaccurate estimates of future short-term returns. Furthermore, since stock prices are heavily influenced by investor sentiment in the short term, using average historical returns to estimate short-term expected returns for individual stocks is not appropriate [23]. Therefore, this study integrates dynamic stock return prediction using machine learning (ML) with monitoring analysis based on artificial intelligence (AI) to optimize financial investment portfolios.
3 Methodology
3.1. Definition of Statistical Population
In the present study, annual cross-sectional data and in some cases, performance averages have been employed to ensure consistency with prior research in finance and operations research. This approach supports the use of mathematical modeling based on data envelopment analysis (DEA) for assessing financial efficiency, as well as the formulation of optimal investment portfolios in financially efficient firms using quadratic or nonlinear programming techniques. Accordingly, the statistical population of this study includes companies listed on the Tehran Stock Exchange and the OTC Market. This population was selected based on certain rules and conditions that set its boundaries.
Due to the limited number of companies, variables, and methods, sampling was not used. Instead, the entire statistical population was studied using the census method. Therefore, the size of the statistical population matches the size of the statistical sample and determining the sample size and using the random sampling method will not be applicable.
3.2. Research Model
To apply the model, financial and market data from an eight-year period ending on 29/12/1401 were used. The data were divided into two parts: 70% for training and 30% for testing and control. The training dataset was collected over a specific period. Then, three tree-based machine learning models.
1) Random Forest (RF), 2) Extreme Gradient Boosting (XGBoost), and 3) Light Gradient Boosting Machine (LightGBM)were applied to the financial data to identify key financial indicators. These indicators are important factors that influence investment decisions and reflect the overall financial health of companies.
Compared to other machine learning algorithms, decision tree-based models offer distinct advantages for financial analysis datasets, which are often limited in size and contain significant noise. The data collected at this stage including daily stock prices, average monthly returns, and key financial statement items serve as the training set for predicting a company’s return growth in the following quarter. The importance of each indicator was assessed using information gain ratios generated by three machine learning (ML) models during training. The financial indicators were then ranked based on their significance for the selected listed companies and overall stock classification. Factors with above average importance were identified as key criteria influencing the selection of the optimal investment portfolio. The intersection of these critical factors is illustrated in Figure 1.
Identifying influencing factors (determinants)
|
RF |
LightGBM |
XGBoost |
Fig. 1: Selecting Affecting Investment Factors Based on Machine Learning Algorithms
This ensemble approach leverages the mining capabilities of three decision tree (DT)-based deep learning models to filter fundamental financial indicators uniquely identified by each model. This method mitigates potential bias arising from the individual performance of each model. Consequently, DT-based models effectively identify financial indicators that predict future return growth of target companies, supporting the development of stock selection criteria for portfolio construction. Subsequently, the FBI algorithm was employed to establish selection conditions comprising operators and thresholds for financial indicators. This process aims to maximize the portfolio’s internal rate of return (IRR) based on the expected number of shares available to investors. By applying the FBI algorithm, the framework filters potential portfolio candidates, identifying undervalued stocks with strong intrinsic health that are projected to appreciate in price. Selection is guided by conditional thresholds set for each influential financial indicator identified in the previous step. A review of the portfolio management literature reveals numerous studies employing similar methodologies, which have demonstrated successful outcomes in decision making [7,8,14,20,24].
Table 1: Pseudocode Portfolio Management Algorithm with Financial Indicators Optimized by Metaheuristic Algorithm
Step 1: Selection of financial indicators
| - Importing financial data sets and removing outliers based on a local parameter of 0.001 |
- Entering the average monthly income or return to calculate the highest and lowest future quarterly return values using importance measurement algorithms and comparing financial indicators including: 1) Random Forest (RF), 2) Extreme Gradient Boosting Algorithm (XGBoost), and 3) Light Gradient Boosting Machine (LightGBM); in order to refine the effective and decisive financial indicators | |
- Ranking financial indicators based on the results of the following methods: 1) Random Forest (RF), 2) Extreme Gradient Boosting Algorithm (XGBoost), and 3) Light Gradient Boosting Machine (LightGBM) | |
- Using the intersection of the best indicators in the methods: 1) Random Forest (RF), 2) Extreme Gradient Boosting Algorithm (XGBoost) and 3) Light Gradient Boosting Machine (LightGBM); as effective financial indicators | |
Step2: Pre-selecting investment options | - Setting upper and lower limits of parameters |
- Determining the maximum number of repetitions and the size of the study population | |
- Using the Forensic-Based Investigation algorithm (FBI) and based on it identifying the best performing stocks as viable investment options | |
Step 3: Evaluate investment combination | - Determining the combination of resource allocation weights (investment amount) in each stock with each of the three approaches including: 1) determining equal weights (EV), 2) using the mean-variance (MV) model, and 3) the hierarchical risk preference (HRP) model |
- Comparing portfolio performance in three ways | |
- Selecting the optimal investment combination based on the highest return in three methods | |
Step 4: Post-test and validate the optimal investment strategy | - Evaluating investment performance by comparing market returns and portfolio returns selected in the previous step |
- If the portfolio return is higher than the market return, select it, otherwise re-evaluate the results |
|
After creating an investment portfolio based on optimal stock selection conditions, investment combination selection methods including: 1) Equal Weighting (EW) model; 2) Mean-Variance (MV) model; and 3) Hierarchical Risk Preference (HRP) model were used to determine the weight of selected stocks in the portfolio. The resulting performance was compared with the baseline Equal Weighting (EW) model to identify the weighting scheme that provides better portfolio investment performance. In the final stage, the best investment strategy determined using the training dataset was applied to the back-test dataset and whether it outperformed the market and the benchmark model was examined. If the return of the best investment strategy exceeds the market return, it can be used for investment marketing in practice, and if it does not yield a higher return, it should be evaluated and revised. Figure 2 shows the pseudocode of the above procedures.
3.3. Data Analysis Tools and Methods
In order to summarize the data, variables were first calculated using the data collected for each of the companies and each of the years studied. All data summarization operations in the calculation of variables or data pre-processing stages, such as identifying and correcting outliers, calculating variables, and, if necessary, normalizing data, were performed using EXCEL software. Then, using Python and MATLAB software, statistical analysis of the data was carried out in the fields of implementing deep learning processes or mathematical simulation. In addition, in order to draw conclusions and answer the research questions, two types of statistical methods were used: 1) descriptive and 2) analytical or inferential.
4.1. Description of the Statistical Population
Taking into account specific limitations, a comparable set of 183 listed companies was identified as the statistical population, as illustrated in Figure 2.
Fig. 2: Description of the Boundaries of the Statistical Population
To adhere to the assumptions of sampling theory—namely, randomness and sufficient sample size for valid inductive inference this study selected listed companies with the specified characteristics (based on applied restrictions) as the statistical population. Moreover, due to reliance on a mathematical optimization model, data envelopment analysis (DEA) was used to define the initial decision-making space for identifying the optimal investment mix, and no sampling was conducted.
4.2. Identifying and Refining Financial Metrics
Based on the proposed research design, the initial step in decision making selecting the investment region and investment mix is identifying financial indicators for choosing investment capital, represented here by selected joint stock companies.
Table 2: Identification and Classification of Factors Affecting Stock Returns | ||||
Row | Type | Variable | Theoretical support | |
Theory | Empirical evidence | |||
1 | Corporate governance system | Institutional Ownership | Representation | Jensen and Meckling (1976), Holmesstrom (1999), Bidello et al. (2009), Chengu et al. (2013), Hartzel et al. (2014), and Lara et al. (2016), |
2 | Board Independence | |||
3 | Deconcentration of Ownership | |||
4 | Board Size | |||
5 | Financial analysis | Information quality | Informational and signaling advantage | Fazari et al. (1988), Dairo et al. (2002), Bertrand and Malayantan (2003), Easley and O'Hara (2004), Graham et al. (2005), Batu et al. (2006), Dechu and Gay (2006), Miller (2006), Niyazawa (2007), Yu (2008), Dicko et al. (2010), Gantu et al. (2010), Yu (2010), Bhattacharya et al. (2011), Clevey-Janquist (2012), Lambert et al. (2012), Goodman et al. (2013), Chen and others (2015), Ding (2015), and Chen and Zhang (2017) |
6 | Information accuracy | |||
7 | Survival index | |||
8 | Profit volatility | |||
9 | Asset growth rate | |||
10 | Financial cost to profit ratio | |||
11 | Financial performance | Net sales margin | Organization and dependence of resources | Burns and Stocker (1961), Trainer (1976), Mills and Snow (1978), Porter (1980), Damanpour (1987), Fisher (1998), Haldema and Lotz (2002) and Davila (2005) |
12 | Gross sales margin | |||
13 | Return on assets | |||
14 | Return on inventories | |||
15 | Capital density | |||
16 | Return on capital | |||
17 | Operating profit margin growth rate | |||
18 | Asset turnover | |||
19 | Enterprise value | |||
20 | Environment | Competition | Strategic theory | Burns and Stocker (1961), Tricker (1976), Milswasnow (1978), Porter (1980), Damanpour (1987), Fisher (1998), Haldema and Lotz (2002), and Davila (2005) |
21 | Company Age | |||
22 | Company Size | |||
23 | Technology | |||
24 | Liquidity | Current ratio | Liquidity and free cash flow | Ipalto (1992), Chiweiler and Ellison (1997), Siri and Tufano (1998), Lynch and Masto (2003), Sepp and T. Vari (2004), Burke and Green (2004), Cutt-Burston et al. (2008), Singhal and Zhou (2011), Cashman et al. (2012) and Gagler et al. (2017), |
25 | Instant ratio | |||
26 | Rate of operating cash flows | |||
27 | Operating to non-operating cash flow | |||
28 | Operating cash flow per share | |||
29 | Asset liquidity | |||
30 | Market | Market Risk Expense | Portfolio | Markowitz (1952-1959), Sharp (1964), Linter (1965) and Musion (1966), Black (1972), Myers (1972), Breeden (1979), Solnick (1974a), Adler and Damas (1983), Ross (1976), Fama and French (1993), Hogan and Warren (1974), Bawa and Lindbergh (1977) and Harlow and Rao (1976), Robinson (1973), Cross and Litzenberger (1976), Fang and Lai (1997) and Dittmar (1999), Merton (1973), Breeden (1979), Lucas (1978) and Brook (1979), Cochran (1991), Achuvara and Pederson (2005), Jagannathan and Wang (1996), Carhart (1997), Howe et al. (2012), Fama and French (2013), Rasiokat and Rentz (2017), Roy and Shijin (2018); Li et al. (2023); Sakurai et al. (2023); Siuy et al. (2023) and Novikov and Bilson (2024) |
31 | Size | |||
32 | Growth Opportunities | |||
33 | Profitability | |||
34 | Investment | |||
35 | Human Capital |
This section analyzes the findings related to identifying and selecting the optimal criteria. Financial metrics used in capital decisions typically reflect the companies’ financial condition, performance, market results, or influencing factors. A review of the literature, based on methodological content analysis and empirical evidence, reveals over 100 financial criteria discussed in previous research. According to Firouz, Farzinfar, and Ghodrati (2024), the most frequently mentioned criteria are summarized in Table 1[10]. In this study, using a knowledge domain analysis approach and qualitative content analysis, thirty-five financial criteria related to capital decisions reflecting financial status, performance, market outcomes, or influencing factors of the companies were identified and summarized in Table 2. The balance sheet and profit and loss statements include dozens of items. Given the importance of relative figures and financial ratios, this study focused on relative figures, while fundamental balance sheet and profit and loss values were excluded.
Additionally, to measure the portfolio return as the dependent variable in evaluating investment outcomes, a seasonal return criterion was identified based on optimal investment combinations, drawing on the research literature and content analysis. The identified stock quarterly return metrics are summarized in Table 3 as follows.
Table 3: Criteria For Measuring Future Quarterly Returns in Portfolio Evaluation |
Row | Description Criteria | Symbol | Definition and Measurement | Empirical Evidence |
1 | Average seasonal return | AQRi, t | The quarterly return on the company's stock price during the year divided by 4 | Ebrahim and Khatib (2017); Shah Nasir, Zandi, Shariati, Dehghani et al. (2018); Payneh et al. (2018); Mehr, Noorani, Khosrowshahi and Ghorbani (2019); Hong, Li Jeng and Zhang (2019); Hong, Jeng and Zhang (2019); Siuy et al. (2023); Salo et al. (2022); Jalota, Takgur, Mandal and Mita (2023); Salo et al. (2024); Novikov and Bilson (2024). |
2 | Standard deviation of seasonal return | SQRi, t | Standard deviation of the company's stock price seasonal return in the year | |
3 | Annual return | ARRi, t | The annual change in the company's stock price compared to the price at the beginning of the year | |
4 | Sharp ratio | SHRi, t | Standard deviation of annual return / (Risk-free return - Average annual return) | |
5 | Absolute rate of return of seasonal return | AWRi, t | The average absolute value of the company's daily stock returns in cases above the median | |
6 | Relative rate of return of seasonal return | RWRi, t | The total daily return of a company's stock above the median divided by the annual return | |
7 | Lowest seasonal rate of return | LQRi, t | The company's lowest average quarterly rate of return during the year | |
8 | Highest seasonal rate of return | HQRi, t | The company's highest average quarterly rate of return during the year | |
9 | Average annual rate of return | ARAi, t | Average monthly stock returns during the year |
To enhance and expedite decision-making in selecting the optimal investment combination (portfolio management), a limited set of the most effective financial criteria reflecting the companies’ financial status, performance, market results, or influencing factors was selected after identifying relevant indicators.
The data collected at this stage—including daily stock prices, average monthly returns, basic financial statement items, and the 35 financial metrics from Table 2 constitute the training set for predicting a company’s return growth in the next quarter. In this simulation, the dependent variable was the average future quarterly return, while the explanatory variables were the 35 financial metrics.
Table 4: Description of the Final Financial Criteria Affecting Portfolio Selection | |||
Row | Description Criteria | Symbol | Definition and Measurement |
1 | Asset growth rate | AGAit | Percentage change in the total book value of assets at the end of the year compared to the beginning of the year |
2 | Financial cost to profit ratio | IERit | The company's financial costs on earnings before interest and taxes as a percentage |
3 | Gross sales margin | GMGit | Gross profit divided by total operating income per 100 |
4 | Return on inventory | ITUit | Earnings before interest and taxes to total assets in 100 |
5 | Capital density | CADit | Book value of total tangible fixed assets divided by total assets in 100 |
6 | Return on capital | ROEit | Earnings before interest and taxes at the book value of shares at the beginning of the period |
7 | Operating profit margin growth rate | GOMit | Percentage change in operating profit ratio to total operating revenues compared to the previous year |
8 | Instant ratio | RARit | Cash and cash equivalents over current liabilities |
9 | Operating cash flow rate | CFOit | Net cash flow from operations divided by total operating income in 100 |
10 | Operating to non-operating cash flow | CFONit | Net operating cash flows to non-operating cash flows in 100 |
11 | Operating cash flow per share | CFOSit | Net operating cash flow divided by the average number of shares |
Table 5: Description of the Findings of the Final Financial Criteria Effective in Portfolio Selection |
Variable Description | Code | Minimum | Maximum | Average | Standard Deviation | Skewness Coefficient | Elongation Coefficient |
Asset growth rate | AGAit | 38- | 850 | 65 | 18 | 1.725 | 5.420 |
Financial cost to profit ratio | IERit | 6.23 | 82.59 | 18.21 | 9.11 | 1.902 | 5.598 |
Gross sales margin | GMGit | 5.82 | 51.40 | 24.10 | 3.10 | 4.632 | 39.662 |
Return on inventory | ITUit | 4.10- | 68.81 | 42.35 | 7.11 | 7.573 | 71.339 |
Capital density | CADit | 5.3 | 85.11 | 38.41 | 9.61 | 11.746 | 150.068 |
Return on capital | ROEit | 3.15- | 39.52 | 11.25 | 8.31 | 2.788 | 8.354 |
Operating profit margin growth rate | GOMit | 8.11- | 98.42 | 11.10 | 2.33 | 9.187 | 101.730 |
Instant ratio | RARit | 0.23 | 9.85 | 1.15 | 0.64 | 2.073 | 4.817 |
Operating cash flow rate | CFOit | 12.24- | 38.16 | 17.15 | 4.32 | 0.411 | 0.066- |
Operating to non-operating cash flow | CFONit | 0.85- | 9.25 | 3.85 | 0.89 | 0.204 | 0.758- |
Operating cash flow per share | CFOSit | 2896- | 369891 | 15862 | 8594 | 0.833 | 0.425 |
The importance of each indicator was evaluated using information gain ratios from three machine learning algorithms1) RF, 2) XGBoost, and 3) LightGBM—during the training process. Based on these rankings, financial indicators were prioritized for the selected listed companies and overall stock classification, enabling the initial selection of suitable companies for investment or defining the feasible decision-making space (Securities Pre-Selection).
In this evaluation, the combined ranking of the final financial metrics was based on the intersection of the three machine learning algorithms—RF, XGBoost, and LightGBM—applied during the training process. From the 35 metrics identified in the literature review, 11 key financial criteria were selected and refined for portfolio management. Their descriptions are summarized in Table 4.
Based on empirical data from the 183 companies over an eight-year period ending on 12/29/1401, the findings regarding basic financial criteria are presented in Table 4.
4.3. Decision Making or Determining a Feasible Investment Area
Based on the proposed research process model, after refining and selecting the basic financial criteria for evaluation, the feasible investment area is determined by selecting companies as investment options using the Forensic-Based Investigation (FBI) algorithm. This algorithm narrows down a broad range of stock selection criteria and sequentially optimizes them using the nature of the optimizers, generating an initial set of investment options and pre-selecting viable choices. The FBI algorithm specifically captures the relationship between portfolio candidates and their investment returns in financial analysis, based on the outcomes of deep learning (DT)-based algorithms. In this scenario, the FBI algorithm optimizer identifies financial indicators as selection criteria and corresponding thresholds. This process optimizes expected portfolio returns using an objective function, eliminating the need for additional financial parameters or expert input. For example, to define the feasible investment area, companies must meet criteria such as Return on Equity (ROE) greater than 87.9% and Return on Assets (ROA) greater than 98.6%.
The Forensic-Based Investigation (FBI) algorithm initially employs four control parameters:
1) optimization dimensions, 2) population size, 3) maximum iterations, and 4) search boundaries. Optimization dimensions: In the FBI algorithm, optimization dimensions correspond to the number of random search variables. Each of the eleven financial criteria requires three parameters—selection, operator, and threshold—resulting in 33 optimization dimensions (3 × 11) for selecting the desired stock portfolio. Population size: Population size is a critical parameter affecting the performance and runtime of the algorithm. Although its impact on the FBI algorithm has not been studied, based on empirical insights from nature-inspired algorithms like particle swarm optimization and differential evolution, the population size is set to ten times the number of optimization dimensions. In this study, with 11 financial criteria, the population size is set to 110 (11 × 10).
Maximum number of iterations: The FBI algorithm’s maximum iterations are set to 100, after which it stops and returns the optimal value. Additionally, the algorithm halts if the absolute change in the objective function remains below 10⁻¹⁰ for ten consecutive iterations, indicating minimal improvement. (very small threshold)
Search Boundaries: According to the proposed research model, selection and operator parameters are random numbers between 0 and 2. The search boundaries for the threshold parameter are set based on the maximum and minimum historical values. Table 6 presents the upper and lower limits of the threshold parameters for standard financial crisis indicators across various industries and companies used to define the investment-feasible area.
Table 6: Upper and Lower Thresholds of Basic Financial Criteria in Determining the Eligible Investment Area | ||||||
Row | Description Criteria | Code | Scale | Limits Threshold | ||
Lower Limit | Upper Limit | |||||
1 | Asset growth rate | AGAit | Percent | 180- | 3000 | |
2 | Financial cost to profit ratio | IERit | Percent | 0 | 42 | |
3 | Gross sales margin | GMGit | Percent | 10- | 80 | |
4 | Return on inventory | ITUit | Percent | 20- | 160 | |
5 | Capital density | CADit | Percent | 5 | 85 | |
6 | Return on capital | ROEit | Percent | 0 | 110 | |
7 | Operating profit margin growth rate | GOMit | Percent | 120- | 10000 | |
8 | Instant ratio | RARit | Rank | 0.15 | 50 | |
9 | Operating cash flow rate | CFOit | Percent | 150- | 4800 | |
10 | Operating to non-operating cash flow | CFONit | Rank | 0 | 55 | |
11 | Operating cash flow per share | CFOSit | Million Rials | 1800- | 98000 |
Using MATLAB, the return on capital and internal rate of return were calculated based on quarterly investment and sales data for each company. It was assumed that shares were acquired at the beginning and liquidated at the end of each quarter. Accordingly, quarterly return was defined as the cash inflow, with the purchase price at the beginning of each quarter considered the investment amount. For all 183 companies analyzed, the internal rate of return (IRR) was computed. Companies with an IRR exceeding the risk-free rate assumed at an annual rate of 23% (equivalent to a minimum quarterly rate of 6%)—were identified as viable investment options. The results led to the identification of feasible investment areas. Companies generating quarterly returns above the 6% risk-free threshold—indicating a positive risk premium were considered viable investment options. Accordingly, 42 companies qualified as suitable for investment, with some achieving quarterly returns exceeding 28%.
4.4. Decision Making in Determining the Optimal Investment Combination
The final stage of the portfolio management process involves capital allocation—determining the optimal combination of investments. At this stage, the investment weight (percentage or relative share) for each of the 42 companies selected during the securities pre-selection phase must be established. To determine the optimal investment weights, three methods were applied: (1) Equal Weighting (EW), (2) Mean-Variance (MV) model, and (3) Hierarchical Risk Parity (HRP) model. Based on the defined algorithms, the total relative investment across the selected companies was constrained to 1 (or 100%), taking into account 11 performance indicators of the identified feasible companies. In this study, three portfolios consisting of 10, 20, and 30 companies were used as training sets for determining selection and investment weights. For each case, the optimal investment combination yielding the highest expected future return was identified as the final optimal portfolio under each of the three applied methods. Combining these three methods helps mitigate the limitations associated with the mean-variance model discussed earlier.
Optimal Portfolio Based on Equal Weighted Equity (EV): The EV portfolio assumes equal investment weights across all feasible stocks to maximize expected future returns. Analysis of the portfolio optimization results using the FBI algorithm in combination with the equal weighting (EV) approach indicates that: Optimal investment should be allocated exclusively to the twenty highest-performing companies identified by the FBI algorithm, including Saipa Glass, Ilam Cement, Dorood Cement, Iran Porcelain Clay, Kashan Amirkabir Steel, Isfahan Sugar, Sinadaro, Damavand Mining, Behran Oil, Post Bank of Iran, Parsian Bank, Gardeh Gari Bank, Pension Fund Investment, Jam Petrochemical, Zagros Petrochemical, Isfahan Petrochemical, Ghadir Petrochemical, and Amirkabir Petrochemical. Each company’s relative investment weight is set at 5% (0.05) of the total portfolio. Mean-Variance (MV): This approach enables investors to maximize portfolio returns for a given risk level or minimize risk while achieving a target expected return. Using the mean-variance (MV) model, the optimal portfolio is determined by balancing the maximization of expected return and the minimization of investment risk among the feasible stocks. Analysis of the portfolio optimization results—based on determining relative investment levels in feasible opportunities using the FBI algorithm combined with the mean-variance (MV) approach—reveals that: Optimal investment should be allocated exclusively to 28 feasible companies with the highest expected returns and lowest risk, including Behnoosh, Tabriz Oil Refining, Darou Eksir, Saipa Glass, Ilam Cement, Dorood Cement, Iran Porcelain Clay, Mineral Processing, Amirkabir Steel, Kashan, Isfahan Sugar, Qazvin Sugar, Sinadaro, Damavand Mining, Behran Oil, Post Bank of Iran, Parsian Bank, Pasargad Bank, Day Bank, Saman Bank, Gardeh Gari Bank, Pension Fund Investment, Day Insurance, Pars Petrochemical, Jam Petrochemical, Zagros Petrochemical, Isfahan Petrochemical, Ghadir Petrochemical, and Amirkabir Petrochemical. Investment in the remaining 14 feasible companies is not recommended. Hierarchical Risk Parity (HRP) Method: Introduced by De Prado (2016), the Hierarchical Risk Parity (HRP) model determines the optimal investment portfolio by combining three techniques:
(1) hierarchical clustering, (2) matrix seriation, and (3) bipartite graph regression Based on the algorithm defined in the Hierarchical Risk Parity (HRP) approach, the optimal portfolio among feasible stocks (investment-worthy companies) was determined. Analysis of the portfolio optimization results—using the FBI algorithm combined with the HRP method to determine relative investment levels—shows that: Optimal investment should be allocated exclusively to 30 feasible companies with the highest expected returns and lowest risk, including Isfahan Oil Refining, Tabriz Oil Refining, Khark Petrochemical, Darou Eksir, Saipa Diesel, Saipa Glass, Ilam Cement, Dorood Cement, Iranian Porcelain Clay, Mineral Processing, Kashan Amirkabir Steel, Isfahan Sugar, Sinadaro, Iran Amlah Minerals, Damavand Minerals, Behran Oil, Post Bank of Iran, Pasargad Bank, Day Bank, Saman Bank, Gardeh Gari Bank, Pension Fund Investment, Day Insurance, Pars Petrochemical, Jam Petrochemical, Zagros Petrochemical, Khorasan Petrochemical, Isfahan Petrochemical, Ghadir Petrochemical, and Amirkabir Petrochemical. No investment is recommended in the remaining 12 companies.
4.5. Evaluating the Performance of Multi-Factor Stock Selection and Portfolio Investment Strategies
Since the performance of portfolio optimization models varies by industry and market cycle stage, the overall performance of the selected portfolios—measured by average annual returns and nine additional performance indicators summarized in Table 2—was compared across the three portfolio optimization approaches. Accordingly, Tables 6 and 7 present the optimal investment strategies and their performance for 42 feasible investment opportunities across different industries and selection conditions.
Up to 5 companies | Up to 10 companies | Up to 15 companies | Up to 20 companies | ||||||||||
Optimal conditions in FBI algorithm | ROE> 1.13 | ROE> 0.19 | CFO> 2.45 | CFOS> 52163 | |||||||||
Portfolio selection approach | EW | MV | HRP | EW | MV | HRP | EW | MV | HRP | EW | MV | HRP | |
Average seasonal return | 0.09 | 2.67 | 0.72- | 0.03 | 1.16 | 0.04- | 0.44- | 0.73 | 0.17- | 0.82- | 0.08 | 0.01 | |
Standard deviation of seasonal return | 0.06 | 0.18 | 0.11 | 0.06 | 0.12 | 0.11 | 0.05 | 0.08 | 0.06 | 0.05 | 0.06 | 0.06 | |
Annual return | 3.12 | 3.96 | 2.56 | 3.12 | 3.44 | 2.92 | 2.88 | 3.40 | 3.00 | 0.20 | 3.12 | 3.08 | |
Sharp ratio | 0.01- | 0.07 | 0.04- | 0.01- | 0.04 | 0.01- | 0.06- | 0.03 | 0.03- | 0.11- | 0.01- | 0.02- | |
Absolute rate of return of seasonal return | 40.91 | 54.55 | 18.18 | 40.91 | 40.91 | 31.82 | 36.36 | 50.00 | 31.82 | 40.90 | 50.00 | 31.82 | |
Relative rate of return of seasonal return | 31.82 | 36.36 | 31.82 | 27.27 | 31.82 | 27.27 | 22.73 | 36.36 | 27.27 | 22.73 | 27.27 | 27.27 | |
Lowest seasonal rate of return | 6.74- | 25.38- | 14.50- | 7.76- | 20.04- | 13.67- | 9.82- | 17.06- | 9.13- | 10.72- | 12.90- | 11.45- | |
Highest seasonal rate of return | 21.93 | 69.25 | 41.58 | 20.85 | 45.09 | 41.58 | 14.81 | 13.76 | 15.87 | 10.02 | 11.60 | 15.15 | |
Average annual rate of return | 3.21 | 16.3 | 09.3 | 13.2 |
Table 8: Evaluation of Different Portfolios Under Different Conditions of Optimal Stock Selection in All Industries |
Portfolio set | Up to 5 companies | Up to 10 companies | Up to 15 companies | Up to 20 companies | ||||||||
Optimal conditions in FBI algorithm | AGA > 6.61 CFON > 15.28 GMG > 1.33 | CFO> 12.35 GMG > 8.45 CFOS > 25112 | CAD>10.30 GOM >2.11 RAR> 1.10 |
IER<50.25 ITU>3.89 | ||||||||
Portfolio selection | EW | MV | HRP | EW | MV | HRP | EW | MV | HRP | EW | MV | HRP |
Average seasonal return | 0.52 | 1.16 | 1.97- | 0.39- | 0.52 | 1.16 | 1.97- | 0.39- | 0.52 | 1.16 | 1.97- | 0.39- |
Standard deviation of seasonal return | 0.13 | 0.20 | 0.14 | 0.09 | 0.13 | 0.20 | 0.14 | 0.09 | 0.13 | 0.20 | 0.14 | 0.09 |
Annual return | 3.04 | 2.76 | 1.88 | 2.76 | 3.04 | 2.76 | 1.88 | 2.76 | 3.04 | 2.76 | 1.88 | 2.76 |
Sharp ratio | 0.01 | 0.02 | 0.08- | 0.03- | 0.01 | 0.02 | 0.08- | 0.03- | 0.01 | 0.02 | 0.08- | 0.03- |
Absolute rate of return of seasonal return | 40.91 | 31.82 | 36.36 | 31.82 | 40.91 | 31.82 | 36.36 | 31.82 | 40.91 | 31.82 | 36.36 | 31.82 |
Relative rate of return of seasonal return | 36.36 | 40.91 | 31.82 | 40.91 | 36.36 | 40.91 | 31.82 | 40.91 | 36.36 | 40.91 | 31.82 | 40.91 |
Lowest seasonal rate of return | 23.73- | 33.06 | 32.96- | 16.16- | 23.73- | 33.06 | 32.96- | 16.16- | 23.73- | 33.06 | 32.96- | 16.16- |
Highest seasonal rate of return | 32.86 | 37.89 | 29.89 | 17.72- | 32.86 | 37.89 | 29.89 | 17.72- | 32.86 | 37.89 | 29.89 | 17.72- |
Average annual rate of return | 2.56 | 3.04 | 28.3 | 89.2 |
The continuation of this evaluation and comparison—considering various measures of optimal portfolio return and selection criteria based on the FBI Index across all industries (financial and non-financial) according to the three portfolio management approaches is summarized in Table 8.
A) Optimal Investment Strategy in the Financial Industry:
The portfolio management findings for the financial industry, summarized in Table 7, indicate that for stocks of companies active in banking, investment firms, mutual funds, and insurance sectors, the FBI algorithm identified optimal stock selection criteria under specific constraints. These criteria were based on financial indicators including Return on Equity (ROE), Operating Cash Flow Rate (CFO), and Operating Cash Flow per Share (CFOS), applied to portfolios comprising up to 5, 10, 15, and 20 companies. Based on the calculations, the optimal portfolio consists of stocks from up to five companies with a return on equity (ROE) exceeding 13.1%. Using the mean-variance (MV) approach to determine the optimal investment combination, this portfolio achieved the highest absolute quarterly return of 54.55% and the highest relative quarterly return of 36.36%. Additionally, Table 6 shows that most stock selection criteria identified by the FBI algorithm for companies in the financial industry involve financial ratios related to operating profit and operating cash flow. This highlights the importance of these indicators as key financial metrics for identifying companies with favorable investment potential in the financial sector.
B) Optimal investment strategy in all industries:
Based on Table 8, portfolio management and optimal investment combination selection were analyzed across all industries. The analysis revealed that the best overall performance was achieved under the following conditions: (1) operating to non-operating cash flow ratio exceeding 35.21%, (2) financial cost to profit ratio greater than 50.25, (3) return on assets of 3.89, and (4) a portfolio comprising up to 20 companies selected using the FBI algorithm. Notably, the best-performing strategy was identified by applying a condition of an operating to non-operating cash flow ratio greater than 35%, based on the FBI algorithm for a portfolio of up to 20 companies. Finally, the Hierarchical Risk Parity (HRP) portfolio management approach was employed to evaluate the best stock selection strategies within both the financial industry and across all industries in the experimental dataset. As shown in Table 7, the optimal stock selection criteria identified by the FBI algorithm for all companies are based on financial ratios including the operating to non-operating cash flow ratio, the financial cost to profit ratio, and the return on inventory. The analysis revealed that the operating to non-operating cash flow ratio was the most decisive factor in stock evaluation.
4.6. Retesting Portfolio Management in Industries
Finally, to validate the portfolio management findings, the optimal conditions and stock selection strategies for both the financial industry and all industries were retested and reevaluated using stock prices and financial statement data of the companies for the period ending 29/12/1401. The summarized results are presented in Table 8. In these selections, companies were initially chosen randomly, and the optimal stock weights for the desired investment combination were determined using the mean-variance (MV) approach. The evaluation results were then compared with two portfolios consisting of the top 30 and top 50 companies, based on the Stock Exchange Organization’s classification for the fiscal year ending 29/12/1401. These selections were compared under two scenarios: random selection and selection based on the FBI decision-making algorithm, with their outcomes subsequently evaluated.
Table 9: Portfolio Management Retest in the Financial Industry and All Industries Compared to Market Performance |
Investment Opportunities | Portfolio Management Based on the Best Investment combination | Market Performance | ||||
Industry | Financial Industry | All Industries | Top 50 Companies | Top 30 Companies | ||
Portfolio Strategy | At least 10 | random | At least 10 | random | - | - |
FBI Algorithm Conditions | ROE>5.35 | ------- | CFON > 15.28 | -------- | -------- | -------- |
Portfolio Management | MV | MV | HRP | MV | Market weighted value | Expected weighted value |
Average Seasonal Return | 13.03 | 1.54 | 10.76 | 5.27 | 7.31 | 4.52 |
Standard Deviation of Seasonal Return | 0.22 | 0.08 | 0.18 | 0.13 | 0.13 | 0.10 |
Annual Return | 14.44 | 7.53 | 13.28 | 9.61 | 11.48 | 10.00 |
Sharp Ratio | 0.29 | 0.09 | 0.29 | 0.19 | 0.26 | 0.22 |
Absolute Seasonal Return Rate | 66.67 | 55.56 | 77.78 | 77.78 | 77.78 | 77.78 |
Relative Seasonal Return Rate | 55.56 | 22.22 | 55.56 | 44.44 | ---- | ----- |
Lowest Seasonal Return Rate | 15.54- | 9.26- | 22.39- | 15.60- | 19.17- | 15.36- |
Highest Seasonal Return Rate | 56.10 | 13.47 | 38.52 | 24.99 | 26.33 | 16.69 |
Average Annual Return Rate | 51.77 | 48.80 | 506.32 | 155.88 | ---- | ----- |
Analysis of the findings in Table 9 from this portfolio management reassessment revealed that the best stock selection conditions were based on maximizing the internal rate of return (IRR) during the training phase. This was achieved using weighted allocation methods with the mean-variance (MV) algorithm for the financial industry and the hierarchical risk parity (HRP) algorithm for all industries. In the retest phase, the performance of stock selection conditions combined with two weight allocation methods was reevaluated. Using the mean-variance (MV) method for the financial industry and the hierarchical risk parity (HRP) algorithm for all industries, the best stock selection conditions outperformed random investment combinations and portfolios of the top 30 or top 50 listed companies, delivering superior returns across nine performance metrics and achieving a higher internal rate of return (IRR). Despite selecting fewer companies, Table 8 demonstrates that the mean-variance (MV) model for the financial industry portfolio—achieving an IRR of 14.44%—yields the highest return, which is double that of the benchmark model. The Sharpe ratio of this model also exceeds that of models based on the average and expected performance of the top-listed companies, indicating superior risk-adjusted returns. Notably, the highest historical return was approximately 30% higher than the average performance of the top 50 companies. These findings suggest that the proposed investment strategy can achieve higher cumulative returns while maintaining a comparable level of risk. Across all industries, the internal rate of return (IRR) under the optimal stock selection conditions and the Hierarchical Risk Parity (HRP) portfolio management algorithm was 13.28%, outperforming the average and expected returns of the top-listed companies. However, it was slightly lower than the optimal investment combination derived from simulation and the mean-variance (MV) model for the financial industry. Additionally, the Sharpe ratio of the best strategy exceeded that of the average and expected performance of the top-listed companies, indicating higher profitability per unit of risk. The analysis also revealed a positive return rate of 77.78% and a relative winning rate of 55.56%, demonstrating superior performance compared to the top-listed companies and underscoring the strategy’s effectiveness and profitability. Cumulative returns, optimal stock selection criteria, and historical drawdown charts are presented to illustrate the internal rate of return (IRR) and risk profiles for the financial industry and all industries compared to benchmark strategies. These analyses offer investors a reference point for assessing the effectiveness and feasibility of the proposed investment approach.
During the COVID-19 period, amid a sharp market downturn, the maximum drawdown for the financial industry portfolio using the mean-variance (MV) model and optimal conditions was 33%. In contrast, the strategy employing the Hierarchical Risk Parity (HRP) algorithm across all stocks experienced a maximum drawdown exceeding 35%. This suggests that concentrating investments in a select number of financial industry stocks can enhance portfolio resilience during market crashes. Other external factors, such as interest rates or potential economic crises including war, political agreements, and related events also influence market conditions. These represent systematic investment risks beyond shareholders' control and were not present during the study period. However, Table 8 shows that the average target purchase prices under financial industry stock investment strategies were significantly lower than those for all-stock strategies, making financial industry stocks more accessible for retail investors. Therefore, retail investors can apply the proposed strategies to build financial sector portfolios that outperform ETFs.
5 Discussion and Conclusions
This study employs a meta-heuristic algorithm combining machine learning and artificial intelligence to optimize a multi-factor portfolio investment model. Using key financial indicators, the approach aims to maximize investment returns based on a medium- to long-term investment horizon this approach establishes a comprehensive framework for constructing a profitable investment portfolio focused on the Iranian capital market, targeting top Iranian listed companies based on the 1401 classification. The framework leverages long-term price volatility patterns, reflecting each company's intrinsic health and fundamental analysis. This approach enables the identification of undervalued companies in the trading markets, facilitating returns through strategic investment in these firms. By applying portfolio optimization theory, it reduces the time needed for manual data analysis and enhances investment performance. The proposed model’s effectiveness has been validated using top companies listed on the Tehran Stock Exchange. The research results demonstrated that applying knowledge domain analysis through content analysis effectively identified stock return metrics and factors influencing the financial performance of selected listed companies. Additionally, integrating three deep learning algorithms Random Forest (RF), Extreme Gradient Boosting (XGBoost), and Light Gradient Boosting Machine (LightGBM) proved successful in refining these influential factors. This research stands out by integrating financial analysis, advanced decision tree-based machine learning techniques for feature engineering, and sophisticated optimization algorithms to define stock selection criteria. A unique contribution is the development of portfolio candidate selection criteria based on three core elements: selection, operator, and threshold. The study employs the FBI algorithm to dynamically identify optimal stock selection conditions, offering an innovative solution to the complexities of stock pre-selection and defining the initial feasible investment universe. Furthermore, this study employs three portfolio allocation methods1) Equal Weight (EW), 2) Mean-Variance (MV), and 3) Hierarchical Risk Parity (HRP) to optimize the combined weights of constituent stocks, forming a comprehensive and practical portfolio. The integrated model addresses the research gap in medium- to long-term investment and stock pre-selection, particularly within the Iranian capital market, representing an emerging and underdeveloped market. By developing an AI-based methodology incorporating fundamental analysis to assess a company’s intrinsic health, this framework introduces an innovative approach to formulating stock selection criteria that effectively predict future returns. In this study, consistent with the predictions of Salo et al. (2024) and Novikov and Bilson (2024), financial performance, liquidity, and financial analysis criteria were selected, while corporate governance criteria were excluded due to their limited market understanding and low influence on individual and corporate decision-making [19,22]. It is recommended that investment companies, policymakers, and regulatory bodies: First, place greater emphasis on these criteria to identify viable investment options and determine the optimal portfolio composition. Second, financial analysts should regularly provide detailed analytical reports and rank companies accordingly. Additionally, they should promote awareness of the importance of corporate governance, as weaknesses in this area can lead to manipulation and distortion, ultimately undermining the reliability of performance and liquidity indicators additionally, it is recommended that policymakers, regulatory bodies, and capital market analysts use the following criteria to assess and evaluate investment returns:
1. Average quarterly return
2. Standard deviation of quarterly return
3. Annual return
4. Sharpe ratio
5. Absolute quarterly return rate
6. Relative quarterly return rate
7. Lowest quarterly return rate
8. Highest quarterly return rate
9. Average annual return rate
Financial analysts and regulatory bodies should apply these criteria for ongoing evaluation, calculation, and ranking of companies. Based on the FBI algorithm results; capital market analysts, institutional investors, and policymakers are advised to localize Python software and develop an expert system or evaluation framework based on the FBI algorithm. This system should periodically assess companies active in the capital market, establish investment priorities, and enable more effective portfolio management, particularly for institutional investors, investment firms, and mutual funds. For future research, it is recommended to compare this method with other similar approaches.
References
[1] Alexander, G.J., Baptista, A.M., Economic implications of using a mean-VaR model for portfolio selection: A comparison with mean-variance analysis, Journal of Economic Dynamics and Control, 2002; 26(7–8):1159–1193. doi: 10.1016/S0165-1889(01)00041-0
[2] Alirezaei, S., Khodabakhshi Parijan, K., Kalaei, M., The impact of financial factors on sales forecasting with supervised machine learning methods: a case study of food and beverage companies admitted to the Tehran Stock Exchange, Advances in Mathematical Finance and Applications (AMFA), 2025; 4(1): 117-136. doi: https://sanad.iau.ir/en/Article/1186785
[3] Breiman, L., Random Forest, Machine Learning, 2001;45(1):5–32. doi: 10.1023/A:1010933404324
[4] Bustos, O., Pomares-Quimbaya, A., Stock market movement forecast: A systematic review, Expert Systems with Applications, 2020;156:113464. doi: 10.1016/j.eswa.2020.113464
[5] Chen, J., Yeh, C., Tan, J., Ferrer, R., Using publicly available satellite imagery and deep learning to understand economic well-being in Africa, Nat Commun, 2020;11(1):1–9. doi: 10.1038/s41467-020-16185-w
[6] Chen, T., Guestrin, C., XGBoost: A scalable tree boosting system, In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD’16), 2016; 785–794. doi: 10.1145/2939672.2939785
[7] Chen, W., Zhang, H., Kumar, M., Jia, L., Mean–variance portfolio optimization using machine learning-based stock price prediction, Applied Soft Computing, 2021;100:106943. Doi: 10.1016/j.asoc.2020.106943
[8] Chou, J.S., Chen, K.E., Optimizing investment portfolios with a sequential ensemble of decision tree‑based models and the FBI algorithm for efficient financial analysis, Applied Soft Computing, 2024; 158:111550. doi: 10.1016/j.asoc.2024.111550
[9] Chou, J.S., Nguyen, N.M., FBI inspired meta optimization, Applied Soft Computing, 2020;106339. doi: 10.1016/j.asoc.2020.106339
[10] Firouz, A., FarizinFar, A.A., Ghodrati, H., Identification Reporting Readability Measurement Metrics and Factors Affecting the Cost of Capital Based on Knowledge Domain Analysis Using Content Analysis, Dynamic management and business analysis, 2024;3(5):290–312. doi: 10.22034/dmbaj.2025.2049905.1227 (In Persian)
[11] Gopinathan, R., Durai, S.R.S., Stock market and macroeconomic variables: New evidence from India, Financial Innovation, 2019;5(1):29. doi: 10.1186/s40854-019-0145-1
[12] Hiransha, M., Gopalakrishnan, E.A., Menon, V.K., Soman, K.P., NSE stock market prediction using deep-learning models, Procedia Computer Science, 2018;132:1351–1362. doi: 10.1016/j.procs.2018.05.050
[13] Jamshidi Eini, E., Khaloozadeh, H., The Tail Mean-Variance Model and Extended Efficient Frontier. Advances in Mathematical Finance and Applications (AMFA), 2021;6(1): 179-193. doi: https://sanad.iau.ir/en/Article/914486
[14] Kaczmarek, T., Perez, K., Building portfolios based on machine learning predictions, Economic Research Ekonomska Istraživanja, 2021; 35(1): 19–37. doi:10.1080/1331677x.2021.1875865
[15] Kapsos, M., Christofides, N., Rustem, B., Worst-case robust Omega ratio, European Journal of Operational Research, 2014; 234(2): 499-507. doi: 10.1016/j.ejor.2013.04.025
[16] Ke, G., Meng, Q., Finley, T., Wang, T., Chen, W., Ma, W., Ye, Q., Liu, TY., LightGBM: A highly efficient gradient boosting decision tree, Advances in Neural Information Processing Systems, 2017;30:3146–3154. doi: 10.48550/arXiv.1712.01017
[17] Konno, H., Yamazaki, H., Mean-absolute deviation portfolio optimization model and its applications to Tokyo stock market, Management Science, 1991;37(5):519–531. doi: 10.1287/mnsc.37.5.519
[18] Min, L., Dong, J., Liu, J., Gong, X., Robust mean‑risk portfolio optimization using machine learning‑based trade‑off parameter, Applied Soft Computing, 2021;113:107948. doi:10.1016/j.asoc.2021.107948
[19] Novykov, V., Bilson, C., Deep learning applications in investment portfolio management: a systematic literature review, Journal of Accounting Literature, 2024; 47(2):245–276. Doi: 10.1108/JAL-07-2023-0119
[20] Paiva, F.D., Cardoso, R.T.N., Hanaoka, G.P., Duarte, WM., Decision-making for financial trading: A fusion approach of machine learning and portfolio selection, Expert Systems with Applications, 2019;115:635–655. doi: 10.1016/j.eswa.2018.08.003
[21] Rockafellar, R.T., Uryasev, S., Optimization of conditional value-at-risk, Journal of Risk, 2000; 2(3): 21–41. doi: 10.21314/JOR.2000.038
[22] Salo, A., Doumpos, M., Liesiö, J., Zopounidis, C., Fifty years of portfolio optimization, European Journal of Operational Research, 2024; 318(1): 1–18. doi: 10.1016/j.ejor.2023.12.031
[23] Shirtavani, S., Homayoonfar, M., Azadi, K., Daneshvar, A., Developing a Model to Analyze Decision Maker's Preference in Portfolio Selection, Advances in Mathematical Finance and Applications, 2023;15(2). doi: https://sanad.iau.ir/en/Article/1189992
[24] Wang, M., Zhang, L., Liu, M., Zhang, D., A survey on deep learning for neuroimaging-based brain disorder analysis, Frontiers in Neuroscience, 2020; 14:779. doi: 10.3389/fnins.2020.00779
| |||||||
|