Financial Analytics
AI-Based Stock Risk Classification and Portfolio Analysis: A Review of Machine Learning, Deep Learning, Risk Measures, and Portfolio Optimization Approaches
Department of Information Technology, Siddhant College of Engineering, Pune, Maharashtra, India
Published October 2026
Abstract
Stock market investment is characterized by uncertainty arising from price volatility, market conditions, company performance, economic events, and changing investor behaviour. Traditional stock applications generally emphasize price and profit/loss information, while risk at the individual-stock and portfolio levels may receive less direct attention. This review examines the approaches presented in the selected research papers and relates them to the proposed problem of AI-Based Stock Risk Classification and Portfolio Analysis. The reviewed works cover deep learning for stock selection and prediction, machine-learning-based covariance estimation, Conditional Value-at-Risk (CVaR) optimization with direct reinforcement learning, LSTM-based portfolio platforms, and combinations of recurrent neural networks with genetic algorithms. The literature indicates that AI models can improve prediction, adaptive risk estimation, and portfolio decision support, but the reviewed studies generally address different parts of the investment pipeline rather than a unified stock-level Low/Medium/High risk classification followed by portfolio-level risk analysis. Based on this gap, an integrated framework is identified in which historical stock data are preprocessed, financial risk indicators such as returns, volatility, moving averages, RSI, beta, and maximum drawdown are derived, machine learning is used to classify stocks into risk categories, and portfolio concentration, diversification, and overall risk exposure are subsequently analyzed. The review also highlights important limitations, including dependence on historical data, market-regime changes, transaction costs, model generalization, and the difficulty of defining reliable risk labels.
Keywords: Artificial Intelligence; Machine Learning; Stock Risk Classification; Portfolio Analysis; Risk Management; Volatility; Beta; Maximum Drawdown; CVaR; LSTM; CNN-LSTM; Genetic Algorithm
1Introduction
Portfolio management requires decisions that balance expected return against uncertainty and downside exposure. The reviewed literature consistently treats stock selection and portfolio allocation as difficult problems because financial time series are nonlinear, noisy, non-stationary, and affected by changing market conditions. The CNN-LSTM study explicitly combines stock prediction with portfolio construction and notes that the quality of asset selection is important before applying portfolio optimization [1]. Similarly, the adaptive portfolio platform study identifies risk and investor participation as challenging aspects of portfolio management and combines stock-price prediction with an operational portfolio-management platform [2].
The proposed project extends this line of research by shifting the primary focus from price prediction alone to explicit stock-risk classification and portfolio-level risk interpretation. The project synopsis specifies an AI-based desktop application that processes historical market data, derives returns, volatility, moving averages, RSI, beta, and maximum drawdown, classifies stocks into Low, Medium, and High Risk categories, and analyzes portfolio concentration, diversification, and overall risk exposure [6]. The planned machine-learning component identifies Random Forest as a primary classification method, Decision Tree as an interpretable comparison model, and K-Means as an optional grouping technique, with Accuracy, Precision, Recall, F1-Score, and a Confusion Matrix for evaluation [6].
A critical reading of the reviewed papers shows that the proposed project should not be framed simply as another stock-price prediction system. The more defensible contribution is the integration of interpretable risk indicators, machine-learning classification, and portfolio-level analysis in one workflow. At the same time, a major methodological issue must be addressed: risk classes cannot be treated as naturally existing labels unless the study defines how Low, Medium, and High Risk are constructed. Therefore, label generation, temporal validation, avoidance of data leakage, and the distinction between prediction accuracy and actual investment usefulness are central concerns for future implementation.
2Literature review
2.1Deep learning for stock selection and portfolio formation
Singh et al. proposed a two-stage CNN-LSTM plus Mean-Variance framework for stock selection and portfolio optimization. The study used 21 stocks from the National Stock Exchange of India covering January 2005 to December 2021 and considered 13 input features consisting of technical and fundamental indicators. The CNN-LSTM architecture combines CNN-based feature extraction with LSTM-based sequential learning. The authors compared CNN-LSTM against individual CNN and LSTM models using six predictive measures and 10-fold cross-validation. The shortlisted stocks were then passed to a Mean-Variance portfolio model. The study reported an average annualized cumulative return of 25.39% for the proposed CNN-LSTM+MV approach, compared with 24.45% for LSTM+MV, 23.91% for CNN+MV, 19.5% for Random+MV, and 24.01% for CNN-LSTM+1/N [1].
For the present topic, the key lesson is architectural rather than numerical: stock-level modelling and portfolio-level optimization can be separated into stages. However, the study primarily ranks stocks by predicted return and does not provide an explicit Low/Medium/High risk classifier for individual stocks. Consequently, a risk-classification layer can be considered complementary to, rather than a replacement for, return prediction.
2.2Machine learning for covariance and portfolio risk
Benli et al. investigated machine-learning-driven prediction of time-varying covariance matrices for portfolio construction, risk budgeting, and automated advisory services. The framework processes high-frequency equity data, applies multiple imputation and normalization techniques, and evaluates linear and penalized regressions, Random Forest, XGBoost, LightGBM, CatBoost, and Support Vector Regression. The study reports that LightGBM and SVR reduced out-of-sample covariance prediction error by up to 35% relative to classical benchmarks in its Turkish insurance-equity setting. The predicted covariance matrices were embedded into Markowitz Mean-Variance, Black-Litterman, Minimum-Variance, Risk Parity, and CVaR optimization engines. Risk Parity produced the most consistent variance reduction across the examined stock pairs [3].
This paper is highly relevant to portfolio analysis because it demonstrates that individual asset characteristics are insufficient when portfolio-level dependence is ignored. The covariance matrix captures how assets move together, which directly affects diversification and aggregate portfolio risk. An important additional finding is that day-to-day return sign changes can create structural breaks that generic regressors may miss; the authors therefore describe a volatility-state classifier followed by regime-specific learners as a way to improve turning-point detection [3]. This supports the use of risk regimes in the proposed project, but it also warns that a static classification model may fail when market conditions change.
2.3CVaR and risk-sensitive reinforcement learning
Alameer and Alshehri proposed a convex trading system using Conditional Value-at-Risk as a risk-adjusted performance measure within Direct Reinforcement Learning. The method learns and updates its policy online and was evaluated on SPDR (SPY) price data from August 2018 to August 2021 at 15-minute intervals. The study incorporated transaction costs of 0.05%, 0.10%, and 0.15% per trade and varied the risk-aversion parameter. The authors observed that increasing risk aversion reduced downside variability and maximum drawdown, while the risk-neutral configuration produced the highest total return but a substantially larger maximum drawdown [4].
For stock risk classification, CVaR is valuable because it focuses on losses in the tail of the loss distribution rather than treating all deviations symmetrically. Nevertheless, CVaR is a portfolio or loss-distribution risk measure and should not be confused with a simple categorical label for an individual stock. A practical classification system can instead use CVaR as one input or validation measure for the risk labels, while preserving simpler indicators such as volatility, beta, and maximum drawdown for interpretability.
2.4LSTM-based portfolio management platforms
Nanayakkara et al. presented an adaptive stock-market portfolio management and stock-price prediction platform for the Colombo Stock Exchange. The system combined a Brownian Motion-based model and an LSTM model and described a web/mobile-oriented portfolio-management architecture. The paper reports testing of the prediction modules and states that the LSTM and Brownian Motion models achieved more than 85% accuracy in the reported forecasting tests. The study also describes deployment on Microsoft Azure and emphasizes the need for portfolio-management capabilities alongside stock prediction [2].
The contribution relevant to the proposed work is the transition from an isolated prediction model to an end-to-end decision-support platform. However, the reported forecasting accuracy does not by itself establish that the system provides superior risk management. For the present project, evaluation should therefore include classification quality and portfolio-risk measures rather than relying only on price-prediction accuracy.
2.5ANN and genetic algorithm-based portfolio optimization
Solin et al. combined an Artificial Neural Network for future stock-value prediction with a Genetic Algorithm for portfolio formation. The stated objective was to obtain high return with minimum risk, and the study compared the genetic-algorithm approach with a Single Index Model. The reported results indicated that GA produced a better optimization index than the SIM alternative [5].
Muganda and Kasamani extended the prediction-plus-optimization concept using an LSTM-based recurrent neural network and a Genetic Algorithm within a parallel-computing framework. The RNN was trained on ten years of asset-price data, and the predicted values were supplied to the GA to find allocations for return-maximization or risk-minimization objectives. The reported LSTM RMSE values ranged from 2.25 to 5.62 for the examined energy-spread assets, while parallelization reduced computational time by roughly 12 to 20 times across the tested horizons [7].
These studies support the feasibility of combining prediction and optimization, but they also demonstrate that optimization objective and asset universe strongly influence the final portfolio. For the proposed risk-classification system, optimization should therefore be treated as a later decision layer, after the risk characteristics of individual holdings have been identified.
3Comparative analysis and discussion
3.1Comparison of reviewed approaches
| Study | Data / Market | AI Method | Risk / Portfolio Method | Main Outcome | Relevance |
|---|---|---|---|---|---|
| Singh et al. [1] | 21 NSE stocks; 2005–2021 | CNN-LSTM | Mean-Variance | 25.39% average annualized cumulative return for CNN-LSTM+MV | Stock selection + portfolio |
| Nanayakkara et al. [2] | Colombo Stock Exchange | LSTM + Brownian Motion | Portfolio platform | >85% reported prediction accuracy in tests | Integrated platform |
| Benli et al. [3] | Turkish insurance equities; high-frequency data | RF, XGBoost, LightGBM, CatBoost, SVR | MV, Black-Litterman, Min-Var, Risk Parity, CVaR | Up to 35% lower covariance error; Risk Parity often strongest | Portfolio risk |
| Alameer & Alshehri [4] | SPY; 15-min data; 2018–2021 | Direct RL | CVaR + risk aversion | Higher risk aversion reduced downside risk/MDD | Downside risk |
| Solin et al. [5] | Stock portfolio setting | ANN | Genetic Algorithm | GA reported better optimization index than SIM | Return-risk optimization |
| Muganda & Kasamani [7] | 10 years; energy spreads | LSTM/RNN | Genetic Algorithm + parallelization | 12–20× computational speedup reported | AI allocation architecture |
3.2Common findings
Across the reviewed literature (Table 1), five common findings emerge. First, AI methods are increasingly used because financial data contain nonlinear and temporal relationships that are difficult to model with simple static approaches. Second, prediction and portfolio optimization are frequently separated into stages: a model predicts returns or prices, followed by a portfolio model that determines allocation [1, 5, 7]. Third, risk-aware methods such as covariance estimation, Risk Parity, and CVaR are important because maximizing predicted return alone can produce undesirable downside exposure [3, 4]. Fourth, market-regime changes remain a major weakness; the covariance study explicitly identifies structural breaks and the CVaR study demonstrates different behaviour under different risk-aversion levels [3, 4]. Fifth, practical systems require more than an algorithm: data preprocessing, visualization, user interaction, and deployment are important components of an operational portfolio-analysis platform [2, 6].
3.3Critical limitations of existing approaches
The first limitation is that most reviewed studies do not directly solve the exact problem of stock-level risk classification into Low, Medium, and High categories. The CNN-LSTM study selects stocks based primarily on predicted returns, the covariance study estimates relationships between assets, the CVaR study optimizes downside risk, and the LSTM platform focuses on price prediction and portfolio functionality. These are related but not equivalent tasks.
The second limitation is generalization. The reviewed experiments use different markets and asset types, including NSE equities, Colombo Stock Exchange stocks, Turkish insurance equities, SPY, and energy spreads. A model that performs well in one market may not retain the same performance under another market regime. The CNN-LSTM paper itself acknowledges that its results are based on 21 Indian-market datasets and that broader geographical and economic generalization requires additional study [1].
The third limitation concerns evaluation. Prediction metrics such as MAE, RMSE, MAPE, and R2 are useful for forecasting, but they do not directly measure whether a risk classification is economically meaningful. Likewise, a high portfolio return can coexist with unacceptable drawdown. The reviewed studies demonstrate why return should be considered together with risk measures such as volatility, maximum drawdown, Sharpe ratio, covariance, and CVaR [1, 3, 4].
The fourth and most important limitation for the proposed project is label construction. If Low, Medium, and High Risk labels are generated from the same indicators that are later supplied to the classifier, a model can appear highly accurate without demonstrating genuine predictive value. The project should therefore define labels using a transparent rule or future-window outcome and ensure that training features are calculated only from information available at the prediction date.
4Proposed review-based framework for the target project
4.1System architecture
The reviewed evidence supports a layered architecture for the proposed application: Stock Data Collection → Data Cleaning and Preprocessing → Feature Engineering → Risk Indicator Calculation → Machine Learning Risk Classification → Portfolio Risk Analysis → Visualization and Dashboard → Risk-Analysis Report. This workflow follows the project synopsis and combines the strongest complementary ideas from the reviewed papers rather than copying any one model [6].
At the stock level, the system can calculate daily or periodic return, rolling volatility, moving averages, RSI, beta, and maximum drawdown. These indicators provide interpretable evidence for risk classification. At the portfolio level, the system can aggregate holdings by investment value, compute concentration and diversification measures, and identify holdings that contribute relatively high risk [6]. The covariance perspective from Benli et al. can be incorporated as an advanced portfolio-risk layer, while CVaR can be used as an optional downside-risk indicator for validation or future optimization [3, 4].
4.2Machine learning classification layer
The project synopsis proposes Random Forest as the primary classifier, Decision Tree as an interpretable comparison model, and K-Means as an optional method for grouping stocks with similar risk characteristics [6]. Random Forest is suitable for a first implementation because it can model nonlinear interactions among risk indicators while retaining a relatively straightforward training and inference workflow. Decision Tree can provide a more transparent explanation of individual classifications. K-Means should be treated cautiously: clustering does not automatically produce economically meaningful risk categories and should therefore be interpreted as exploratory grouping rather than a substitute for supervised classification.
The classification output should include both a categorical risk level and supporting indicators. For example, the dashboard can display Risk Class = Low/Medium/High together with volatility, beta, maximum drawdown, RSI, return, and a model confidence or probability where available. This is preferable to presenting a single unexplained label.
4.3Portfolio risk analysis layer
After individual stocks are classified, the portfolio module should calculate exposure by stock and by risk class. Useful outputs include the percentage of portfolio value in each risk category, concentration of the largest holdings, diversification across securities or sectors where data are available, portfolio volatility, and the contribution of individual holdings to overall risk. The covariance-based approach reviewed in [3] indicates why portfolio-level relationships should be considered in addition to standalone stock indicators.
A useful extension is to compare portfolios constructed from different risk-class constraints, such as unrestricted allocation, low-risk-biased allocation, and diversified allocation. However, this should be evaluated as a portfolio-analysis experiment rather than assumed to improve investment performance. The reviewed literature shows that optimization outcomes depend on the objective, constraints, transaction costs, and market environment [1, 3, 4, 7].
5Evaluation strategy
5.1Classification evaluation
The project synopsis specifies Accuracy, Precision, Recall, F1-Score, and a Confusion Matrix for evaluating the machine-learning classifier [6]. For a three-class risk problem, macro-averaged precision, recall, and F1-score should also be reported so that a dominant class does not hide poor performance on a smaller risk category. The dataset should be split chronologically rather than randomly whenever future information is being predicted, because random shuffling can introduce temporal leakage in financial time series.
5.2Financial and portfolio evaluation
Classification accuracy should not be the only evaluation criterion. Portfolio analysis should report return, volatility, maximum drawdown, Sharpe ratio where an appropriate risk-free benchmark is available, and optionally VaR/CVaR. The reviewed papers show the value of reporting several measures simultaneously: Singh et al. use multiple prediction and portfolio measures, while Alameer and Alshehri examine downside variance and maximum drawdown under different risk-aversion settings [1, 4].
5.3Robustness and generalization
The proposed system should be tested across different time periods and, if possible, multiple sectors or markets. The covariance study demonstrates the importance of walk-forward evaluation and regime changes, while the CNN-LSTM study demonstrates the use of an unseen test portion and cross-validation for model comparison [1, 3]. A strong evaluation should therefore include an out-of-sample period, multiple market conditions, and comparison with simple baselines such as rule-based risk thresholds or a Decision Tree.
6Research gaps identified
- 1. Integrated stock-risk classification and portfolio analysis: The reviewed papers address prediction, covariance, CVaR, or optimization, but the reviewed literature does not present the exact end-to-end workflow of classifying individual stocks into Low/Medium/High Risk and then interpreting the combined portfolio exposure.
- 2. Transparent risk-label generation: A rigorous method for defining the target risk classes is essential. The proposed project must avoid labels that are arbitrary or directly derived from the same inputs used for classification.
- 3. Regime-aware classification: Structural breaks and changing volatility regimes can reduce the stability of a static classifier. The covariance study suggests that a volatility-state classification stage may improve turning-point detection [3].
- 4. Individual-stock versus portfolio risk: Stock-level indicators such as beta and volatility do not fully describe portfolio risk because correlations between holdings matter. Covariance and concentration analysis should therefore complement individual risk classes [3].
- 5. Practical interpretability: An academic desktop application should explain why a stock received a particular risk class instead of presenting a black-box prediction only. Decision Trees, feature importance, and indicator-level summaries can support this goal.
- 6. Economic validation: A classifier can achieve high statistical accuracy without improving portfolio outcomes. The final system should therefore distinguish classification performance from financial usefulness and report both.
7Discussion
The reviewed evidence suggests that the most appropriate design for the proposed project is not a single complex deep-learning model. Instead, a modular architecture is more defensible for an academic risk-analysis application. The first module should create clean and reproducible financial indicators; the second should classify risk; and the third should interpret the combined portfolio. This design is consistent with the staged structure used by Singh et al. for stock selection followed by portfolio optimization, while also incorporating the risk-sensitive perspective of the covariance and CVaR studies [1, 3, 4].
There is also a practical argument for starting with Random Forest and Decision Tree rather than immediately adopting CNN-LSTM or reinforcement learning. The proposed project is explicitly intended to classify risk categories using interpretable financial indicators and to provide a desktop dashboard [6]. Deep sequential models and reinforcement learning can be treated as future extensions after a reliable baseline has been established. This avoids the common mistake of using a sophisticated model when the central research problem—what constitutes Low, Medium, and High Risk—has not yet been defined rigorously.
A further lesson from the literature is that transaction costs and market conditions matter. The CVaR study explicitly incorporates transaction costs and shows different behaviour under different risk-aversion parameters, while the CNN-LSTM portfolio study reports results with and without transaction costs [1, 4]. Accordingly, any future portfolio-optimization extension should include realistic constraints and costs rather than presenting unconstrained theoretical allocations.
8Conclusion
This review examined research papers relevant to AI-Based Stock Risk Classification and Portfolio Analysis. The literature demonstrates substantial progress in AI-based stock prediction, portfolio optimization, covariance estimation, downside-risk management, and automated advisory systems. CNN-LSTM models can support stock selection and Mean-Variance portfolio formation; machine learning can forecast covariance inputs for several allocation models; CVaR-based reinforcement learning can explicitly control downside risk; LSTM-based platforms can integrate prediction with portfolio-management functions; and ANN/LSTM combined with Genetic Algorithms can support portfolio optimization [1].–[5, 7]
However, the reviewed works do not directly establish a unified and interpretable stock-risk classification pipeline followed by portfolio-level risk analysis. This creates a meaningful research opportunity for the proposed project. The most important methodological requirement is to define Low, Medium, and High Risk labels transparently and evaluate them without temporal data leakage. The proposed system can then combine returns, volatility, moving averages, RSI, beta, and maximum drawdown with Random Forest and Decision Tree classification, followed by portfolio concentration, diversification, covariance, and downside-risk analysis [6].
The review therefore supports a practical, modular, and interpretable AI-based risk-analysis system rather than an assumption that the most complex AI algorithm will necessarily produce the best financial decisions. Future extensions may include regime-aware learning, live market feeds, sentiment information, advanced portfolio optimization, automated alerts, and deeper sequential models, which are also consistent with future directions identified in the reviewed research [3, 6].
References
- [1]Singh P, Jha M, Sharaf M, El-Meligy MA, Gadekallu TR. Harnessing a Hybrid CNN-LSTM Model for Portfolio Performance: A Case Study on Stock Selection and Optimization. IEEE Access. 2023;11. https://doi.org/10.1109/ACCESS.2023.3317953
- [2]Nanayakkara S, Wanniarachchi A, Vidanagama D. Adaptive Stock Market Portfolio Management and Stock Prices Prediction Platform for Colombo Stock Exchange of Sri Lanka. In: Proc. 5th SLAAI International Conference on Artificial Intelligence (SLAAI-ICAI). 2021. https://doi.org/10.1109/SLAAI-ICAI54477.2021.9664735
- [3]Benli H, Gunes P, Ulkgun M, Cakar T. Financial Inputs Prediction with Machine Learning and Covariance Matrix Applications. In: Proc. 2025 IEEE 5th International Conference on Software Engineering and Artificial Intelligence (SEAI). 2025. https://doi.org/10.1109/SEAI65851.2025.11108816
- [4]Alameer A, Alshehri K. Conditional Value-at-Risk for Quantitative Trading: A Direct Reinforcement Learning Approach. In: Proc. 2022 IEEE Conference on Control Technology and Applications (CCTA). 2022. p. 1208–1213. https://doi.org/10.1109/CCTA49430.2022.9966017
- [5]Solin MM, Alamsyah A, Rikumahu B, Saputra MAA. Forecasting Portfolio Optimization using Artificial Neural Network and Genetic Algorithm. In: Proc. IEEE International Conference on Information and Communication Technology (ICoICT). 2019.
- [6]Patil BN. AI-based stock risk classification and portfolio analysis [project synopsis]. M.E. (Information Technology), Siddhant College of Engineering, Pune; 2026.
- [7]Muganda BW, Kasamani BS. Parallel Programming for Portfolio Optimization: A Robo-Advisor Prototype using Genetic Algorithms with Recurrent Neural Networks. In: Proc. 2023 International Conference on Intelligent Computing, Communication, Networking and Services (ICCNS). 2023. https://doi.org/10.1109/ICCNS58795.2023.10193396