<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jmf
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Mathematical Finance
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2162-2434
   </issn>
   <issn publication-format="print">
    2162-2442
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jmf.2024.143016
   </article-id>
   <article-id pub-id-type="publisher-id">
    jmf-133998
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Business 
     </subject>
     <subject>
       Economics, Physics 
     </subject>
     <subject>
       Mathematics
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    Hybrid Data-Driven and Deep Learning Based Portfolio Optimization
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Joy Dip
      </surname>
      <given-names>
       Das
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff1"> 
      <sup>1</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Sulalitha
      </surname>
      <given-names>
       Bowala
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff2"> 
      <sup>2</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Ruppa K.
      </surname>
      <given-names>
       Thulasiram
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff1"> 
      <sup>1</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Aerambamoorthy
      </surname>
      <given-names>
       Thavaneswaran
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff2"> 
      <sup>2</sup>
     </xref>
    </contrib>
   </contrib-group> 
   <aff id="aff1">
    <addr-line>
     aDepartment of Computer Science, University of Manitoba, Winnipeg, Canada
    </addr-line> 
   </aff> 
   <aff id="aff2">
    <addr-line>
     aDepartment of Statistics, University of Manitoba, Winnipeg, Canada
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     20
    </day> 
    <month>
     06
    </month>
    <year>
     2024
    </year>
   </pub-date> 
   <volume>
    14
   </volume> 
   <issue>
    03
   </issue>
   <fpage>
    271
   </fpage>
   <lpage>
    310
   </lpage>
   <history>
    <date date-type="received">
     <day>
      21,
     </day>
     <month>
      February
     </month>
     <year>
      2024
     </year>
    </date>
    <date date-type="published">
     <day>
      21,
     </day>
     <month>
      February
     </month>
     <year>
      2024
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      21,
     </day>
     <month>
      June
     </month>
     <year>
      2024
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    This research introduces a novel hybrid architecture that combines deep learning, data-driven algorithms, and an affinity propagation-based approach to build robust investment portfolios. This study evaluates the efficacy of BiLSTM and BiGRU in constructing resilient portfolios of stocks from diverse sectors under varying market conditions. The results highlight the superior performance of BiGRU, particularly in dynamic and volatile market scenarios. The research emphasizes the importance of precise stock prediction and effective diversification for building resilient portfolios, leveraging advanced techniques from deep learning and data-driven optimization. Comparative analyses indicate similar performance between portfolios constructed with actual and predicted data using data-driven optimization. The findings offer valuable insights into constructing robust portfolios by employing advanced techniques, thereby enhancing decision-making in financial markets.
   </abstract>
   <kwd-group> 
    <kwd>
     BiLSTM
    </kwd> 
    <kwd>
      BiGRU
    </kwd> 
    <kwd>
      Affinity Propagation
    </kwd> 
    <kwd>
      Diversification
    </kwd> 
    <kwd>
      Data-Driven Algorithm
    </kwd> 
    <kwd>
      Portfolio Optimization
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>The stock market allows individuals and entities to buy and sell shares or ownership stakes in publicly traded companies. It enables companies to raise funds for expansions, research, and development by selling shares to interested investors. This market provides an avenue for individuals to potentially grow their wealth and plan for their financial future through smart investments. Market dynamics are influenced by diverse elements, including economic indicators, company performance, geopolitical events, and public sentiment. In simple terms, the stock market is like a giant puzzle with many pieces. Various stock products encompass a wide array of financial instruments available in the market. These products can include stocks of individual companies, exchange-traded funds (ETFs) which bundle multiple stocks, mutual funds comprising a diversified portfolio of stocks managed by professionals, and index funds tracking specific market indices. Portfolio optimization is a crucial concept in finance that involves strategically constructing an investment portfolio to achieve the best possible balance between risk and return. The primary objective is to maximize returns given a specific risk tolerance level or, conversely, reduce risk for a desired amount of return. Traditional portfolio optimization methods utilize mathematical models to assess the historical performance and correlation of assets, aiming to create diversified portfolios that offer optimal risk-return profiles. The process involves selecting a mix of assets that collectively reduce overall portfolio risk while maximizing potential returns. The Markowitz Portfolio Optimization <xref ref-type="bibr" rid="scirp.133998-1">
     [1]
    </xref> aims to develop investment portfolios through strategic diversification of assets. Its objective is to either maximize anticipated returns for a specified risk level or minimize risk for a targeted return. The resultant efficient frontier illustrates optimal trade-offs between risk and return. Expanding upon the foundations laid by Markowitz, Modern Portfolio Theory (MPT) <xref ref-type="bibr" rid="scirp.133998-2">
     [2]
    </xref> underscores the importance of diversification in attaining an ideal equilibrium between risk and return, taking into account the interrelation among diverse assets.</p>
   <p>The risk-free rate, market risk premium, and the beta associated with the individual asset are incorporated by the Capital Asset Pricing Model (CAPM) <xref ref-type="bibr" rid="scirp.133998-3">
     [3]
    </xref> <xref ref-type="bibr" rid="scirp.133998-4">
     [4]
    </xref> <xref ref-type="bibr" rid="scirp.133998-5">
     [5]
    </xref> <xref ref-type="bibr" rid="scirp.133998-6">
     [6]
    </xref> <xref ref-type="bibr" rid="scirp.133998-7">
     [7]
    </xref> for computing the expected yield of an asset. This facilitates the construction of portfolios by assessing the equilibrium between risk and anticipated returns. The CAPM revolutionized asset pricing theory; although widely taught and applied, its simplicity and intuitive appeal are marred by empirical challenges, notably poor performance in real-world applications, possibly stemming from inherent model limitations or inadequacies in market proxies used for testing and application. The Arbitrage Pricing Theory (APT) <xref ref-type="bibr" rid="scirp.133998-8">
     [8]
    </xref> extends the horizon of portfolio optimization by incorporating diverse factors influencing asset valuations. This allows for a thorough exploration of the interrelationship between risk and return within financial contexts. The Black-Litterman Model <xref ref-type="bibr" rid="scirp.133998-9">
     [9]
    </xref>, in the realm of dynamic management of portfolio emphasizing information utilization, operates within a Bayesian analytic framework, allowing the portfolio manager to express views, subsequently translated into security return forecasts, offering a theoretically and practically appealing tool for portfolio construction despite persisting challenges.</p>
   <p>Within the confines of a Markov-based framework characterized by switching regimes, a problem concerning the optimization of risk parity portfolios is formulated and addressed <xref ref-type="bibr" rid="scirp.133998-10">
     [10]
    </xref>. The aim is to augment the precision of parameter estimation and systematically alleviate the susceptibility of optimal portfolios to discrepancies in estimation. This methodology involves integrating a factor model associated with the switching of regimes, introducing market dynamics to refine parameter estimation, and subsequently applying this model for the optimization of risk parity. Concentrating on minimizing risk, Mean-Variance Portfolio optimization <xref ref-type="bibr" rid="scirp.133998-11">
     [11]
    </xref> aims to create a portfolio with the least volatility, regardless of anticipated returns. Monte Carlo simulation for portfolio optimization <xref ref-type="bibr" rid="scirp.133998-12">
     [12]
    </xref> involves utilizing random sampling to model various potential future scenarios, enabling a comprehensive analysis of portfolio risk and return by generating multiple simulated outcomes based on the specified parameters and assumptions. The conventional method of estimating asset weights includes creating portfolios with equal weights and inverse volatility weights <xref ref-type="bibr" rid="scirp.133998-13">
     [13]
    </xref>. Various alternative approaches, such as the enhancement of the Sharpe ratio (SRO), optimization of mean-variance (MVO), and portfolio construction through user constraints (CPO) have been explored in this context <xref ref-type="bibr" rid="scirp.133998-13">
     [13]
    </xref>. Sharpe <xref ref-type="bibr" rid="scirp.133998-14">
     [14]
    </xref> introduced a mathematical measure to assess portfolio performance, providing a framework for evaluating different portfolio optimization techniques.</p>
   <p>These traditional portfolio optimization methods explained above have a myriad of weaknesses in practical scenarios. One significant limitation of MVO and MPT lies in their sensitivity to input data, as reliance on historical information for expected returns and risk parameters can lead to suboptimal portfolios when market conditions deviate from historical patterns. Additionally, the assumption of normality in asset returns and the focus on mean and variance may not accurately capture the non-normal and complex distributions observed in real financial markets, resulting in misestimated risk. These methods often underestimate tail risks, neglecting the potential impact of extreme events on portfolio performance. Furthermore, their single-period analysis overlooks the dynamic nature of financial markets, and the static approach may not adapt well to changing economic environments over time.</p>
   <p>In finance, machine learning (ML) and deep learning (DL) algorithms, such as artificial neural networks (ANN), have proven valuable for predicting stock market changes <xref ref-type="bibr" rid="scirp.133998-15">
     [15]
    </xref>. These advanced approaches outperform traditional statistical methods due to their ability to handle the intricate, non-linear features present in highly dynamic stock market data <xref ref-type="bibr" rid="scirp.133998-16">
     [16]
    </xref> <xref ref-type="bibr" rid="scirp.133998-17">
     [17]
    </xref>. Unlike traditional methods relying on assumed data distributions, ML and DL algorithms adapt to changing market conditions, automatically extracting complex patterns for more accurate forecasting<sup>1</sup>. Moreover, these technologies extend beyond stock price prediction, finding applications in credit risk assessment, fraud detection, customer sentiment analysis, loan approvals, portfolio optimization, and market trend identification, enhancing decision-making and operational efficiency for financial institutions. In the domain of stock price prediction, a variety of ML-based regression techniques, including decision tree regression, random forest regression, etc. are employed <xref ref-type="bibr" rid="scirp.133998-18">
     [18]
    </xref>. Additionally, DL algorithms such as ANN, convolutional neural networks (CNN), and recurrent neural networks (RNN), specifically Long short-term memory (LSTM) and Gated Recurrent Unit (GRU), are favored due to having the ability to consider past temporal relationships between data points in stock market data <xref ref-type="bibr" rid="scirp.133998-19">
     [19]
    </xref>. These DL techniques, known for uncovering subtle patterns in financial data, also play a crucial role in predicting cryptocurrency prices, especially in highly volatile markets <xref ref-type="bibr" rid="scirp.133998-20">
     [20]
    </xref>.</p>
   <p>ML based portfolio optimization is garnering attention because of its potential for capturing intricate, non-linear information and vast datasets in financial markets, outperforming traditional methods. Designed to tackle challenges in portfolio optimization related to both mean-variance and mean conditional value at risk (CVaR), ML-based Performance-based regularization (PBR) has been developed <xref ref-type="bibr" rid="scirp.133998-21">
     [21]
    </xref>. Other than that, ML techniques are fused with MVO for designing portfolio investment strategies <xref ref-type="bibr" rid="scirp.133998-22">
     [22]
    </xref> <xref ref-type="bibr" rid="scirp.133998-23">
     [23]
    </xref>. DL models are utilized to directly optimize the Sharpe ratio <xref ref-type="bibr" rid="scirp.133998-24">
     [24]
    </xref>. Different RNN models such as LSTM and GRU are also heavily explored in portfolio optimization along with ensemble learning approaches <xref ref-type="bibr" rid="scirp.133998-25">
     [25]
    </xref>. Moreover, recent advances in hybridized ML and DL models have led researchers to explore the efficiency of various hybridized DL models for portfolio optimization <xref ref-type="bibr" rid="scirp.133998-26">
     [26]
    </xref>. The integration of ML and DL models could potentially lead to a prominent advancement across diverse domains. Hybridized DL algorithms are a prominent field of research in portfolio optimization and the development of investment strategies. Modified Deep Belief Networks and RNNs are heavily utilized in portfolio optimization <xref ref-type="bibr" rid="scirp.133998-27">
     [27]
    </xref>. Different models such as CNN and RNN are being fused for stock selection and optimization for the formation of profitable risk-averse portfolios <xref ref-type="bibr" rid="scirp.133998-28">
     [28]
    </xref>. Moreover, various heuristics are also being explored by the amalgamation of these with various deep-learning algorithms for portfolio optimization <xref ref-type="bibr" rid="scirp.133998-29">
     [29]
    </xref>.</p>
   <p>A novel data-driven strategy for assessing the risk associated with portfolios, which addresses the limitations of the conventional approaches has been presented in <xref ref-type="bibr" rid="scirp.133998-30">
     [30]
    </xref>. Based on this concept, an innovative data-dependent approach has been presented in <xref ref-type="bibr" rid="scirp.133998-31">
     [31]
    </xref> for constructing portfolios consisting of both traditional and cryptocurrencies. Their investigation <xref ref-type="bibr" rid="scirp.133998-31">
     [31]
    </xref> explored statistical risk metrics and put forth diverse statistical correlations for assessing portfolio composition grounded in these measures. Diversification plays a crucial role in building a robust portfolio. Choueifaty and Coignard <xref ref-type="bibr" rid="scirp.133998-32">
     [32]
    </xref> devised a mathematical conception of the “diversification ratio” for quantifying the diversity in a portfolio.</p>
   <p>Clustering techniques to study the impact of diversification on portfolio optimization techniques have been proposed in <xref ref-type="bibr" rid="scirp.133998-33">
     [33]
    </xref>. Furthermore, they studied the efficiency of multiple clustering techniques to test the efficacies of distinct clustering methods in increasing the profitability of the portfolios designed by both the traditional and the data-driven algorithms <xref ref-type="bibr" rid="scirp.133998-34">
     [34]
    </xref>.</p>
   <p>In the realm of portfolio optimization, traditional techniques face challenges related to the dynamic and non-linear nature of financial markets. Traditional methods often struggle with assumptions of normality, constant parameters, and neglect of transaction costs. Machine Learning approaches solve these issues with traditional portfolio construction techniques by considering the non-normality of the financial time-series data. General machine learning approaches such as linear regression, support vector regressions, etc. do however, encounter issues of interpretability and overfitting in high-dimensional datasets, which could be handled by the usage of deep learning algorithms in a hybridized manner for portfolio optimization, the focus of this study.</p>
   <p>This current study experiments with the novel application of Bidirectional Long Short-Term Memory (BiLSTM) and Bidirectional Gated Recurrent Unit (BiGRU) models in the financial domain, specifically for stocks across five distinct financial sectors and cryptocurrencies. The research endeavors to construct a hybrid portfolio integrating both general stocks and cryptocurrencies. This portfolio will be developed through a data-driven approach for portfolio optimization, incorporating diversification strategies. The diversification will be introduced through stock selection facilitated by Affinity Propagation (AP)-based clustering. This research contributes to the understanding of the potential effectiveness of data-driven portfolio optimization with deep learning—BiLSTM and BiGRU models trained under varying market conditions and provide insights into constructing diversified hybrid portfolios that incorporate both general stocks and cryptocurrencies.</p>
   <p>
    <xref ref-type="fig" rid="fig1">
     Figure 1
    </xref> illustrates the proposition of a novel integration involving the architecture of BiLSTM and BiGRU. This integration is employed for predicting future financial asset values, followed by diversification in stock selection using AP-based clustering. Subsequently, a data-driven portfolio optimization algorithm is utilized for the construction of robust portfolios. In other words, this research introduces a novel framework that combines DL and a data-driven portfolio optimization algorithm. This innovative approach incorporates the infrequently utilized AP-based clustering for diversification, aiming to create a resilient portfolio optimization technique with a focus on risk aversion.</p>
   <fig id="fig1" position="float">
    <label>Figure 1</label>
    <caption>
     <title>Figure 1. Proposed algorithmic architecture for portfolio optimization.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId15.jpeg?20241012094209" />
   </fig>
  </sec><sec id="s2">
   <title>2. Related Works</title>
   <p>Stock market data is notably intricate, characterized by complex interconnections among its components. The dynamics of the stock market are influenced by a multitude of factors such as political, geographical, and socio-economic considerations. The pronounced variability across these diverse factors contributes to fluctuations in stock market trends. Particularly during critical events, accurately predicting stock market performance becomes notably challenging and of utmost importance. Different researchers have used ML and DL algorithms to explore stock market prediction. ML techniques are being heavily explored in the arena of finance and these algorithms are superior to traditional techniques of forecasting such as ARIMA, as the traditional approaches can’t identify internal dependencies of the data <xref ref-type="bibr" rid="scirp.133998-35">
     [35]
    </xref>.</p>
   <sec id="s2_1">
    <title>2.1. Machine Learning (ML) in Price Prediction and Portfolio Optimization</title>
    <p>Machine learning is heavily used in finance for price prediction <xref ref-type="bibr" rid="scirp.133998-36">
      [36]
     </xref> and clustering of financial assets <xref ref-type="bibr" rid="scirp.133998-34">
      [34]
     </xref>. Yang and Hospedales <xref ref-type="bibr" rid="scirp.133998-37">
      [37]
     </xref> have explored self supervised learning (SSL), a class of ML for portfolio diversification in MVO. Their exploration suggested the superiority of SSL over the non-SSL alternatives. To tackle the dimensionality problems, Jaimungal <xref ref-type="bibr" rid="scirp.133998-38">
      [38]
     </xref> explored various ML and reinforcement learning (RL) for portfolio optimization. Snow <xref ref-type="bibr" rid="scirp.133998-39">
      [39]
     </xref> considered several weight optimization techniques for several ML algorithms for portfolio optimization. Kaczmarek and Perez <xref ref-type="bibr" rid="scirp.133998-40">
      [40]
     </xref> have used ML-based stock selection and combined it with the Markowitz mean-variance and Hierarchical Risk Parity (HRP) portfolio construction techniques. Similarly, Jiang et al. <xref ref-type="bibr" rid="scirp.133998-41">
      [41]
     </xref> have used XGboost for portfolio optimization and observed notable efficiency. Similarly, Behera et al. <xref ref-type="bibr" rid="scirp.133998-42">
      [42]
     </xref> explored Support Vector Regression (SVR), XGboost, AdaBoost, K-nearest Neighbours (KNN), and ANN for portfolio optimization. Their research concluded with the findings suggesting the superiority of AdaBoost, a powerful ensemble model.</p>
   </sec>
   <sec id="s2_2">
    <title>2.2. Deep Learning (DL) in Price Prediction and Portfolio Optimization</title>
    <p>Application of DL models is rising phenomenally in the arena of stock prediction <xref ref-type="bibr" rid="scirp.133998-43">
      [43]
     </xref>. Jiang <xref ref-type="bibr" rid="scirp.133998-44">
      [44]
     </xref> has summarized the recent progress in stock market prediction using different DL models and provided a general workflow for the stock prediction domain using DL. Nikou et al. <xref ref-type="bibr" rid="scirp.133998-45">
      [45]
     </xref> have considered the non-linearity and non-stationarity of stock market data when they analyzed different ML and DL algorithms in predicting the daily close price data. Their findings suggest DL models surpass traditional ML algorithms. They also noted that SVR and RF perform well next to the DL models.</p>
    <p>DL algorithms are generally seen to be outperforming machine learning algorithms due to having neuron-based learning capabilities. Fernández and Góme <xref ref-type="bibr" rid="scirp.133998-46">
      [46]
     </xref> have explored a particular network, the Hopfield network in portfolio optimization. Uysal et al. <xref ref-type="bibr" rid="scirp.133998-47">
      [47]
     </xref> used a risk budgeting model as a layer in the deep neural network which overperformed the traditional techniques. Yu et al. <xref ref-type="bibr" rid="scirp.133998-48">
      [48]
     </xref> used radial basis function (RBF) neural network and have observed sufficient efficiency. Jang and Seong <xref ref-type="bibr" rid="scirp.133998-49">
      [49]
     </xref> explored the combination of Deep Reinforcement Learning (DRL) and Modern Portfolio Theory (MPT) and observed substantial improvement in profit maximization. Yang <xref ref-type="bibr" rid="scirp.133998-50">
      [50]
     </xref> further explored DRL in portfolio optimization and reported the superior performance of representation learning-based DRL in portfolio optimization. Ngo et al. <xref ref-type="bibr" rid="scirp.133998-51">
      [51]
     </xref> conducted a comparative study on the performance of DRL with other deep learning and traditional portfolio optimization techniques on the frontier and developed stock market. Their study confirms the better responsiveness of DRL to the market dynamics compared to the other algorithms.</p>
   </sec>
   <sec id="s2_3">
    <title>2.3. Hybriding Machine Learning (ML) and Deep Learning (DL)</title>
    <p>The integration of ML and DL models could potentially lead to a prominent advancement across diverse domains. In this amalgamation, ML techniques often serve as a fundamental framework, while DL models, with their complex neural architectures, provide enhanced learning capabilities. Overall, the hybridization of ML and DL broadens the spectrum of applications and augments performance across several domains. LSTM-GRU hybridization is being heavily explored in the financial time series forecasting problem domains. Besides that, LSTM-CNN and GRU-CNN also have been explored for different problem domains <xref ref-type="bibr" rid="scirp.133998-52">
      [52]
     </xref> <xref ref-type="bibr" rid="scirp.133998-53">
      [53]
     </xref> including finance <xref ref-type="bibr" rid="scirp.133998-54">
      [54]
     </xref>. Other than these models, LSTM-GRU- ARIMA <xref ref-type="bibr" rid="scirp.133998-55">
      [55]
     </xref> is also a popular hybridized model used in different problem domains.</p>
    <p>Hybridized DL algorithms are a prominent field of research in the arena of portfolio optimization and the development of investment strategies. Modified Deep Belief Networks and RNNs are heavily utilized in portfolio optimization <xref ref-type="bibr" rid="scirp.133998-27">
      [27]
     </xref>. Different models such as CNN and RNN are being fused for stock selection and optimization for the formation of profitable risk-averse portfolios <xref ref-type="bibr" rid="scirp.133998-28">
      [28]
     </xref>. Moreover, various heuristics are also being explored by the amalgamation of these with various deep-learning algorithms for portfolio optimization <xref ref-type="bibr" rid="scirp.133998-29">
      [29]
     </xref>.</p>
    <p>BiLSTM is an RNN architecture that utilizes the ability to process sequences of data bi-directionally. Unlike traditional LSTMs, which only consider the past context in a sequence, BiLSTM processes data in both forward and backward directions. This bidirectional processing enables the model to capture dependencies from both preceding and succeeding elements in a sequence, enhancing its ability to understand and learn complex patterns in sequential data. Lu et al. <xref ref-type="bibr" rid="scirp.133998-56">
      [56]
     </xref> have used CNN-BiLSTM using an attention mechanism for efficient price prediction. Pramesti et al. <xref ref-type="bibr" rid="scirp.133998-57">
      [57]
     </xref> have used BiLSTM in stock data prediction for the Indonesian banking sector and found it to be effective. Similar to BiLSTM, BiGRU is bidirectional, meaning it processes information in both forward and backward directions within a sequence. The GRU is a specific type of RNN cell that is employed in the bidirectional context of BiGRU. Malla et al. <xref ref-type="bibr" rid="scirp.133998-58">
      [58]
     </xref> have explored BiGRU with sentiment data for bitcoin prediction.</p>
    <p>This current study aims to devise efficient portfolio optimization technique for maximum profitability by incorporating BiLSTM and BiGRU along with the data-driven portfolio optimization technique improvised with affinity propagation-based clustering for introducing diversity through stock selection.</p>
   </sec>
  </sec><sec id="s3">
   <title>3. Dataset Consideration</title>
   <p>In this research, a diversified portfolio comprising stocks from five distinct sectors-technology, healthcare, energy, banking, and consumer-along with two notable cryptocurrencies, Bitcoin (BTC-USD) and Ethereum (ETH-USD), has been meticulously selected. Each sector is represented by three carefully chosen stocks. The selected stocks include prominent entities such as Apple (AAPL), Microsoft (MSFT), Tesla (TSLA), Johnson &amp; Johnson (JNJ), Pfizer Inc. (PFE), Merck &amp; Co., Inc. (MRK), Exxon Mobil Corporation (XOM), Chevron Corporation (CVX), Enbridge Inc. (ENB), JPMorgan Chase &amp; Co. (JPM), Bank of America Corporation (BAC), HSBC Holdings plc (HSBC), The Procter &amp; Gamble Company (PG), The Coca-Cola Company (KO), and Unilever PLC (UL).</p>
   <p>The dataset for stock analysis encompasses information spanning the years 1998 to 2022, serving as the training data. This temporal range encapsulates pivotal financial events, including the www crash of 2000, the global financial crisis of 2008, and the 2020 COVID-19-induced financial crisis. Additionally, minor yet impactful financial events within this timeframe are also considered. Leveraging this extensive training data, the study formulates predictions for the year 2023, subsequently utilizing the predicted data for portfolio optimization.</p>
   <p>For Bitcoin, the training data spans from 2014 to 2022, while Ethereum’s training dataset covers the period from 2017 to 2022. This comprehensive approach enables the study to incorporate critical financial events, fostering a robust analysis for predictive modeling and portfolio optimization in the cryptocurrency domain.</p>
  </sec><sec id="s4">
   <title>4. Algorithm Design</title>
   <p>This section discusses the algorithmic construction of BiLSTM, BiGRU, Affinity Propagation, and Data-Driven Portfolio Optimization algorithm.</p>
   <sec id="s4_1">
    <title>4.1. Bidirectional Long Short-Term Memory (BiLSTM)</title>
    <p>BiLSTM is an advancement of the conventional LSTM architecture, specifically crafted to consider dependencies in both forward and backward directions within sequential data. LSTM, a variant of RNN is specifically efficient in considering dependencies of long-term time series. BiLSTM enhances the capabilities of traditional LSTMs by processing input sequences in both forward and backward directions simultaneously.</p>
    <p>
     <xref ref-type="fig" rid="fig2">
      Figure 2
     </xref> shows a basic chain architecture of LSTM<sup>2</sup>. This chain architecture of LSTM represents how sequential data is processed, where the information passes in a single direction.</p>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>Figure 2. A basic LSTM chain architecture.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId19.jpeg?20241012094218" />
    </fig>
    <p>In <xref ref-type="fig" rid="fig2">
      Figure 2
     </xref>, the forget gate, determines the information to be excluded from the cell state. The input gate decides which values to update in the cell state. The cell state is responsible for storing long-term information. The output gate controls the information to be output from the cell state. h<sub>t</sub> represents the hidden state, encompassing short-term information for output.</p>
    <p>
     <xref ref-type="fig" rid="fig3">
      Figure 3
     </xref> demonstrates a BiLSTM architecture<sup>3</sup>. Within an LSTM unit, key components encompass a cell, an input gate, a forget gate, and an output gate. These components work together to selectively retain and update information over sequential steps. The key innovation in BiLSTM is its bidirectional architecture. Instead of processing the input sequence only from left to right (as in traditional LSTMs), BiLSTM processes it in both directions simultaneously. In the forward pass, the input sequence is handled from the start to the finish. The hidden states at each step capture the information up to that point, considering the context from the past. Simultaneously, in the backward pass, the input sequence is processed from the end to the beginning. The hidden states in this direction capture information considering the context of the future. At each time step, the concatenation of hidden states from both the forward and backward passes takes place. This results in a representation that encodes information from both the past and the future, providing a more comprehensive context for each element in the sequence. By considering bidirectional dependencies, BiLSTM has an enhanced ability to capture long-range dependencies and understand the context in which each element appears within the sequence. BiLSTM is trained using backpropagation through time (BPTT) and optimized using techniques like gradient clipping to address vanishing or exploding gradient issues. <xref ref-type="bibr" rid="scirp.133998-#A1">
      Algorithm 1
     </xref> captures the steps in BiLSTM model.</p>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 3. A BiLSTM architecture.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId20.jpeg?20241012094217" />
    </fig>
    <p>
     <xref ref-type="bibr" rid="scirp.133998-"></xref>Algorithm 1. Bidirectional Long Short-Term Memory (BiLSTM).</p>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>4.2. Bidirectional Gated Recurrent Unit (BiGRU)BiGRU is an advancement of the traditional GRU neural network architecture designed to capture bidirectional dependencies in sequential data. GRU is a variant of RNN that, like LSTM, handles sequential time series. BiGRU enhances the capabilities of GRU by processing input sequences in both forward and backward directions simultaneously.<xref ref-type="fig" rid="fig4">
        Figure 4
       </xref> illustrates a basic GRU architecture<sup>4</sup>. It consists of a reset gate and an update gate, allowing it to selectively retain and update information over sequential steps. The reset gate forgets specific past information based on weighted calculation, similarly, the storage of relevant information is decided by weighted calculation by the update gate. This mechanism helps GRU capture long-term dependencies in sequential data while maintaining computational efficiency.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId21.jpeg?20241012094217" />
    </fig>
    <p>In the GRU model framework as mentioned in <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          r 
        </mi> 
        <mi>
          t 
        </mi> 
       </msub> 
      </mrow> 
     </math> acts as the reset gate, and 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          z 
        </mi> 
        <mi>
          t 
        </mi> 
       </msub> 
      </mrow> 
     </math> operates as the update gate. The vector 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mover accent="true"> 
         <mi>
           h 
         </mi> 
         <mo>
           ˜ 
         </mo> 
        </mover> 
        <mi>
          t 
        </mi> 
       </msub> 
      </mrow> 
     </math> signifies a candidate activation vector. The functions σ and tanh denote the sigmoid and hyperbolic tangent functions, respectively.</p>
    <fig id="fig5" position="float">
     <label>Figure 5</label>
     <caption>
      <title>Figure 4. A GRU architecture.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId30.jpeg?20241012094219" />
    </fig>
    <p>
     <xref ref-type="fig" rid="fig5">
      Figure 5
     </xref> illustrates the architecture of BiGRU<sup>5</sup>. BiGRU is employed for tasks involving sequential data analysis, where understanding the context of information requires considering both preceding and succeeding information. The key innovation in BiGRU is its bidirectional architecture. Instead of processing the input sequence only from left to right, as in traditional GRUs, BiGRU processes it in both directions simultaneously similar to the process explained for BiLSTM model earlier. By considering bidirectional dependencies, BiGRU has an enhanced ability to capture long-range dependencies and understand the context in which each element appears within the sequence. <xref ref-type="bibr" rid="scirp.133998-#A2">
      Algorithm 2
     </xref> captures the steps in BiGRU model.</p>
    <fig id="fig6" position="float">
     <label>Figure 6</label>
     <caption>
      <title>Figure 5. BiGRU architecture.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId33.jpeg?20241012094219" />
    </fig>
    <p>
     <xref ref-type="bibr" rid="scirp.133998-"></xref>Algorithm 2. Bidirectional GRU.</p>
    <fig id="fig7" position="float">
     <label>Figure 7</label>
     <caption>
      <title>4.3. Clustering: Affinity PropagationIt is a type of clustering algorithm that autonomously identifies clusters and representative data points, known as exemplars, within a dataset. It operates by iteratively exchanging messages between data points based on their pairwise similarities, represented in a similarity matrix. The algorithm maintains responsibility and availability matrices, updating them to assess the suitability of each data point to act as an exemplar for others. Exemplars are chosen by maximizing the sum of responsibility and availability, facilitating the formation of clusters around these influential points. <xref ref-type="fig" rid="fig6">
        Figure 6
       </xref> illustrates the Affinity Propagation<sup>6</sup>. Notably, Affinity Propagation dynamically determines the number of clusters, making it advantageous when prior knowledge of cluster count is unavailable. The algorithm converges when the matrices stabilize, ensuring consistent exemplar selection and cluster assignment.<xref ref-type="bibr" rid="scirp.133998-"></xref><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1491116-rId37.jpeg?20241012094221" /></p>Figure 6. Affinity propagation.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId34.jpeg?20241012094220" />
    </fig>
    <p>This clustering algorithm operates by iteratively updating two key matrices, responsibility (R) and availability (A), to determine representative data points, called exemplars, within a dataset. <xref ref-type="fig" rid="fig6">
      Figure 6
     </xref> depicts the Affinity Propagation technique for clustering. The similarity matrix S quantifies pairwise similarities between data points. The responsibility matrix R represents each point’s suitability to serve as an exemplar for others, considering alternative exemplars. Simultaneously, the availability matrix A accumulates evidence for a point to choose another as its exemplar. The iterative updates are influenced by the damping factor Λ, which prevents oscillations and controls the impact of new values on existing ones. Exemplars are chosen based on maximizing the sum of responsibility and availability. This dynamic process of message passing continues until convergence, resulting in stable matrices and consistent exemplar selection. Affinity Propagation’s strength lies in its ability to automatically determine the number of clusters and exemplars without requiring prior information.</p>
    <p>The key equations for the affinity propagation are:</p>
    <p>Responsibility (R) update:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         R 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ← 
       </mo> 
       <mi>
         S 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         − 
       </mo> 
       <munder> 
        <mrow> 
         <mi>
           max 
         </mi> 
        </mrow> 
        <mrow> 
         <msup> 
          <mi>
            k 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
         <mo>
           ≠ 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
       </munder> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <mi>
           A 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mn>
             , 
           </mn> 
           <msup> 
            <mi>
              k 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <mi>
           S 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mn>
             , 
           </mn> 
           <msup> 
            <mi>
              k 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>Availability (A) Update:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         A 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ← 
       </mo> 
       <mi>
         min 
       </mi> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           R 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             k 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             k 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <mstyle displaystyle="true"> 
          <munder> 
           <mo>
             ∑ 
           </mo> 
           <mrow> 
            <msup> 
             <mi>
               i 
             </mi> 
             <mo>
               ′ 
             </mo> 
            </msup> 
            <mo>
              ≠ 
            </mo> 
            <mi>
              i 
            </mi> 
            <mo>
              , 
            </mo> 
            <msup> 
             <mi>
               i 
             </mi> 
             <mo>
               ′ 
             </mo> 
            </msup> 
            <mo>
              ≠ 
            </mo> 
            <mi>
              k 
            </mi> 
           </mrow> 
          </munder> 
         </mstyle> 
         <mi>
           max 
         </mi> 
         <mrow> 
          <mo>
            { 
          </mo> 
          <mrow> 
           <mn>
             0 
           </mn> 
           <mo>
             , 
           </mo> 
           <mi>
             R 
           </mi> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mrow> 
             <msup> 
              <mi>
                i 
              </mi> 
              <mo>
                ′ 
              </mo> 
             </msup> 
             <mo>
               , 
             </mo> 
             <mi>
               k 
             </mi> 
            </mrow> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            } 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>Damping: Both the responsibility and availability matrices are updated with a damping factor (Λ) to prevent oscillations:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         R 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ← 
       </mo> 
       <mi>
         Λ 
       </mi> 
       <mo>
         ⋅ 
       </mo> 
       <mtext>
         old 
       </mtext> 
       <mi>
         R 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           − 
         </mo> 
         <mi>
           Λ 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ⋅ 
       </mo> 
       <mi>
         R 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         A 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ← 
       </mo> 
       <mi>
         Λ 
       </mi> 
       <mo>
         ⋅ 
       </mo> 
       <mtext>
         old 
       </mtext> 
       <mi>
         A 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           − 
         </mo> 
         <mi>
           Λ 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ⋅ 
       </mo> 
       <mi>
         A 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>Exemplar Assignment:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         Exemplar 
       </mtext> 
       <mtext>
           
       </mtext> 
       <mtext>
         for 
       </mtext> 
       <mtext>
           
       </mtext> 
       <mi>
         i 
       </mi> 
       <mtext>
           
       </mtext> 
       <mtext>
         is 
       </mtext> 
       <mtext>
           
       </mtext> 
       <mi>
         arg 
       </mi> 
       <munder> 
        <mrow> 
         <mi>
           max 
         </mi> 
        </mrow> 
        <mi>
          k 
        </mi> 
       </munder> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <mi>
           R 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mn>
             , 
           </mn> 
           <mi>
             k 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <mi>
           A 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             i 
           </mi> 
           <mn>
             , 
           </mn> 
           <mi>
             k 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         S 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> represents the similarity between data points i and k.</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         R 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> is the responsibility of point i to be the exemplar for point k.</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         A 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mn>
           , 
         </mn> 
         <mi>
           k 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> is the availability of point k for being the exemplar for point i.</p>
    <p>Λ is the damping factor that controls the influence of the new values on the existing ones.</p>
    <p>
     <xref ref-type="bibr" rid="scirp.133998-#A3">
      Algorithm 3
     </xref> provides an overview of the affinity propagation algorithm.</p>
    <p>
     <xref ref-type="bibr" rid="scirp.133998-"></xref>Algorithm 3. Affinity propagation.</p>
    <fig id="fig8" position="float">
     <label>Figure 8</label>
     <caption>
      <title>4.4. Evaluation MetricsFor quantifying model performance, this study has explored four popular evaluation metrics. These metrics are used to quantify how well the deep learning models are in forecasting future values.Mean Squared Error (MSE): It assesses the average squared discrepancy between the observed values and the true values in a dataset. It is given by
       <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
  
         <mtext>
          
   MSE
  
         </mtext>
  
         <mo>
          
   =
  
         </mo>
  
         <mfrac> 
   
          <mn>
           
    1
   
          </mn> 
   
          <mi>
           
    m
   
          </mi> 
  
         </mfrac> 
  
         <mstyle displaystyle="true"> 
   
          <munderover> 
    
           <mo>
            
     ∑
    
           </mo> 
    
           <mrow> 
     
            <mi>
              j 
            </mi>
     
            <mo>
              = 
            </mo>
     
            <mn>
              1 
            </mn>
    
           </mrow> 
    
           <mi>
            
     m
    
           </mi> 
   
          </munderover> 
  
         </mstyle>
  
         <msup> 
   
          <mrow> 
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <msub> 
              <mi>
                b 
              </mi> 
              <mi>
                j 
              </mi> 
             </msub> 
             <mo>
               − 
             </mo> 
             <msub> 
              <mover accent="true"> 
               <mi>
                 b 
               </mi> 
               <mo>
                 ^ 
               </mo> 
              </mover> 
              <mi>
                j 
              </mi> 
             </msub> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mn>
           
    2
   
          </mn> 
  
         </msup> 
  
         <mn>
   
          <mo>
           
    ;
   
          </mo>
  
         </mn>
 
        </mrow> 

       </math>here 

       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <msub> 
   
          <mi>
           
    b
   
          </mi> 
   
          <mi>
           
    j
   
          </mi> 
  
         </msub> 
 
        </mrow>

       </math> is the original price and the 

       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <msub> 
   
          <mover accent="true"> 
    
           <mi>
            
     b
    
           </mi> 
    
           <mo>
            
     ^
    
           </mo> 
   
          </mover> 
   
          <mi>
           
    j
   
          </mi> 
  
         </msub> 
 
        </mrow>

       </math> is the forecasted value.Mean Absolute Error (MAE): It quantifies the mean extent of errors between forecasted and genuine values in a dataset. Mathematically,
       <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
  
         <mtext>
          
   MAE
  
         </mtext>
  
         <mo>
          
   =
  
         </mo>
  
         <mfrac> 
   
          <mn>
           
    1
   
          </mn> 
   
          <mi>
           
    m
   
          </mi> 
  
         </mfrac> 
  
         <mstyle displaystyle="true"> 
   
          <munderover> 
    
           <mo>
            
     ∑
    
           </mo> 
    
           <mrow> 
     
            <mi>
              j 
            </mi>
     
            <mo>
              = 
            </mo>
     
            <mn>
              1 
            </mn>
    
           </mrow> 
    
           <mi>
            
     m
    
           </mi> 
   
          </munderover> 
  
         </mstyle>
  
         <mrow>
   
          <mo>
           
    |
   
          </mo> 
   
          <mrow> 
    
           <msub> 
     
            <mi>
              b 
            </mi> 
     
            <mi>
              j 
            </mi> 
    
           </msub> 
    
           <mo>
            
     −
    
           </mo>
    
           <msub> 
     
            <mover accent="true"> 
             <mi>
               b 
             </mi> 
             <mo>
               ^ 
             </mo> 
            </mover> 
     
            <mi>
              j 
            </mi> 
    
           </msub> 
   
          </mrow> 
   
          <mo>
           
    |
   
          </mo>
  
         </mrow>
 
        </mrow> 

       </math>where the number of observations in the dataset is represented by m. The true value for observation j is represented by 

       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <msub> 
   
          <mi>
           
    b
   
          </mi> 
   
          <mi>
           
    j
   
          </mi> 
  
         </msub> 
 
        </mrow>

       </math>. The predicted value for observation j is represented by 

       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <msub> 
   
          <mover accent="true"> 
    
           <mi>
            
     b
    
           </mi> 
    
           <mo>
            
     ^
    
           </mo> 
   
          </mover> 
   
          <mi>
           
    j
   
          </mi> 
  
         </msub> 
 
        </mrow>

       </math>.R-Square: In a regression model, the R-squared metric quantifies the ratio of the variance in the dependent variable that the independent variables account for. Mathematically,
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <msup> 
   
          <mi>
           
    R
   
          </mi> 
   
          <mn>
           
    2
   
          </mn> 
  
         </msup> 
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   1
  
         </mn>
  
         <mo>
          
   −
  
         </mo>
  
         <mfrac> 
   
          <mrow> 
    
           <mtext>
            
     SSR
    
           </mtext>
   
          </mrow> 
   
          <mrow> 
    
           <mtext>
            
     SST
    
           </mtext>
   
          </mrow> 
  
         </mfrac> 
 
        </mrow>

       </math></title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId54.jpeg?20241012094220" />
    </fig>
    <p>where SSR is the sum of squared discrepancies between the observed values and the predicted values and SST is the total sum of squared discrepancies between the observed values and the average of the observed values.</p>
    <p>Mean Absolute Percentage Error (MAPE): It serves as a measure to evaluate the precision of a forecasting model by determining the mean percentage disparity between anticipated and real values. Its significance lies in appraising model performance across varied datasets, furnishing a standardized gauge of predictive accuracy. Mathematically,</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         MAPE 
       </mtext> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mn>
          1 
        </mn> 
        <mi>
          m 
        </mi> 
       </mfrac> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            j 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           m 
         </mi> 
        </munderover> 
       </mstyle> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mrow> 
         <mfrac> 
          <mrow> 
           <msub> 
            <mi>
              A 
            </mi> 
            <mi>
              j 
            </mi> 
           </msub> 
           <mo>
             − 
           </mo> 
           <msub> 
            <mi>
              P 
            </mi> 
            <mi>
              j 
            </mi> 
           </msub> 
          </mrow> 
          <mrow> 
           <msub> 
            <mi>
              A 
            </mi> 
            <mi>
              j 
            </mi> 
           </msub> 
          </mrow> 
         </mfrac> 
        </mrow> 
        <mo>
          | 
        </mo> 
       </mrow> 
       <mo>
         × 
       </mo> 
       <mn>
         100 
       </mn> 
      </mrow> 
     </math>.</p>
    <p>The number of observations in the dataset is represented by m. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          A 
        </mi> 
        <mi>
          j 
        </mi> 
       </msub> 
      </mrow> 
     </math> represents the actual value for observation j. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          P 
        </mi> 
        <mi>
          j 
        </mi> 
       </msub> 
      </mrow> 
     </math> represents the predicted value for observation j.</p>
   </sec>
   <sec id="s4_2">
    <title>4.5. Data Driven Portfolio Optimization</title>
    <p>Two innovative estimators were introduced in <xref ref-type="bibr" rid="scirp.133998-30">
      [30]
     </xref>. These functions, characterized by smaller variances, are employed to formulate a novel risk measure for a portfolio that takes into account moments of higher order. The sign correlation ( 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          ρ 
        </mi> 
        <mrow> 
         <mi>
           P 
         </mi> 
         <mn>
           , 
         </mn> 
         <mtext>
           sgn 
         </mtext> 
        </mrow> 
       </msub> 
      </mrow> 
     </math>) and volatility correlation ( 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          ρ 
        </mi> 
        <mrow> 
         <mi>
           P 
         </mi> 
         <mn>
           , 
         </mn> 
         <mtext>
           vol 
         </mtext> 
        </mrow> 
       </msub> 
      </mrow> 
     </math>) are expressed as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          ρ 
        </mi> 
        <mrow> 
         <mi>
           P 
         </mi> 
         <mo>
           , 
         </mo> 
         <mtext>
           sgn 
         </mtext> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mtext>
         Corr 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           Sgn 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              R 
            </mi> 
            <mi>
              P 
            </mi> 
           </msub> 
           <mo>
             − 
           </mo> 
           <msub> 
            <mi>
              μ 
            </mi> 
            <mi>
              p 
            </mi> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mn>
           , 
         </mn> 
         <msub> 
          <mi>
            R 
          </mi> 
          <mi>
            P 
          </mi> 
         </msub> 
         <mo>
           − 
         </mo> 
         <msub> 
          <mi>
            μ 
          </mi> 
          <mi>
            p 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          ρ 
        </mi> 
        <mrow> 
         <mi>
           P 
         </mi> 
         <mn>
           , 
         </mn> 
         <mtext>
           vol 
         </mtext> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mtext>
         Corr 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mrow> 
          <mo>
            | 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              R 
            </mi> 
            <mi>
              P 
            </mi> 
           </msub> 
           <mo>
             − 
           </mo> 
           <msub> 
            <mi>
              μ 
            </mi> 
            <mi>
              p 
            </mi> 
           </msub> 
          </mrow> 
          <mo>
            | 
          </mo> 
         </mrow> 
         <mn>
           , 
         </mn> 
         <msup> 
          <mrow> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mrow> 
             <msub> 
              <mi>
                R 
              </mi> 
              <mi>
                P 
              </mi> 
             </msub> 
             <mo>
               − 
             </mo> 
             <msub> 
              <mi>
                μ 
              </mi> 
              <mi>
                p 
              </mi> 
             </msub> 
            </mrow> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mn>
            2 
          </mn> 
         </msup> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math></p>
    <p>Here, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          μ 
        </mi> 
        <mi>
          p 
        </mi> 
       </msub> 
      </mrow> 
     </math> represents the expected return of the portfolio. These are used in <xref ref-type="bibr" rid="scirp.133998-31">
      [31]
     </xref> to introduce four distinct risk measures. The portfolio’s expected return is indicated by 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          μ 
        </mi> 
        <mi>
          p 
        </mi> 
       </msub> 
      </mrow> 
     </math>. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mi>
          P 
        </mi> 
       </msub> 
      </mrow> 
     </math> represents the portfolio return. The inverse of the cumulative distribution function (CDF) is denoted by 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         F 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> of portfolio return. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mover accent="true"> 
         <mi>
           R 
         </mi> 
         <mo>
           ˜ 
         </mo> 
        </mover> 
        <mi>
          p 
        </mi> 
       </msub> 
      </mrow> 
     </math> and 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mover accent="true"> 
         <mi>
           σ 
         </mi> 
         <mo>
           ^ 
         </mo> 
        </mover> 
        <mi>
          P 
        </mi> 
       </msub> 
      </mrow> 
     </math> serve as estimates of the expected return and standard deviation (SD) of a financial portfolio, respectively, derived from the past 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        l 
      </mi> 
     </math> observations.</p>
    <p>The mean absolute deviation (MAD) assessment for the portfolio is computed using:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
       <msub> 
        <mrow> 
         <mtext>
           MAD 
         </mtext> 
        </mrow> 
        <mi>
          P 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         2 
       </mn> 
       <msub> 
        <mover accent="true"> 
         <mi>
           ρ 
         </mi> 
         <mo>
           ^ 
         </mo> 
        </mover> 
        <mrow> 
         <mi>
           P 
         </mi> 
         <mn>
           , 
         </mn> 
         <mtext>
           sign 
         </mtext> 
        </mrow> 
       </msub> 
       <msub> 
        <mover accent="true"> 
         <mi>
           σ 
         </mi> 
         <mo>
           ^ 
         </mo> 
        </mover> 
        <mi>
          P 
        </mi> 
       </msub> 
       <msqrt> 
        <mrow> 
         <mi>
           F 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mover accent="true"> 
             <mi>
               R 
             </mi> 
             <mo>
               ¯ 
             </mo> 
            </mover> 
            <mi>
              P 
            </mi> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mn>
             1 
           </mn> 
           <mo>
             − 
           </mo> 
           <mi>
             F 
           </mi> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mrow> 
             <msub> 
              <mover accent="true"> 
               <mi>
                 R 
               </mi> 
               <mo>
                 ¯ 
               </mo> 
              </mover> 
              <mi>
                P 
              </mi> 
             </msub> 
            </mrow> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
       </msqrt> 
      </mrow> 
     </math></p>
    <p>The volatility estimate of the portfolio, employing volatility correlation reduction (VEV), is quantified through:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
       <msub> 
        <mrow> 
         <mtext>
           VEV 
         </mtext> 
        </mrow> 
        <mi>
          P 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <msqrt> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           − 
         </mo> 
         <msubsup> 
          <mover accent="true"> 
           <mi>
             ρ 
           </mi> 
           <mo>
             ^ 
           </mo> 
          </mover> 
          <mrow> 
           <mi>
             P 
           </mi> 
           <mn>
             , 
           </mn> 
           <mtext>
             vol 
           </mtext> 
          </mrow> 
          <mn>
            2 
          </mn> 
         </msubsup> 
        </mrow> 
       </msqrt> 
       <msub> 
        <mover accent="true"> 
         <mi>
           σ 
         </mi> 
         <mo>
           ^ 
         </mo> 
        </mover> 
        <mi>
          P 
        </mi> 
       </msub> 
      </mrow> 
     </math></p>
    <p>The volatility assessment of the portfolio utilizing sign correlation reduction (VES) is given below:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
       <msub> 
        <mrow> 
         <mtext>
           VES 
         </mtext> 
        </mrow> 
        <mi>
          P 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <msqrt> 
        <mrow> 
         <mn>
           1 
         </mn> 
         <mo>
           − 
         </mo> 
         <msubsup> 
          <mover accent="true"> 
           <mi>
             ρ 
           </mi> 
           <mo>
             ^ 
           </mo> 
          </mover> 
          <mrow> 
           <mi>
             P 
           </mi> 
           <mn>
             , 
           </mn> 
           <mtext>
             sign 
           </mtext> 
          </mrow> 
          <mn>
            2 
          </mn> 
         </msubsup> 
        </mrow> 
       </msqrt> 
       <msub> 
        <mover accent="true"> 
         <mi>
           σ 
         </mi> 
         <mo>
           ^ 
         </mo> 
        </mover> 
        <mi>
          P 
        </mi> 
       </msub> 
      </mrow> 
     </math></p>
    <p>For the volatility estimate of the portfolio considering both volatility and sign correlation reduction (VESV), the formula is as follows:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
       <msub> 
        <mrow> 
         <mtext>
           VESV 
         </mtext> 
        </mrow> 
        <mi>
          P 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <msqrt> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mn>
             1 
           </mn> 
           <mo>
             − 
           </mo> 
           <msubsup> 
            <mover accent="true"> 
             <mi>
               ρ 
             </mi> 
             <mo>
               ^ 
             </mo> 
            </mover> 
            <mrow> 
             <mi>
               P 
             </mi> 
             <mn>
               , 
             </mn> 
             <mtext>
               sign 
             </mtext> 
            </mrow> 
            <mn>
              2 
            </mn> 
           </msubsup> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mn>
             1 
           </mn> 
           <mo>
             − 
           </mo> 
           <msubsup> 
            <mover accent="true"> 
             <mi>
               ρ 
             </mi> 
             <mo>
               ^ 
             </mo> 
            </mover> 
            <mrow> 
             <mi>
               P 
             </mi> 
             <mn>
               , 
             </mn> 
             <mtext>
               vol 
             </mtext> 
            </mrow> 
            <mn>
              2 
            </mn> 
           </msubsup> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
       </msqrt> 
       <mtext>
           
       </mtext> 
       <msub> 
        <mover accent="true"> 
         <mi>
           σ 
         </mi> 
         <mo>
           ^ 
         </mo> 
        </mover> 
        <mi>
          P 
        </mi> 
       </msub> 
      </mrow> 
     </math></p>
    <p>The data-driven portfolio optimization strategy considers these four distinct data-driven risk measures. Unlike other existing traditional portfolio optimization techniques, the data-driven portfolio optimization algorithm considers the underlying non-normality of the financial time series.</p>
   </sec>
  </sec><sec id="s5">
   <title>5. Results and Discussions</title>
   <sec id="s5_1">
    <title>5.1. Exploratory Data Analysis</title>
    <p>The dataset considered for this research is from 1998 to 2023. This dataset captures all major and minor events in this timeframe. Thus the BiLSTM and BuGRU models learn from the patterns of the drastic market events. This section explores interesting market intracacies especially from 2019 to 2023.</p>
    <p>Examining <xref ref-type="fig" rid="fig7">
      Figure 7
     </xref> and <xref ref-type="table" rid="table1">
      Table 1
     </xref>, it becomes evident that Tesla (TSLA) exhibits the highest level of volatility. In addition to Tesla (TSLA), Chevron (CVX) demonstrates notable volatility, albeit not to the extent observed in Tesla. Beyond traditional stocks, Bitcoin (BTC) manifests the utmost volatility, attributed to the inherently unpredictable nature of cryptocurrencies. Forecasting the performance of fluctuating assets proves challenging, primarily due to their pronounced volatility. Consequently, the formulation of portfolios incorporating highly unpredictable cryptocurrencies becomes a formidable task.</p>
    <fig-group id="fig9" position="float">
     <fig id="fig9" position="float">
      <label>Figure 9</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--(e)--(f)--Figure 7. Bollinger bands for stocks and cryptos from 2019 to 2023. (a) Tesla, (b) Chevron, (c) Johnson&amp;Johnson, (d) JP Morgan&amp;Chase, (e) The Procter&amp;Gamble Company, (f) Bitcoin.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId105.jpeg?20241012094225" />
     </fig>
     <fig id="fig9" position="float">
      <label>Figure 9</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--(e)--(f)--Figure 7. Bollinger bands for stocks and cryptos from 2019 to 2023. (a) Tesla, (b) Chevron, (c) Johnson&amp;Johnson, (d) JP Morgan&amp;Chase, (e) The Procter&amp;Gamble Company, (f) Bitcoin.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId106.jpeg?20241012094225" />
     </fig>
     <fig id="fig9" position="float">
      <label>Figure 9</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--(e)--(f)--Figure 7. Bollinger bands for stocks and cryptos from 2019 to 2023. (a) Tesla, (b) Chevron, (c) Johnson&amp;Johnson, (d) JP Morgan&amp;Chase, (e) The Procter&amp;Gamble Company, (f) Bitcoin.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId107.jpeg?20241012094224" />
     </fig>
     <fig id="fig9" position="float">
      <label>Figure 9</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--(e)--(f)--Figure 7. Bollinger bands for stocks and cryptos from 2019 to 2023. (a) Tesla, (b) Chevron, (c) Johnson&amp;Johnson, (d) JP Morgan&amp;Chase, (e) The Procter&amp;Gamble Company, (f) Bitcoin.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId108.jpeg?20241012094225" />
     </fig>
     <fig id="fig9" position="float">
      <label>Figure 9</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--(e)--(f)--Figure 7. Bollinger bands for stocks and cryptos from 2019 to 2023. (a) Tesla, (b) Chevron, (c) Johnson&amp;Johnson, (d) JP Morgan&amp;Chase, (e) The Procter&amp;Gamble Company, (f) Bitcoin.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId109.jpeg?20241012094225" />
     </fig>
     <fig id="fig9" position="float">
      <label>Figure 9</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--(e)--(f)--Figure 7. Bollinger bands for stocks and cryptos from 2019 to 2023. (a) Tesla, (b) Chevron, (c) Johnson&amp;Johnson, (d) JP Morgan&amp;Chase, (e) The Procter&amp;Gamble Company, (f) Bitcoin.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId110.jpeg?20241012094226" />
     </fig>
    </fig-group>
    <table-wrap id="table1">
     <label>
      <xref ref-type="table" rid="table1">
       Table 1
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.133998-"></xref>Table 1. Volatility with 20 days rolling window.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="14.39%"><p style="text-align:center">Components</p></td> 
       <td class="custom-bottom-td acenter" width="14.39%"><p style="text-align:center">Volatility</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="14.39%"><p style="text-align:center">TSLA</p></td> 
       <td class="custom-top-td acenter" width="14.39%"><p style="text-align:center">108.30</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="14.39%"><p style="text-align:center">JNJ</p></td> 
       <td class="acenter" width="14.39%"><p style="text-align:center">14.89</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="14.39%"><p style="text-align:center">JPM</p></td> 
       <td class="acenter" width="14.39%"><p style="text-align:center">20.01</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="14.39%"><p style="text-align:center">CVX</p></td> 
       <td class="acenter" width="14.39%"><p style="text-align:center">30.96</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="14.39%"><p style="text-align:center">PG</p></td> 
       <td class="acenter" width="14.39%"><p style="text-align:center">16.65</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="14.39%"><p style="text-align:center">BTC</p></td> 
       <td class="acenter" width="14.39%"><p style="text-align:center">16064.68</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>The visual representation in <xref ref-type="fig" rid="fig7">
      Figure 7
     </xref> indicates that throughout the COVID-19 pandemic in 2020, the general market performance experienced a downturn, excluding certain technology stocks such as TESLA. Both Tesla and Bitcoin also displayed a gradual increase in their prices during this period. After the conclusion of the COVID-19 era, the lingering impact of the financial crisis persisted, leading to noticeable price fluctuations in 2022.</p>
   </sec>
   <sec id="s5_2">
    <title>5.2. Performance Analysis of BiLSTM and BiGRU</title>
    <p>The correlation among various financial assets analyzed in this study for the year 2023 is depicted as a heat map in <xref ref-type="fig" rid="fig8">
      Figure 8
     </xref>. The BiLSTM and BiGRU DL models were trained to forecast asset prices for the same year. In this examination, the correlation between assets is assessed using both the predicted data from the models and the actual data.</p>
    <fig-group id="fig10" position="float">
     <fig id="fig10" position="float">
      <label>Figure 10</label>
      <caption>
       <title>(a)--(b)--(c)--Figure 8. Correlation analysis using actual data and forecasted data of 2023. (a) Correlation with actual data; (b) Correlation with BiLSTM predicted data; (c) Correlation with BiGRU predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId111.jpeg?20241012094227" />
     </fig>
     <fig id="fig10" position="float">
      <label>Figure 10</label>
      <caption>
       <title>(a)--(b)--(c)--Figure 8. Correlation analysis using actual data and forecasted data of 2023. (a) Correlation with actual data; (b) Correlation with BiLSTM predicted data; (c) Correlation with BiGRU predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId112.jpeg?20241012094227" />
     </fig>
     <fig id="fig10" position="float">
      <label>Figure 10</label>
      <caption>
       <title>(a)--(b)--(c)--Figure 8. Correlation analysis using actual data and forecasted data of 2023. (a) Correlation with actual data; (b) Correlation with BiLSTM predicted data; (c) Correlation with BiGRU predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId112.jpeg?20241012094227" />
     </fig>
    </fig-group>
    <p>The correlation matrix derived from the actual data of 2023 <xref ref-type="fig" rid="fig8(a)">
      Figure 8(a)
     </xref> reveals a robust correlation between stocks in the energy sector and those in the banking sector, particularly Bank of America (BAC). Additionally, BTC demonstrates a significant association with ETH. Furthermore, stocks within the same sector consistently exhibit elevated levels of correlation.</p>
    <p>The correlation analysis in <xref ref-type="fig" rid="fig8(b)">
      Figure 8(b)
     </xref> and <xref ref-type="fig" rid="fig8(c)">
      Figure 8(c)
     </xref> indicates that the predicted data successfully incorporates all the significant correlations observed among financial assets in the actual data. This suggests that the DL models have effectively captured the correlations among assets essential for constructing portfolios.</p>
    <p>Furthermore, upon reviewing <xref ref-type="table" rid="table2">
      Table 2
     </xref>, it becomes evident that BiGRU exhibits superiority over BiLSTM in forecasting the yearly prices of financial assets. The four evaluation metrics examined in this research consistently endorse the enhanced performance of BiGRU compared to BiLSTM in the prediction of financial asset prices.</p>
    <table-wrap id="table2">
     <label>
      <xref ref-type="table" rid="table2">
       Table 2
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.133998-"></xref>Table 2. Performance comparison of BiLSTM and BiGRU.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td rowspan="2" class="custom-top-td acenter" width="25.00%"><p style="text-align:center">Data Series</p></td> 
       <td rowspan="2" class="custom-top-td acenter" width="27.40%"><p style="text-align:center">Metric</p></td> 
       <td class="custom-bottom-td custom-top-td acenter" width="47.60%" colspan="2"><p style="text-align:center">Algorithms</p></td> 
      </tr> 
      <tr> 
       <td class="custom-bottom-td custom-top-td acenter" width="24.48%"><p style="text-align:center">BiLSTM</p></td> 
       <td class="custom-bottom-td custom-top-td acenter" width="23.11%"><p style="text-align:center">BiGRU</p></td> 
      </tr> 
      <tr> 
       <td rowspan="4" class="custom-top-td acenter" width="25.00%"><p style="text-align:center">AAPL</p></td> 
       <td class="custom-top-td acenter" width="27.40%"><p style="text-align:center">MSE</p></td> 
       <td class="custom-top-td acenter" width="24.48%"><p style="text-align:center">0.40</p></td> 
       <td class="custom-top-td acenter" width="23.11%"><p style="text-align:center">0.14</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.54</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.30</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">R-Squared</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.998</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.999</p></td> 
      </tr> 
      <tr> 
       <td class="custom-bottom-td acenter" width="27.40%"><p style="text-align:center">MAPE</p></td> 
       <td class="custom-bottom-td acenter" width="24.48%"><p style="text-align:center">0.30%</p></td> 
       <td class="custom-bottom-td acenter" width="23.11%"><p style="text-align:center">0.18%</p></td> 
      </tr> 
      <tr> 
       <td rowspan="4" class="custom-top-td acenter" width="25.00%"><p style="text-align:center">BAC</p></td> 
       <td class="custom-top-td acenter" width="27.40%"><p style="text-align:center">MSE</p></td> 
       <td class="custom-top-td acenter" width="24.48%"><p style="text-align:center">0.08</p></td> 
       <td class="custom-top-td acenter" width="23.11%"><p style="text-align:center">0.03</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.27</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.17</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">R-Squared</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.9901</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.9959</p></td> 
      </tr> 
      <tr> 
       <td class="custom-bottom-td acenter" width="27.40%"><p style="text-align:center">MAPE</p></td> 
       <td class="custom-bottom-td acenter" width="24.48%"><p style="text-align:center">0.90%</p></td> 
       <td class="custom-bottom-td acenter" width="23.11%"><p style="text-align:center">0..58%</p></td> 
      </tr> 
      <tr> 
       <td rowspan="4" class="custom-top-td acenter" width="25.00%"><p style="text-align:center">BTC-USD</p></td> 
       <td class="custom-top-td acenter" width="27.40%"><p style="text-align:center">MSE</p></td> 
       <td class="custom-top-td acenter" width="24.48%"><p style="text-align:center">0.0006</p></td> 
       <td class="custom-top-td acenter" width="23.11%"><p style="text-align:center">0.0003</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.019</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.014</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">R-Squared</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.9994</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.9997</p></td> 
      </tr> 
      <tr> 
       <td class="custom-bottom-td acenter" width="27.40%"><p style="text-align:center">MAPE</p></td> 
       <td class="custom-bottom-td acenter" width="24.48%"><p style="text-align:center">14.7%</p></td> 
       <td class="custom-bottom-td acenter" width="23.11%"><p style="text-align:center">11.1%</p></td> 
      </tr> 
      <tr> 
       <td rowspan="4" class="custom-top-td acenter" width="25.00%"><p style="text-align:center">CVX</p></td> 
       <td class="custom-top-td acenter" width="27.40%"><p style="text-align:center">MSE</p></td> 
       <td class="custom-top-td acenter" width="24.48%"><p style="text-align:center">0.63</p></td> 
       <td class="custom-top-td acenter" width="23.11%"><p style="text-align:center">0.11</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.78</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.25</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">R-Squared</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.993</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.999</p></td> 
      </tr> 
      <tr> 
       <td class="custom-bottom-td acenter" width="27.40%"><p style="text-align:center">MAPE</p></td> 
       <td class="custom-bottom-td acenter" width="24.48%"><p style="text-align:center">0.49%</p></td> 
       <td class="custom-bottom-td acenter" width="23.11%"><p style="text-align:center">0.16%</p></td> 
      </tr> 
      <tr> 
       <td rowspan="4" class="custom-top-td acenter" width="25.00%"><p style="text-align:center">JNJ</p></td> 
       <td class="custom-top-td acenter" width="27.40%"><p style="text-align:center">MSE</p></td> 
       <td class="custom-top-td acenter" width="24.48%"><p style="text-align:center">0.2</p></td> 
       <td class="custom-top-td acenter" width="23.11%"><p style="text-align:center">0.2</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.4</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.4</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">R-Squared</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.99</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.99</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="27.40%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="24.48%"><p style="text-align:center">0.3%</p></td> 
       <td class="acenter" width="23.11%"><p style="text-align:center">0.3%</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>Continued</p>
    <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
     <tr> 
      <td rowspan="4" class="custom-top-td acenter" width="25.00%"><p style="text-align:center">PG</p></td> 
      <td class="custom-top-td acenter" width="27.40%"><p style="text-align:center">MSE</p></td> 
      <td class="custom-top-td acenter" width="24.48%"><p style="text-align:center">0.5</p></td> 
      <td class="custom-top-td acenter" width="23.11%"><p style="text-align:center">0.3</p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="27.40%"><p style="text-align:center">MAE</p></td> 
      <td class="acenter" width="24.48%"><p style="text-align:center">0.7</p></td> 
      <td class="acenter" width="23.11%"><p style="text-align:center">0.5</p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="27.40%"><p style="text-align:center">R-Squared</p></td> 
      <td class="acenter" width="24.48%"><p style="text-align:center">0.98</p></td> 
      <td class="acenter" width="23.11%"><p style="text-align:center">0.99</p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="27.40%"><p style="text-align:center">MAPE</p></td> 
      <td class="acenter" width="24.48%"><p style="text-align:center">0.5%</p></td> 
      <td class="acenter" width="23.11%"><p style="text-align:center">0.3%</p></td> 
     </tr> 
    </table>
    <p>
     <xref ref-type="fig" rid="fig9">
      Figure 9
     </xref> presents the performance of BiGRU and BiLSTM models in various financial sectors. Notably, the predictions generated by the BiGRU model exhibit greater efficiency compared to those produced by the BiLSTM model. As illustrated in <xref ref-type="table" rid="table2">
      Table 2
     </xref>, a comparative analysis reveals the superior performance of BiGRU-based predictions over BiLSTM for both AAPL and the highly volatile BTC-USD. Specifically, for AAPL, the evaluation metrics indicate a lower MSE of 0.14 for BiGRU in contrast to 0.40 for BiLSTM, signifying the enhanced accuracy of BiGRU predictions. This suggests that the predicted values generated by BiGRU closely align with the actual values. Moreover, BiGRU exhibits a reduced MAE compared to BiLSTM, indicating a lower error in BiGRU predictions. The error percentage for BiGRU is notably lower at 0.18%, while for BiLSTM, it stands at 0.30% in the case of AAPL. This observation is evident in <xref ref-type="fig" rid="fig9(a)">
      Figure 9(a)
     </xref> and <xref ref-type="fig" rid="fig9(b)">
      Figure 9(b)
     </xref>, where the predictions for AAPL using BiGRU are notably sharp and accurate in contrast to those based on BiLSTM. In the context of highly volatile cryptocurrencies, such as BTC-USD, BiGRU outperforms BiLSTM, demonstrating superior performance with a minimal Mean Squared Error (MSE) of 0.0003. Moreover, when considering Mean Absolute Error (MAE), BiGRU exhibits lower values. In terms of error percentage, predictions based on BiGRU exhibit a 0.58% error, whereas BiLSTM-based predictions show a higher error rate of 0.90%. This observation is evident in <xref ref-type="fig" rid="fig9(k)">
      Figure 9(k)
     </xref> and <xref ref-type="fig" rid="fig9(l)">
      Figure 9(l)
     </xref>, where the predictions for BTC generated by BiGRU are characterized by sharp precision, contrasting with the less precise predictions produced by BiLSTM.</p>
    <fig-group id="fig11" position="float">
     <fig id="fig11" position="float">
      <label>Figure 11</label>
      <caption>
       <title>Figure 9. BiLSTM and BiGRU predictions. (a) BiLSTM-based AAPL prediction; (b) BiGRU-based AAPL prediction; (c) BiLSTM-based JNJ prediction; (d) BiGRU-based JNJ prediction; (e) BiLSTM-based BAC prediction; (f) BiGRU-based BAC prediction; (g) BiLSTM-based CVX prediction; (h) BiGRU-based CVX prediction; (i) BiLSTM-based PG prediction; (j) BiGRU-based PG prediction; (k) BiLSTM-based BTC prediction; (l) BiGRU-based BTC prediction.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId113.jpeg?20241012094227" />
     </fig>
     <fig id="fig11" position="float">
      <label>Figure 11</label>
      <caption>
       <title>Figure 9. BiLSTM and BiGRU predictions. (a) BiLSTM-based AAPL prediction; (b) BiGRU-based AAPL prediction; (c) BiLSTM-based JNJ prediction; (d) BiGRU-based JNJ prediction; (e) BiLSTM-based BAC prediction; (f) BiGRU-based BAC prediction; (g) BiLSTM-based CVX prediction; (h) BiGRU-based CVX prediction; (i) BiLSTM-based PG prediction; (j) BiGRU-based PG prediction; (k) BiLSTM-based BTC prediction; (l) BiGRU-based BTC prediction.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId114.jpeg?20241012094226" />
     </fig>
     <fig id="fig11" position="float">
      <label>Figure 11</label>
      <caption>
       <title>Figure 9. BiLSTM and BiGRU predictions. (a) BiLSTM-based AAPL prediction; (b) BiGRU-based AAPL prediction; (c) BiLSTM-based JNJ prediction; (d) BiGRU-based JNJ prediction; (e) BiLSTM-based BAC prediction; (f) BiGRU-based BAC prediction; (g) BiLSTM-based CVX prediction; (h) BiGRU-based CVX prediction; (i) BiLSTM-based PG prediction; (j) BiGRU-based PG prediction; (k) BiLSTM-based BTC prediction; (l) BiGRU-based BTC prediction.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId115.jpeg?20241012094227" />
     </fig>
    </fig-group>
    <p>Similar observations can be made for the financial assets of the other sectors as well. Therefore, While both BiLSTM and BiGRU demonstrate accurate price predictions and closely align with the actual data, the BiGRU algorithm outperforms the BiLSTM algorithm, particularly for highly unpredictable assets, showcasing greater accuracy.</p>
   </sec>
   <sec id="s5_3">
    <title>5.3. Portfolio Performance</title>
    <p>In the creation of financial portfolios, this study explores the Data-Driven approach, taking into account essential features of financial time series, such as non-normality, which are often overlooked by traditional methods. These features play a crucial role in constructing robust portfolios. Additionally, the study incorporates the concept of diversification in stock selection. The performance of portfolios is evaluated under two scenarios: 1) where all stocks are included without specific selection (no diversification), and 2) where the affinity propagation clustering technique is employed to introduce diversity in stock selection. Consequently, the study assesses the performance of data-driven portfolios with and without clustering, providing insights into the impact of diversification on portfolio performance.</p>
    <p>In this research, we build portfolios encompassing 15 stocks and 2 cryptocurrencies, incorporating both real and forecasted data.</p>
    <p>The efficient frontiers of the constructed portfolios are alike for both predicted and actual data, given the close resemblance between the actual values and the predicted values generated by both BiLSTM and BiGRU. The efficient frontiers constructed with four data-driven risk measures are illustrated in <xref ref-type="fig" rid="fig10">
      Figure 10
     </xref>. This figure presents the efficient frontiers for portfolios formed with four data-driven risk measures. In <xref ref-type="fig" rid="fig10(b)">
      Figure 10(b)
     </xref>, it can be observed that the portfolio constructed with VES-based risk measure showed maximum profitability.</p>
    <fig-group id="fig12" position="float">
     <fig id="fig12" position="float">
      <label>Figure 12</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 10. Performance of portfolio based on data-driven risk measures. (a) Efficient Frontier based on VESV risk measure; (b) Efficient Frontier based on VES risk measure; (c) Efficient Frontier based on VEV risk measure; (d) Efficient Frontier based on MAD risk measure.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId116.jpeg?20241012094229" />
     </fig>
     <fig id="fig12" position="float">
      <label>Figure 12</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 10. Performance of portfolio based on data-driven risk measures. (a) Efficient Frontier based on VESV risk measure; (b) Efficient Frontier based on VES risk measure; (c) Efficient Frontier based on VEV risk measure; (d) Efficient Frontier based on MAD risk measure.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId117.jpeg?20241012094229" />
     </fig>
     <fig id="fig12" position="float">
      <label>Figure 12</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 10. Performance of portfolio based on data-driven risk measures. (a) Efficient Frontier based on VESV risk measure; (b) Efficient Frontier based on VES risk measure; (c) Efficient Frontier based on VEV risk measure; (d) Efficient Frontier based on MAD risk measure.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId118.jpeg?20241012094229" />
     </fig>
     <fig id="fig12" position="float">
      <label>Figure 12</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 10. Performance of portfolio based on data-driven risk measures. (a) Efficient Frontier based on VESV risk measure; (b) Efficient Frontier based on VES risk measure; (c) Efficient Frontier based on VEV risk measure; (d) Efficient Frontier based on MAD risk measure.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId119.jpeg?20241012094229" />
     </fig>
    </fig-group>
    <p>
     <xref ref-type="fig" rid="fig11">
      Figure 11
     </xref> illustrates the optimization of portfolio weights under two paradigms: minimum risk and maximum Sharpe ratio for both actual and predicted values. <xref ref-type="fig" rid="fig11(b)">
      Figure 11(b)
     </xref> and <xref ref-type="fig" rid="fig11(d)">
      Figure 11(d)
     </xref> indicate a striking resemblance between portfolio weight optimization based on predicted price data and that based on actual data.</p>
    <p>Utilizing affinity propagation for stock selection revealed the presence of six clusters. To enhance diversification in the stock selection process, this research identifies the financial asset with the highest mean returns within each cluster. Consequently, the stocks chosen from each cluster are incorporated to construct a robust portfolio. This approach ensures diversification in the portfolio, a critical factor in bolstering its resilience.</p>
    <p>
     <xref ref-type="fig" rid="fig12">
      Figure 12
     </xref> presents the performance of portfolios constructed with diversification under four data-driven risk measures. Here, portfolios constructed with both actual and predicted data showed similar efficient frontiers. In <xref ref-type="fig" rid="fig12(c)">
      Figure 12(c)
     </xref>, it could be observed that the portfolio constructed with VEV-based risk measure showed maximum profitability compared to the risk.</p>
    <fig-group id="fig13" position="float">
     <fig id="fig13" position="float">
      <label>Figure 13</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 11. Portfolio weight distribution based on risk and Sharpe ratio: actual and predicted data. (a) Minimum Risk Portfolio with actual data; (b) Minimum Risk Portfolio with predicted data; (c) Tangency Portfolio: max Sharpe ratio with actual data; (d) Tangency Portfolio: max Sharpe ratio with predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId120.jpeg?20241012094230" />
     </fig>
     <fig id="fig13" position="float">
      <label>Figure 13</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 11. Portfolio weight distribution based on risk and Sharpe ratio: actual and predicted data. (a) Minimum Risk Portfolio with actual data; (b) Minimum Risk Portfolio with predicted data; (c) Tangency Portfolio: max Sharpe ratio with actual data; (d) Tangency Portfolio: max Sharpe ratio with predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId120.jpeg?20241012094230" />
     </fig>
     <fig id="fig13" position="float">
      <label>Figure 13</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 11. Portfolio weight distribution based on risk and Sharpe ratio: actual and predicted data. (a) Minimum Risk Portfolio with actual data; (b) Minimum Risk Portfolio with predicted data; (c) Tangency Portfolio: max Sharpe ratio with actual data; (d) Tangency Portfolio: max Sharpe ratio with predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId121.jpeg?20241012094230" />
     </fig>
     <fig id="fig13" position="float">
      <label>Figure 13</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 11. Portfolio weight distribution based on risk and Sharpe ratio: actual and predicted data. (a) Minimum Risk Portfolio with actual data; (b) Minimum Risk Portfolio with predicted data; (c) Tangency Portfolio: max Sharpe ratio with actual data; (d) Tangency Portfolio: max Sharpe ratio with predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId121.jpeg?20241012094230" />
     </fig>
    </fig-group>
    <fig-group id="fig14" position="float">
     <fig id="fig14" position="float">
      <label>Figure 14</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 12. Performance of portfolio based on data-driven risk measures. (a) Efficient Frontier based on VESV risk measure; (b) Efficient Frontier based on VES risk measure; (c) Efficient Frontier based on VEV risk measure; (d) Efficient Frontier based on MAD risk measure.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId122.jpeg?20241012094229" />
     </fig>
     <fig id="fig14" position="float">
      <label>Figure 14</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 12. Performance of portfolio based on data-driven risk measures. (a) Efficient Frontier based on VESV risk measure; (b) Efficient Frontier based on VES risk measure; (c) Efficient Frontier based on VEV risk measure; (d) Efficient Frontier based on MAD risk measure.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId123.jpeg?20241012094230" />
     </fig>
     <fig id="fig14" position="float">
      <label>Figure 14</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 12. Performance of portfolio based on data-driven risk measures. (a) Efficient Frontier based on VESV risk measure; (b) Efficient Frontier based on VES risk measure; (c) Efficient Frontier based on VEV risk measure; (d) Efficient Frontier based on MAD risk measure.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId124.jpeg?20241012094229" />
     </fig>
     <fig id="fig14" position="float">
      <label>Figure 14</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 12. Performance of portfolio based on data-driven risk measures. (a) Efficient Frontier based on VESV risk measure; (b) Efficient Frontier based on VES risk measure; (c) Efficient Frontier based on VEV risk measure; (d) Efficient Frontier based on MAD risk measure.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId125.jpeg?20241012094229" />
     </fig>
    </fig-group>
    <p>Upon comparing <xref ref-type="fig" rid="fig10">
      Figure 10
     </xref> and <xref ref-type="fig" rid="fig12">
      Figure 12
     </xref>, it is observed that the portfolios’ performance doubled across all data-driven risk measures following the implementation of diversification through Affinity Propagation clustering for stock selection.</p>
    <p>
     <xref ref-type="fig" rid="fig13">
      Figure 13
     </xref> depicts the optimization of portfolio weights employing two approaches: minimizing risk and maximizing the Sharpe ratio for both actual and predicted values. A notable similarity in portfolio weight optimization between predicted and actual data is observed in <xref ref-type="fig" rid="fig13(b)">
      Figure 13(b)
     </xref> and <xref ref-type="fig" rid="fig13(d)">
      Figure 13(d)
     </xref>.</p>
    <fig-group id="fig15" position="float">
     <fig id="fig15" position="float">
      <label>Figure 15</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 13. Portfolio weight distribution based on risk and Sharpe ratio with actual and predicted data. (a) Minimum Risk Portfolio with actual data; (b) Minimum Risk Portfolio with predicted data; (c) Tangency Portfolio: max Sharpe ratio with actual data; (d) Tangency Portfolio: max Sharpe ratio with predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId126.jpeg?20241012094229" />
     </fig>
     <fig id="fig15" position="float">
      <label>Figure 15</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 13. Portfolio weight distribution based on risk and Sharpe ratio with actual and predicted data. (a) Minimum Risk Portfolio with actual data; (b) Minimum Risk Portfolio with predicted data; (c) Tangency Portfolio: max Sharpe ratio with actual data; (d) Tangency Portfolio: max Sharpe ratio with predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId126.jpeg?20241012094229" />
     </fig>
     <fig id="fig15" position="float">
      <label>Figure 15</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 13. Portfolio weight distribution based on risk and Sharpe ratio with actual and predicted data. (a) Minimum Risk Portfolio with actual data; (b) Minimum Risk Portfolio with predicted data; (c) Tangency Portfolio: max Sharpe ratio with actual data; (d) Tangency Portfolio: max Sharpe ratio with predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId127.jpeg?20241012094229" />
     </fig>
     <fig id="fig15" position="float">
      <label>Figure 15</label>
      <caption>
       <title>(a)--(b)--(c)--(d)--Figure 13. Portfolio weight distribution based on risk and Sharpe ratio with actual and predicted data. (a) Minimum Risk Portfolio with actual data; (b) Minimum Risk Portfolio with predicted data; (c) Tangency Portfolio: max Sharpe ratio with actual data; (d) Tangency Portfolio: max Sharpe ratio with predicted data.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1491116-rId127.jpeg?20241012094229" />
     </fig>
    </fig-group>
    <p>The proficient performance of the BiLSTM and BiGRU algorithms in predicting financial asset prices across diverse market conditions leads to negligible discrepancies between actual and forecasted prices. Consequently, the data-driven algorithm exhibits comparable efficiency in portfolio weight optimization using both actual and data-driven approaches. The evaluation of these two algorithms suggests that the innovative integration of BiLSTM/BiGRU with the data-driven portfolio optimization algorithm constitutes a lucrative technique. This approach demonstrates maximum profitability under diverse market conditions and with stocks from various sectors. In certain instances, in the domain of time series predictions, it has been observed that the fundamental GRU architecture outperforms the LSTM model, as documented by Yamak et al. <xref ref-type="bibr" rid="scirp.133998-59">
      [59]
     </xref>. Drawing a parallel from this observation, a similar trend is discerned in the comparison between BiGRU and BiLSTM architectures. The rationale behind this superiority of GRU-based architectures may be attributed to their inherent design characteristics, such as a simplified structure with fewer parameters and the absence of an explicit memory cell. These attributes enable GRU models to capture and retain relevant information more efficiently in certain contexts, potentially leading to enhanced performance in specific time series prediction scenarios.</p>
   </sec>
  </sec><sec id="s6">
   <title>6. Key Findings</title>
   <p>From the results section, this study identifies the following key findings from this research.</p>
   <p>1) Based on the observed results from <xref ref-type="table" rid="table2">
     Table 2
    </xref> and <xref ref-type="fig" rid="fig9">
     Figure 9
    </xref>, superior performance of BiGRU-based predictions is observed compared to BiLSTM predictions.</p>
   <p>2) Comparing <xref ref-type="fig" rid="fig10">
     Figure 10
    </xref> and <xref ref-type="fig" rid="fig12">
     Figure 12
    </xref>, it is observed introduction of diversification through Affinity Propagation enhances portfolio performance by twofold compared to portfolios without diversification.</p>
   <p>3) In <xref ref-type="fig" rid="fig10(b)">
     Figure 10(b)
    </xref>, where portfolio construction lacks diversification, portfolios utilizing the VES-based risk measure exhibit superior performance compared to those constructed with alternative data-driven risk measures. Conversely, in <xref ref-type="fig" rid="fig12(c)">
     Figure 12(c)
    </xref>, with diversification incorporated into portfolio construction, portfolios employing the VEV-based risk measure demonstrate outperformance over portfolios constructed with other data-driven risk measures.</p>
   <p>4) Utilizing a data-driven approach for portfolio weight optimization, coupled with diversification through clustering techniques proves to be effective when implementing BiLSTM and BiGRU-based predictions.</p>
   <p>5) BiGRU demonstrates significant effectiveness in predicting prices compared to BiLSTM. Therefore, it is recommended to prefer BiGRU, particularly when dealing with dynamic market conditions and highly volatile assets, when constructing robust portfolios.</p>
  </sec><sec id="s7">
   <title>7. Practicality, Limitations and Future Plan</title>
   <p>The methodology proposed involves training the model across diverse market conditions spanning the period from 1998 to 2022. Subsequently, the algorithm undergoes rigorous testing using data from the year 2023, employing a suite of significant evaluation metrics. The algorithm, as proposed, adeptly assimilates patterns learned from historical observations, retaining contextual insights from pivotal crisis events (2001 dot-com burst, 2008 global crisis). Consequently, the optimized technique demonstrates notable efficacy in accurate prediction and the judicious optimization of portfolios to enhance profitability. Diversifying the portfolio almost doubled its ability to withstand challenges. The algorithm proposed is ready for practical use in industry after a few adjustments. These changes would involve considering transaction costs, liquidity of the assets, interest rates, inflation, and other macroeconomic factors. While the suggested method has been employed by training with significant market crises, there is an opportunity to subject it to further testing across diverse market scenarios, including both bullish and bearish conditions. Additionally, incorporating a range of economic factors beyond these scenarios would enhance the applicability of the approach, making it a more robust tool for portfolio managers. Exploring these avenues constitutes the forthcoming direction of our research.</p>
  </sec><sec id="s8">
   <title>8. Conclusions</title>
   <p>In this study, the focal point has been resilient portfolio construction by incorporating deep learning and data-driven portfolio optimization techniques. Achieving resilience in portfolios involves not only accurate stock prediction but also effective stock selection for diversification. The core of efficient portfolio construction lies in the accurate forecast of stock prices, ensuring profitability across diverse market conditions. This study has investigated the effectiveness of two bidirectional recurrent neural networks, BiLSTM and BiGRU, in predicting stock prices under varying market conditions with financial assets from different sectors. The comparative analysis in this paper revealed the superior efficacy of BiGRU over BiLSTM in forecasting prices under challenging circumstances for financial assets across sectors.</p>
   <p>To construct portfolios this study has employed forecasted data alongside actual data using a data-driven approach for the year 2023. The research indicates that employing deep learning-based predicted data for data-driven portfolio optimization yielded results that are quite comparable with actual data. This approach was tested both with and without diversification in stock selection. Diversified portfolios outperformed non-diversified ones, demonstrating almost twice the performance. For non-diversified portfolios, those utilizing the sign-correlation reduction based (that is, VES-based) risk measure showed favorable performance compared to portfolios built with other data-driven risk measures (VEV, VESV and MAD). In the case of diversified portfolios, those employing the volatility correlation reduction based (that is, VEV-based) risk measure outperformed portfolios with other data-driven risk measures (VES, VESV and MAD).</p>
   <p>In essence, the proposed novel deep learning-based data-driven portfolio optimization technique ensures maximum profitability under diverse market conditions. The incorporation of diversification with Affinity propagation enhances profitability, and selecting appropriate risk measures further improves overall portfolio performance. This study contributes valuable insights for robust portfolio construction, leveraging advanced techniques for enhanced decision-making in financial markets. Further improvements in results could be achieved by considering recent advances in quantum machine learning concepts.</p>
  </sec><sec id="s9">
   <title>Acknowledgements</title>
   <p>The first two authors acknowledge financial support from the University of Manitoba Graduate Fellowship (UMGF) and Graduate Enhancement of Tri-Council Stipends (GETS), University of Manitoba. The last two authors acknowledge the Discovery Grants from the Natural Sciences and Engineering Research Council (NSERC) Canada.</p>
  </sec><sec id="s10">
   <title>NOTES</title>
   <p><sup>1</sup><xref ref-type="bibr" rid="scirp.133998-https://www.gartner.com/en/finance/topics/finance-ai">
     https://www.gartner.com/en/finance/topics/finance-ai
    </xref>.</p>
   <p><sup>2</sup><xref ref-type="bibr" rid="scirp.133998-https://colah.github.io/posts/2015-08-Understanding-LSTMs/">
     https://colah.github.io/posts/2015-08-Understanding-LSTMs/
    </xref>.</p>
   <p><sup>3</sup><xref ref-type="bibr" rid="scirp.133998-https://8f430952.rocketcdn.me/wp-content/uploads/2021/07/image-5.jpeg">
     https://8f430952.rocketcdn.me/wp-content/uploads/2021/07/image-5.jpeg
    </xref>.</p>
   <p><sup>4</sup><xref ref-type="bibr" rid="scirp.133998-https://www.researchgate.net/figure/GRU-structure-diagram_fig2_355705028">
     https://www.researchgate.net/figure/GRU-structure-diagram_fig2_355705028
    </xref>.</p>
   <p><sup>5</sup><xref ref-type="bibr" rid="scirp.133998-https://www.researchgate.net/publication/366162819/figure/fig1/AS:11431281106354346@1670632077172/BiGRU-model-structure-diagram.jpg">
     https://www.researchgate.net/publication/366162819/figure/fig1/AS:11431281106354346@1670632077172/BiGRU-model-structure-diagram.jpg
    </xref>.</p>
   <p><sup>6</sup><xref ref-type="bibr" rid="scirp.133998-https://www.frontiersin.org/files/Articles/10792/fninf-05-00018-r1/image_m/fninf-05-00018-g003.jpg">
     https://www.frontiersin.org/files/Articles/10792/fninf-05-00018-r1/image_m/fninf-05-00018-g003.jpg
    </xref>.</p>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.133998-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Markowitz, H. (1952) Portfolio Selection. The Journal of Finance, 7, 77-91. &gt;https://doi.org/10.1111/j.1540-6261.1952.tb01525.x
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Fabozzi, F.J., Gupta, F. and Markowitz, H.M. (2002) The Legacy of Modern Portfolio Theory. The Journal of Investing, 11, 7-22. &gt;https://doi.org/10.3905/joi.2002.319510
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mossin, J. (1966) Equilibrium in a Capital Asset Market. Econometrica, 34, 768-783. &gt;https://doi.org/10.2307/1910098
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Treynor, J.L. (1962) Toward a Theory of Market Value of Risky Assets. Risk Books, 15-22.
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Lintner, J. (1965) The Valuation of Risk Assets and the Selection of Risky Investments in Stock Portfolios and Capital Budgets. The Review of Economics and Statistics, 47, 13-37. &gt;https://doi.org/10.2307/1924119
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sharpe, W.F. (1964) Capital Asset Prices: A Theory of Market Equilibrium under Conditions of Risk. The Journal of Finance, 19, 425-442. &gt;https://doi.org/10.1111/j.1540-6261.1964.tb02865.x
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Fama, E.F. and French, K.R. (2004) The Capital Asset Pricing Model: Theory and Evidence. Journal of Economic Perspectives, 18, 25-46. &gt;https://doi.org/10.1257/0895330042162430
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Solnik, B. (1983) International Arbitrage Pricing Theory. The Journal of Finance, 38, 449-457. &gt;https://doi.org/10.1111/j.1540-6261.1983.tb02251.x
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Cheung, W. (2010) The Black-Litterman Model Explained. Journal of Asset Management, 11, 229-243. &gt;https://doi.org/10.1057/jam.2009.28
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Costa, G. and Kwon, R.H. (2018) Risk Parity Portfolio Optimization under a Markov Regime-Switching Framework. Quantitative Finance, 19, 453-471. &gt;https://doi.org/10.1080/14697688.2018.1486036
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Broadie, M. (1993) Computing Efficient Frontiers Using Estimated Parameters. Annals of Operations Research, 45, 21-58. &gt;https://doi.org/10.1007/bf02282040
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Detemple, J.B., Garcia, R. and Rindisbacher, M. (2003) A Monte Carlo Method for Optimal Portfolios. The Journal of Finance, 58, 401-446. &gt;https://doi.org/10.1111/1540-6261.00529
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Pai, G.A.V. (2017) Metaheuristics for Portfolio Optimization. Wiley. &gt;https://doi.org/10.1002/9781119482840
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sharpe, W.F. (1966) Mutual Fund Performance. The Journal of Business, 39, 119-138. &gt;https://doi.org/10.1086/294846
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhao, Y. and Yang, G. (2023) Deep Learning-Based Integrated Framework for Stock Price Movement Prediction. Applied Soft Computing, 133, Article ID: 109921. &gt;https://doi.org/10.1016/j.asoc.2022.109921
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     M, H., E.A., G., Menon, V.K. and K.P., S. (2018) NSE Stock Market Prediction Using Deep-Learning Models. Procedia Computer Science, 132, 1351-1362. &gt;https://doi.org/10.1016/j.procs.2018.05.050
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sirisha, U.M., Belavagi, M.C. and Attigeri, G. (2022) Profit Prediction Using ARIMA, SARIMA and LSTM Models in Time Series Forecasting: A Comparison. IEEE Access, 10, 124715-124727. &gt;https://doi.org/10.1109/access.2022.3224938
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref18">
    <label>18</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Kumbure, M.M., Lohrmann, C., Luukka, P. and Porras, J. (2022) Machine Learning Techniques and Data for Stock Market Forecasting: A Literature Review. Expert Systems with Applications, 197, Article ID: 116659. &gt;https://doi.org/10.1016/j.eswa.2022.116659
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref19">
    <label>19</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Shahi, T.B., Shrestha, A., Neupane, A. and Guo, W. (2020) Stock Price Forecasting with Deep Learning: A Comparative Study. Mathematics, 8, Article 1441. &gt;https://doi.org/10.3390/math8091441
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref20">
    <label>20</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Pintelas, E., Livieris, I.E., Stavroyiannis, S., Kotsilieris, T. and Pintelas, P. (2020) Investigating the Problem of Cryptocurrency Price Prediction: A Deep Learning Approach. In: Maglogiannis, I., Iliadis, L. and Pimenidis, E., Eds., Artificial Intelligence Applications and Innovations, Springer, 99-110. &gt;https://doi.org/10.1007/978-3-030-49186-4_9
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref21">
    <label>21</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ban, G., El Karoui, N. and Lim, A.E.B. (2018) Machine Learning and Portfolio Optimization. Management Science, 64, 1136-1154. &gt;https://doi.org/10.1287/mnsc.2016.2644
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref22">
    <label>22</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chen, W., Zhang, H., Mehlawat, M.K. and Jia, L. (2021) Mean-Variance Portfolio Optimization Using Machine Learning-Based Stock Price Prediction. Applied Soft Computing, 100, Article ID: 106943. &gt;https://doi.org/10.1016/j.asoc.2020.106943
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref23">
    <label>23</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Paiva, F.D., Cardoso, R.T.N., Hanaoka, G.P. and Duarte, W.M. (2019) Decision-making for Financial Trading: A Fusion Approach of Machine Learning and Portfolio Selection. Expert Systems with Applications, 115, 635-655. &gt;https://doi.org/10.1016/j.eswa.2018.08.003
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref24">
    <label>24</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhang, Z., Zohren, S. and Roberts, S. (2020) Deep Learning for Portfolio Optimization. The Journal of Financial Data Science, 2, 8-20. &gt;https://doi.org/10.3905/jfds.2020.1.042
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref25">
    <label>25</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ma, Y., Han, R. and Wang, W. (2021) Portfolio Optimization with Return Prediction Using Deep Learning and Machine Learning. Expert Systems with Applications, 165, Article ID: 113973. &gt;https://doi.org/10.1016/j.eswa.2020.113973
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref26">
    <label>26</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Cao, H.K., Cao, H.K. and Nguyen, B.T. (2020) Delafo: An Efficient Portfolio Optimization Using Deep Neural Networks. In: Lauw, H., Wong, R.W., Ntoulas, A., Lim, E.P., Ng, S.K. and Pan, S., Eds., Advances in Knowledge Discovery and Data Mining, Springer, 623-635. &gt;https://doi.org/10.1007/978-3-030-47426-3_48
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref27">
    <label>27</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sharma, M. and Shekhawat, H.S. (2022) Portfolio Optimization and Return Prediction by Integrating Modified Deep Belief Network and Recurrent Neural Network. Knowledge-Based Systems, 250, Article ID: 109024. &gt;https://doi.org/10.1016/j.knosys.2022.109024
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref28">
    <label>28</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Singh, P., Jha, M., Sharaf, M., El-Meligy, M.A. and Gadekallu, T.R. (2023) Harnessing a Hybrid CNN-LSTM Model for Portfolio Performance: A Case Study on Stock Selection and Optimization. IEEE Access, 11, 104000-104015. &gt;https://doi.org/10.1109/access.2023.3317953
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref29">
    <label>29</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Cui, T., Du, N., Yang, X. and Ding, S. (2024) Multi-period Portfolio Optimization Using a Deep Reinforcement Learning Hyper-Heuristic Approach. Technological Forecasting and Social Change, 198, Article ID: 122944. &gt;https://doi.org/10.1016/j.techfore.2023.122944
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref30">
    <label>30</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Thavaneswaran, A., Liang, Y., Yu, N., Paseka, A. and Thulasiram, R.K. (2021) Novel Data-Driven Resilient Portfolio Risk Measures Using Sign and Volatility Correlations. 2021 IEEE 45th Annual Computers, Software, and Applications Conference (COMPSAC), Madrid, 12-16 July 2021, 1742-1747. &gt;https://doi.org/10.1109/compsac51774.2021.00260
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref31">
    <label>31</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Bowala, S. and Singh, J. (2022) Optimizing Portfolio Risk of Cryptocurrencies Using Data-Driven Risk Measures. Journal of Risk and Financial Management, 15, Article 427. &gt;https://doi.org/10.3390/jrfm15100427
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref32">
    <label>32</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Choueifaty, Y. and Coignard, Y. (2008) Toward Maximum Diversification. The Journal of Portfolio Management, 35, 40-51. &gt;https://doi.org/10.3905/jpm.2008.35.1.40
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref33">
    <label>33</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Das, J.D., Bowala, S., Thulasiram, R.K. and Thavaneswaran, A. (2023) Resilient Portfolio Optimization Using Traditional and Data-Driven Models for Cryptocurrencies and Stocks. 2023 IEEE 47th Annual Computers, Software, and Applications Conference (COMPSAC), Torino, 26-30 June 2023, 1343-1348. &gt;https://doi.org/10.1109/compsac57700.2023.00204
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref34">
    <label>34</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Das, J.D., Bowala, S., Thulasiram, R.K. and Thavaneswaran, A. (2023) Portfolio Diversification with Clustering Techniques. 2023 IEEE Symposium Series on Computational Intelligence (SSCI), Mexico City, 5-8 December 2023, 97-102. &gt;https://doi.org/10.1109/ssci52147.2023.10371938
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref35">
    <label>35</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Rundo, F., Trenta, F., di Stallo, A.L. and Battiato, S. (2019) Machine Learning for Quantitative Finance Applications: A Survey. Applied Sciences, 9, Article 5574. &gt;https://doi.org/10.3390/app9245574
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref36">
    <label>36</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Vijh, M., Chandola, D., Tikkiwal, V.A. and Kumar, A. (2020) Stock Closing Price Prediction Using Machine Learning Techniques. Procedia Computer Science, 167, 599-606. &gt;https://doi.org/10.1016/j.procs.2020.03.326
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref37">
    <label>37</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yang, Y. and Hospedales, T.M. (2023) An Evaluation of Self-Supervised Learning for Portfolio Diversification. In: Iliadis, L., Papaleonidas, A., Angelov, P. and Jayne, C., Eds., Artificial Neural Networks and Machine Learning—ICANN 2023, Springer, 283-294. &gt;https://doi.org/10.1007/978-3-031-44213-1_24
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref38">
    <label>38</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Jaimungal, S. (2021) Reinforcement Learning and Stochastic Optimisation. Finance and Stochastics, 26, 103-129. &gt;https://doi.org/10.1007/s00780-021-00467-2
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref39">
    <label>39</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Snow, D. (2020) Machine Learning in Asset Management—Part 2: Portfolio Construction—Weight Optimization. The Journal of Financial Data Science, 2, 17-24. &gt;https://doi.org/10.3905/jfds.2020.1.029
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref40">
    <label>40</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Kaczmarek, T. and Perez, K. (2021) Building Portfolios Based on Machine Learning Predictions. Economic Research-Ekonomska Istraživanja, 35, 19-37. &gt;https://doi.org/10.1080/1331677x.2021.1875865
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref41">
    <label>41</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Jiang, Z., Ji, R. and Chang, K. (2020) A Machine Learning Integrated Portfolio Rebalance Framework with Risk-Aversion Adjustment. Journal of Risk and Financial Management, 13, Article 155. &gt;https://doi.org/10.3390/jrfm13070155
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref42">
    <label>42</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Behera, J., Pasayat, A.K., Behera, H. and Kumar, P. (2023) Prediction Based Mean-Value-at-Risk Portfolio Optimization Using Machine Learning Regression Algorithms for Multi-National Stock Markets. Engineering Applications of Artificial Intelligence, 120, Article ID: 105843. &gt;https://doi.org/10.1016/j.engappai.2023.105843
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref43">
    <label>43</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Hu, Z., Zhao, Y. and Khushi, M. (2021) A Survey of Forex and Stock Price Prediction Using Deep Learning. Applied System Innovation, 4, Article 9. &gt;https://doi.org/10.3390/asi4010009
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref44">
    <label>44</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Jiang, W. (2021) Applications of Deep Learning in Stock Market Prediction: Recent Progress. Expert Systems with Applications, 184, Article ID: 115537. &gt;https://doi.org/10.1016/j.eswa.2021.115537
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref45">
    <label>45</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Nikou, M., Mansourfar, G. and Bagherzadeh, J. (2019) Stock Price Prediction Using DEEP Learning Algorithm and Its Comparison with Machine Learning Algorithms. Intelligent Systems in Accounting, Finance and Management, 26, 164-174. &gt;https://doi.org/10.1002/isaf.1459
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref46">
    <label>46</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Fernández, A. and Gómez, S. (2007) Portfolio Selection Using Neural Networks. Computers&amp;Operations Research, 34, 1177-1191. &gt;https://doi.org/10.1016/j.cor.2005.06.017
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref47">
    <label>47</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Uysal, A.S., Li, X. and Mulvey, J.M. (2023) End-to-End Risk Budgeting Portfolio Optimization with Neural Networks. Annals of Operations Research, 339, 397-426. &gt;https://doi.org/10.1007/s10479-023-05539-4
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref48">
    <label>48</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yu, L., Wang, S. and Lai, K.K. (2008) Neural Network-Based Mean-Variance-Skewness Model for Portfolio Selection. Computers&amp;Operations Research, 35, 34-46. &gt;https://doi.org/10.1016/j.cor.2006.02.012
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref49">
    <label>49</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Jang, J. and Seong, N. (2023) Deep Reinforcement Learning for Stock Portfolio Optimization by Connecting with Modern Portfolio Theory. Expert Systems with Applications, 218, Article ID: 119556. &gt;https://doi.org/10.1016/j.eswa.2023.119556
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref50">
    <label>50</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yang, S. (2023) Deep Reinforcement Learning for Portfolio Management. Knowledge-Based Systems, 278, Article ID: 110905. &gt;https://doi.org/10.1016/j.knosys.2023.110905
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref51">
    <label>51</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ngo, V.M., Nguyen, H.H. and Van Nguyen, P. (2023) Does Reinforcement Learning Outperform Deep Learning and Traditional Portfolio Optimization Models in Frontier and Developed Financial Markets? Research in International Business and Finance, 65, Article ID: 101936. &gt;https://doi.org/10.1016/j.ribaf.2023.101936
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref52">
    <label>52</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Xia, K., Huang, J. and Wang, H. (2020) LSTM-CNN Architecture for Human Activity Recognition. IEEE Access, 8, 56855-56866. &gt;https://doi.org/10.1109/access.2020.2982225
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref53">
    <label>53</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Luo, L. (2018) Network Text Sentiment Analysis Method Combining LDA Text Representation and GRU-CNN. Personal and Ubiquitous Computing, 23, 405-412. &gt;https://doi.org/10.1007/s00779-018-1183-9
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref54">
    <label>54</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Kim, T. and Kim, H.Y. (2019) Forecasting Stock Prices with a Feature Fusion LSTM-CNN Model Using Different Representations of the Same Data. PLOS ONE, 14, e0212320. &gt;https://doi.org/10.1371/journal.pone.0212320
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref55">
    <label>55</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Pierre, A.A., Akim, S.A., Semenyo, A.K. and Babiga, B. (2023) Peak Electrical Energy Consumption Prediction by ARIMA, LSTM, GRU, ARIMA-LSTM and ARIMA-GRU Approaches. Energies, 16, Article 4739. &gt;https://doi.org/10.3390/en16124739
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref56">
    <label>56</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Lu, W., Li, J., Wang, J. and Qin, L. (2020) A CNN-BILSTM-AM Method for Stock Price Prediction. Neural Computing and Applications, 33, 4741-4753. &gt;https://doi.org/10.1007/s00521-020-05532-z
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref57">
    <label>57</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Pramesti, M.I., Indikawati, F.I. and Prahara, A. (2022) Multivariate Time Series Stock Price Data Prediction in the Banking Sector in Indonesia Using Bidirectional Long Short-Term Memory (biLSTM). Signal and Image Processing Letters, 4, 28-37.
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref58">
    <label>58</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Malla, J., Lavanya, C., Jayashree, J. and Vijayashree, J. (2022) Bidirectional Gated Recurrent Unit (BiGRU)-Based Bitcoin Price Prediction by News Sentiment Analysis. In: Reddy, V.S., Prasad, V.K., Wang, J. and Reddy, K.T.V., Eds., Soft Computing and Signal Processing. ICSCSP 2022, Springer, 31-40. &gt;https://doi.org/10.1007/978-981-19-8669-7_4
    </mixed-citation>
   </ref>
   <ref id="scirp.133998-ref59">
    <label>59</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yamak, P.T., Yujian, L. and Gadosey, P.K. (2019) A Comparison between ARIMA, LSTM, and GRU for Time Series Forecasting. Proceedings of the 2019 2nd International Conference on Algorithms, Computing and Artificial Intelligence, Sanya, 20-22 December 2019, 49-55. &gt;https://doi.org/10.1145/3377713.3377722
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>