ArticlePDF Available

A portfolio optimization model for return trend rate and risk trend rate based on machine learning

Authors:

Abstract and Figures

This paper presents a machine learning-based portfolio optimization model alongside a trading strategy algorithm. There are two distinct steps to the approach. Firstly, the long short-term memory (LSTM) neural network model was used to predict the closing price of stocks in the following 4 days. The average rise and fall rate over these four days is then calculated as the stock's return trend rate, which can measure the direction and intensity of the stock's rise and fall. The same method is used to predict the average of the industry index's rise and fall rate over the next four days as the risk trend rate. In the second step, the improved mean–variance model (IMV) model is used to provide customers with the stock portfolio purchasing strategy based on the return trend rate and risk trend rate. The experimental results demonstrate that the approach has a certain application value and outperforms the traditional method in terms of annual returns and Sharpe ratio, using the Shanghai Stock Exchange and the Shenzhen Stock Exchange as study samples. The model shows approximately 1% improvement in prediction accuracy. The latest advancements in machine learning provide substantial prospects for tactics involving the purchase of portfolios.
Content may be subject to copyright.
IAES International Journal of Artificial Intelligence (IJ-AI)
Vol. 14, No. 2, April 2025, pp. 933~944
ISSN: 2252-8938, DOI: 10.11591/ijai.v14.i2.pp933-944 933
Journal homepage: http://ijai.iaescore.com
A portfolio optimization model for return trend rate and risk
trend rate based on machine learning
Chunman Zhu1,2, Ahmad Yahya Dawod1, Yu Xi1,3, Gongsuo Chen1,2
1International College of Digital Innovation, Chiang Mai University, Chiang Mai, Thailand
2School of Information and Engineering, Sichuan Tourism University, Chengdu, China
3Office of International Collaboration and Exchange, Chengdu University, Chengdu, China
Article Info
ABSTRACT
Article history:
Received Apr 7, 2024
Revised Oct 27, 2024
Accepted Nov 14, 2024
This paper presents a machine learning-based portfolio optimization model
alongside a trading strategy algorithm. There are two distinct steps to the
approach. Firstly, the long short-term memory (LSTM) neural network
model was used to predict the closing price of stocks in the following 4 days.
The average rise and fall rate over these four days is then calculated as the
stock's return trend rate, which can measure the direction and intensity of the
stock's rise and fall. The same method is used to predict the average of the
industry index's rise and fall rate over the next four days as the risk trend
rate. In the second step, the improved meanvariance model (IMV) model is
used to provide customers with the stock portfolio purchasing strategy based
on the return trend rate and risk trend rate. The experimental results
demonstrate that the approach has a certain application value and
outperforms the traditional method in terms of annual returns and Sharpe
ratio, using the Shanghai Stock Exchange and the Shenzhen Stock Exchange
as study samples. The model shows approximately 1% improvement in
prediction accuracy. The latest advancements in machine learning provide
substantial prospects for tactics involving the purchase of portfolios.
Keywords:
Long short-term memory neural
network
Meanvariance model
Portfolio optimization
Return trend rate
Risk trend rate
This is an open access article under the CC BY-SA license.
Corresponding Author:
Ahmad Yahya Dawod
International College of Digital Innovation, Chiang Mai University
239 Huay Kaew Rd, Suthep, Mueang Chiang Mai District, Chiang Mai-50200, Thailand
Email: ahmadyahyadawod.a@cmu.ac.th
1. INTRODUCTION
Portfolio management remains a prominent research field in financial investment, continuously
explored by investors and researchers alike. Stock investment has the characteristics of flexible trading,
significant risk-return fluctuations, modest initial capital requirements, and transparent market information,
stock portfolio management is a hot research issue in securities portfolio management. In recent years, the
rapid advancement of machine learning models has spurred the development and application of
prediction-based portfolio optimization models in stock management. An excellent stock portfolio
optimization model, with identical risk expectations, can potentially yield superior investment returns.
Enhancing the performance of prediction-based stock portfolio optimization models thus holds considerable
importance. Machine learning models have shown promising results in stock forecasting [1][5]. Markowitz
introduced the mean-variance (MV) model in 1952 to address portfolio optimization, emphasizing investors'
dual objectives of maximizing returns and minimizing risk. This paper divides prediction-based portfolio
optimization models into two categories based on investors' decision goals.
One approach to stock return forecasting assumes correctness in the forecast results and focuses
solely on enhancing forecast accuracy, disregarding forecast risk. Investment portfolios are then chosen
ISSN: 2252-8938
Int J Artif Intell, Vol. 14, No. 2, April 2025: 933-944
934
directly based on these forecasted returns [6][13]. Specifically, Yang Liu's comparative experiments
concluded that long short-term memory (LSTM) recurrent neural networks (RNNs) perform comparably to
v-type support vector regression (v-SVR) in predicting long-term volatility and outperform the generalized
autoregressive conditional heteroskedasticity (GARCH) model. Liu et al. [14] reported a root mean square
error (RMSE) of 0.03 for next-day earnings forecasts and 0.049 for three-day forecasts. Song et al. [15]
introduced the multi graph attention sorting (MGAR) network. This approach employed graph convolution to
extract relational features from the relationship graph utilized LSTM networks to capture stock price trends,
and subsequently concatenated these features into a fully connected layer for predicting stock return
rankings. The model achieved a prediction error mean squared error (MSE) of approximately 0.00037.
Lu et al. [16] proposed a convolutional neural network (CNN)-LSTM method for predicting stock closing
prices, leveraging CNN for feature extraction and LSTM for price prediction. Compared to other models like
multi-layer perceptron (MLP), CNN, RNN, LSTM, and CNN-RNN, CNN-LSTM achieved the highest
accuracy in predicting the Shanghai Composite Index closing prices. Experimental results of the above
researchers indicate that one-day stock return prediction errors translate to a mean absolute percentage error
(MAPE) of approximately 2%, increasing with longer prediction time horizons. LSTM methods demonstrate
significant advantages in stock predictions despite inherent prediction errors. Ma et al. [17] employed metrics
like the positive and negative direction predictive performance indicators (HR+, HR-, HR) to assess
directional accuracy. Their autoencoder (AE)+LSTM method yielded an average HR accuracy ranging from
47% to 50.42%, indicating the need for further algorithmic refinement to enhance returns.
Another approach focuses on integrating risk measures with enhanced stock prediction accuracy to
establish models that combine machine learning and classical portfolio optimization techniques. The primary
objective is to compute optimal stock portfolio weights that maximize returns while considering risks
[18][21]. Markowitz's MV model has long been a cornerstone in this area, optimizing portfolio allocation by
minimizing risk for a given expected return or a maximizing expected return given a level of risk. Specifically,
Wang et al. [22] proposed an LSTM+MV portfolio optimization model where an LSTM network predicts
stock returns, selecting stocks with higher predicted returns, followed by applying the MV model to determine
portfolio weights. Experimental findings demonstrate significant outperformance over the combination of
support vector machine (SVM), random forest (RF), deep neural network (DNN), autoregressive
comprehensive moving average model (ARIMA), and MV model in terms of annual cumulative return, Sharpe
ratio (SR), and monthly average risk-return. Ma et al. [23] recommended RF+meanvariance with forecasting
(MVF) model, utilizing RF for return prediction, subsequent portfolio selection based on predicted returns, and
the MVF model for final portfolio weight determination. They also explored combining RF, SVR, LSTM,
deep multilayer perceptron (DMLP), and CNN models with MV and omega models, identifying RF+MV as
superior in the MV combination and SVR+omega in the omega combination. The RF+MV outperforms other
combination models. Ma et al. [17] proposed an AE+LSTM+omega portfolio optimization model, leveraging
autoencoder AE for feature extraction from trading data, LSTM for return prediction, and omega model for
portfolio weight confirmation. Their results indicated superiority over equally weighted portfolios and other
prediction-based models. While MV models traditionally use predicted return variance as a risk measure,
recent advancements introduce additional risk metrics like entropy [24], quantile var [25], and omega ratio
[17], which solely rely on stock data without accounting for external factors. Despite achieving promising
returns, the enhancing portfolio algorithm performance remains challenging, especially under conditions of
significant prediction errors.
These two research directions aim to enhance the performance of stock portfolio optimization
models from different perspectives. To effectively utilize these findings, this study explores improving stock
direction prediction accuracy and identifying new risk indicators closely linked to stocks, thereby expanding
relevant research. Currently, limited research has focused on these aspects. On the one hand, the LSTM
network has achieved satisfactory performance in stock return prediction [26], [27], so this paper chooses
LSTM to forecast stock return. Given the T+1 trading system on Shanghai and Shenzhen stock exchanges,
where shares bought one day can only be sold the next, significant forecast errors can increase trading risks.
Thus, the paper introduces an index return trend rate to gauge the direction and strength of stock returns,
aiming to enhance prediction accuracy and reduce forecasting errors. Four LSTM networks predict the next
four days' closing prices, averaging these forecasts to determine directional changes. Additionally, traditional
risk metrics like variance, entropy, mean-var, and omega ratio rely solely on stock data without considering
inter-stock correlations within industries. Hence, this paper proposes a novel risk measure, the risk trend rate,
calculated similarly to the return trend rate, to factor industry correlations into stock risk assessment. The
return trend rate and risk trend rate lay the basis for optimizing stock portfolio allocation using an improved
meanvariance (IMV) model to maximize portfolio returns, prioritizing robust stocks in strong industries. In
summary, this paper presents a machine learning-based portfolio optimization model integrating return and
risk trend rates, alongside a strategic trading algorithm. Specifically, the model utilizes LSTM for short-term
Int J Artif Intell ISSN: 2252-8938
A portfolio optimization model for return trend rate and risk trend rate based on machine (Chunman Zhu)
935
stock price prediction, computes return and risk trend rates, applies an IMV model for portfolio allocation,
and outlines a trading strategy for implementation. Emphasis is placed on optimizing purchase weights
post-stock selection to maximize portfolio returns rather than the initial stock screening process.
This paper contributes to existing literature in several ways. Firstly, it introduces the return trend
rate as the expected rate of return. Compared to using a single LSTM model to directly forecast fourth-day
price, this approach reduces forecast errors and improves directional accuracy by approximately 1%.
Through experimental analysis, it identifies a 4-day holding period as optimal for maximizing annual returns
(AR). This discovery reduces trading frequency while increasing AR and prolonging the holding period of
investment portfolios. Notably, literature is scarce addressing portfolio holding cycles. Secondly, we propose
the innovation of risk trend rate as a measure of risk. It is utilized to formulate an objective function and
establish a linear programming model aimed at determining the optimal purchase ratio for investment
portfolios. Experimental findings demonstrate that the proposed model significantly enhances AR rates, SR,
and overall portfolio profitability. Thirdly, this paper outlines a comprehensive trading strategy algorithm,
detailing optimal buying time, purchase proportions, and selling time. An error correction mechanism is also
integrated into the algorithm execution process to mitigate potential losses from prediction errors. Third, this
paper puts forward a complete trading strategy algorithm, and gives a clear trading strategy from the buying
time, buying proportion, and selling time. At the same time, the error correction mechanism is introduced in
the execution process of the algorithm to avoid the heavy loss caused by the prediction error. Additionally,
the study focuses on 45 constituent stocks across 5 industry indexes of Shanghai and Shenzhen stock
exchanges, using daily trading data from 2010 to 2023, and evaluates the proposed portfolio model based on
the most recent three years' data. In summary, the trading strategy algorithm proposed herein notably
enhances investment portfolio profitability and holds practical value.
The structure of the remainder of this article is as follows: section 2 introduces some utilized
models. Section 3 gives the experimental process in detail. Experimental results are discussed in section 4.
Finally, the conclusion is drawn in section 5.
2. METHODOLOGY
This section begins by introducing the LSTM network and its application parameters. It then
presents the LSTM4 network developed in this paper, detailing how it calculates the return trend rate and risk
trend rate based on LSTM4's predictions. Following this, the MV model is discussed. Finally, the paper
introduces the enhanced IMV model and the LSTM4-IMV algorithm proposed in this study.
2.1. Long short-term memory model
LSTM model represents a sophisticated type of RNN distinguished by three gate control
mechanisms: forgetting gate, input gate, and output gate. These mechanisms enable it to retain information
over extended periods, making it particularly suitable for processing time-series input data [27]. Compared to
other models such as SVM, RF, DNN, and ARIMA models, LSTM networks demonstrate superior
performance in predicting stock prices using daily trading data [22], [28]. The LSTM network constructed in
this study comprises an input layer with LSTM neurons, multiple LSTM neurons in a hidden layer, and fully
connected layers within a DNN framework, culminating in an output layer. Training involves stochastic
gradient descent with overfitting mitigation through early stopping techniques. Key hyperparameters
considered include the number of hidden layers, nodes per layer, learning rate, iterations, dropout rate, loss
function, optimizer, and activation function. The input feature data series length ranges from 1 to 10 days
based on recommendations by Wang et al. [22], utilizing the rectified linear unit (ReLU) activation function.
Hyperparameter optimization employs grid search, with specifics detailed in Table 1.
Table 1. Parameters of LSTM network
Parameters
LSTM layer
LSTM nodes
Learning rate
Batch size
Dropout rate
Loss function
Optimizer
Active function
Time series
ISSN: 2252-8938
Int J Artif Intell, Vol. 14, No. 2, April 2025: 933-944
936
2.2. LSTM4 network
The error of a single LSTM neural network model in predicting the stock price direction and the
forecast values is insufficient for achieving stable profitability, as stock direction fluctuates bidirectionally.
To address this, this paper introduces the return trend rate to signify the strength and direction of stock return
forecasts. The return trend rate is derived using four LSTM networks to predict the closing price over the
next four days. It calculates the average forecast value and evaluates the rise and fall based on this average
(1). In this study, this model is referred to as the LSTM4 network. The return trend rate of the i-th stock is
expressed using .

 
 (1)
Where  represents the predicted value of the i-th stock on day k, indicates the current closing
price of the i-th stock, d is the number of days. In subsection 4.1, this paper determines through experiments
that the AR rate performance is better when d is 4 days.
The industry index initially categorizes stocks by sector and then employs a specific weighting
algorithm to aggregate stocks within each category, generating daily trading data similar to individual stock
indices. When the industry index shows an upward trend, the majority of stocks within that sector also tend to
rise, and conversely for a downward trend. Fluctuations in the industry index reflect the overall condition of
the sector and investor sentiment, synchronized with stock movements, thereby offering a more accurate
representation of stock risk. Accordingly, this paper introduces a novel indicator, the risk trend rate, to assess
stock risk. This index applies a similar methodology as the return trend rate to analyze the industry index,
formulated as shown in (2). The risk trend rate for the ith stock is denoted as .

 
 (2)
Where  represents the predicted value of the i-th industry index on day k,  indicates the
current closing price of the i-th industry index, d is the number of days. d is the same value 4 as the return
trend rate.
2.3. Mean-variance model
Markowitz developed the MV model to mathematically calculate portfolio optimization ratios. This
development direction has been widely adopted in the field of portfolio optimization [29][34]. This
approach not only identifies portfolios with the lowest risk given a specific expected return, but it also targets
portfolios with the highest return at a predetermined risk threshold. The model efficiently manages the risk
by diversifying investments among equities within the portfolio. In (3) outlines the calculation formula of the
MV model utilized in this paper's experimental procedures.
󰇛󰇜

 󰇟󰇠
󰇣
󰇤

 


(3)
Where n is the number of stocks in the portfolio, means the purchase proportion of the i-th stock, 
represents the predicted return trend rate of the i-th stock,  and  are the left and right boundary values of ,
respectively, and td denotes the threshold value of investors' acceptable loss risk, which is between  and .
2.4. Proposed improved meanvariance model
This study proposes incorporating the return and risk trend rates into the MV model to create a new
linear programming model, IMV, that can be solved to determine the stock portfolio's purchase proportion.
The IMV model can better fulfill the general trading strategy of buying increasing trend stocks in the rising
industry index, greatly improving the portfolio return. At the same time, the risk trend rate is not determined
by the return trend rate, it can spread some of the return forecast risk. The IMV model is calculated using (4).
Int J Artif Intell ISSN: 2252-8938
A portfolio optimization model for return trend rate and risk trend rate based on machine (Chunman Zhu)
937
󰇛󰇜
󰇟󰇠


 󰇟󰇠
 


(4)
Where n is the number of stocks in the portfolio, means the purchase proportion of stock i,  represents
the predicted trend rate of stock i,  and  are the left and right boundary values of , respectively,  is
the predicted risk value of stock i,  and  are the left and right boundary values of , respectively, and
td denotes the threshold value of investors' acceptable loss risk, which is between  and .
In order to mitigate the risks arising from extended holding periods and prediction errors, this paper
introduces a return threshold value trd for error correction. If the stock yield falls below trd during the
holding cycle, the stock is sold preemptively; otherwise, it is retained. Integrating the LSTM4 model and
IMV model with this error correction mechanism constitutes the LSTM4-IMV algorithm proposed in this
paper, illustrated in Figure 1. The algorithm takes as inputs the selected portfolio stock code array ListSC,
industry index name array ListII, trading date d1, and executes a trading strategy. First, it iterates through
ListSC, predicting the next four days' closing price  (k=1,2,3,4) for each stock using the LSTM4
network, then calculates the stock's return trend rate by using (1), yielding the return trend rate vector TP.
Second, it traverses ListII to predict the next four days' closing price  (k=1,2,3,4) of each
industry index using LSTM4, computes the risk trend rate of each index with (2), yielding risk trend rate
vector TR. In the third step, TP and TR are inputted into (4) to determine the portfolio's stock purchase
proportions. The fourth step executes the stock purchase strategy if the purchase ratio and predicted return
trend rate are positive; otherwise, it skips purchasing. The fifth step monitors daily stock returns during the
holding period, selling stocks preemptively if their return rate drops below trd; otherwise, they are held.
Finally, on the fourth day, all remaining stocks are sold, concluding the trading cycle.
Figure 1. Flowchart of the LSTM4-IMV algorithm
ISSN: 2252-8938
Int J Artif Intell, Vol. 14, No. 2, April 2025: 933-944
938
3. EXPERIMENT
This section describes the experimental process and outlines the main parameters employed. This
study focuses on five industries in the Shanghai and Shenzhen stock markets: computer equipment, home
appliances, coal, communication services, and general equipment. Nine stocks were randomly selected from
each sector, resulting in a total of 45 stocks. Following common investor strategies, industries were first
chosen for investment, followed by a selection of individual stocks within those industries. Diversification
across sectors and stocks reduces portfolio risk. Hence, the 45 stocks were divided into 9 groups, each
encompassing one stock from each of 5 industries, as illustrated in Table 2. The first column of Table 2
denotes the group name, while the subsequent five columns list the stock codes of the industry indexes
represented in each group.
Table 2. Stock grouping
Group
Computer equipment
Home appliance industry
Coal industry
Communication services
General equipment
Group1
000066
000016
000552
000063
000039
Group2
000977
000541
000723
000561
000410
Group3
002152
000921
000937
002148
000816
Group4
002180
600261
000983
002383
002122
Group5
002308
000333
600188
600050
300083
Group6
002415
000651
600348
002123
300091
Group7
002512
600839
601225
600804
300145
Group8
600100
002429
601699
002093
601369
Group9
603019
600690
601918
002467
002426
This paper focuses on simulating transaction data for the years 2021, 2022, and 2023. As trading hours
increase, stock price fluctuations also widen. A short training sample period may not capture the full range of
these fluctuations. Therefore, for simulating stock trading in 2021, daily trading data from January 1, 2010 to
December 31, 2020, is used to train the LSTM network. Subsequently, daily trading data from January 1, 2021
to December 31, 2021, is employed for conducting the trading simulation. For the simulation of 2022 stock
trading, daily trading data spanning from January 1, 2010 to December 31, 2021, is used for LSTM training, and
data from January 1, 2022 to December 31, 2022, is used for simulation. Likewise, for the 2023 stock trading
simulation, data from January 1, 2010 to December 31, 2022, is used for training, and data from January 1, 2023
to December 31, 2023, is used for simulation. This study utilizes daily trading data of industry indexes obtained
from the akshare platform provided by the China Oriental Wealth Securities Company. Training and testing
sessions for industry indexes correspond to the stocks they encompass.
When training and predicting stock closing prices, this paper employs daily trading data input
features that include: opening price, the highest price, the lowest price, closing price, trading volume, price
change, amplitude, turnover, turnover rate, and ten other daily trading indicators. The daily data for a single
day encompassing these indicators is denoted as {, , , , , , , , , }, where t
signifies the day within the input date sequence. In this paper, by using the super parameters shown in Table 1,
the LSTM network used to predict the closing price of 45 stocks and 5 industry indexes in the next 4 days is
independently trained to obtain the prediction network and input time series memory days T. The input feature
data for the prediction network is represented as {{, , , , , , , , , }, {,
, , , , , , , , }{, , , , , , , , , }},
where t [1, T]. Given the varying value ranges of each indicator, this study employs the Z-score algorithm to
standardize the input feature data. The Z-score transformation involves calculating the mean and standard
deviation of each indicator's original data, and normalizing it using (5). This method ensures that the data
conforms to a standard normal distribution, facilitating comparability across different measures.
 
 (5)
Where  is the daily trading data indicator i on day t,  denotes the average of the daily trading data
indicator i on day t,  means the variance of the daily trading data indicator i on day t,  is the
standardized value of the daily trading data indicator i on day t.
Because daily trading data, such as stock prices and volumes for each stock and industry index, vary
significantly in value range, LSTM models identified by each forecasting model are suboptimal.
Consequently, each prediction model requires independent training, storing essential data such as parameters
normalized with Z-score, suboptimal LSTM model parameters, and the memory duration of its input
sequences. When implementing the LSTM4-IMV4 algorithm to calculate the portfolio purchase ratios,
several critical parameters are employed. The selected 45 stocks in this study have a daily fluctuation limit of
Int J Artif Intell ISSN: 2252-8938
A portfolio optimization model for return trend rate and risk trend rate based on machine (Chunman Zhu)
939
±10%, while the cumulative 4-day fluctuation boundaries for the return rates in (4) are set as ==-0.271
and ==0.331. Additionally, the value of td in (4) takes the value of 40% of the principal amount that
investors can bear to lose, td=0.09. Within the LSTM4-IMV4 algorithm, trd is defined as -0.05. During the
execution of the trading strategy, parameters include a trading commission rate of 0.0003, a selling stamp
duty rate of 0.001, and an initial investment of 1 million yuan. For simulation purposes, it is assumed that
stock trading activities are completed 1 second before the market closes each day. The study does not
currently account for temporary stock suspensions; if any stocks are suspended within the next 4 trading
days, trading for those stocks will be skipped, the trading day will reset to the following day, and the strategy
recalculated.
4. EXPERIMENTAL RESULTS
This section begins by examining the selection of prediction days d in the LSTM4 network.
Subsequently, it evaluates the prediction accuracy achieved by the LSTM4 network. The performance of the
IMV model proposed in this paper is then analyzed in terms of profitability. Lastly, to assess the practical
effectiveness of the LSTM4-IMV algorithm, this section compares it with established models such as
LSTM4-MV, AE+LSTM+OMEGA, and RF+MVF.
4.1. Select the predicted days d in the LSTM4 network
This section examines how the forecast horizon of the LSTM4 network and the holding period of the
portfolio influence its earnings performance. Take 1-5 days for d in (1) and (2) to calculate the return trend rate
and risk trend rate respectively. Concurrently, set the portfolio's holding period to d. Subsequently, the
LSTM4-IMV algorithm was employed to conduct experimental simulations on the 2023 data for portfolios
categorized as group1 to group3. The experimental results are detailed in Table 3. When d is set to 4 days, the
AR rates for all three groups of stocks either surpassed or closely approached those for d=1,2, and 3, achieving
a positive return of over 10%. However, with d=5, the AR decreased for groups 1 and 3, with only group 2
showing a slight increase. Therefore, it is concluded in this paper that setting d=4 achieves the optimal balance
between prediction accuracy and investment return. Consequently, d in (1) and (2) is fixed at (4), and the
portfolio's holding period is also set to 4 days.
Table 3. The average value error of future stock prediction
Group
Index value
d=1 (%)
d=2 (%)
d=3 (%)
d=4 (%)
d=5 (%)
group1
annualized returns
-17.02
0.85
17.48
12.31
-5.04
maximum drawdown (MD)
26.18
14.78
11.32
11.56
13.34
group2
annualized returns
-41.16
-25.85
-27.59
25.70
26.82
MD
46.51
31.17
34.64
25.25
8.83
group3
annualized returns
-21.28
-9.99
16.72
28.11
1.48
MD
29.36
20.75
14.84
11.72
13.32
4.2. The prediction accuracy of LSTM4 network
Four indices, namely MAPE, trend accuracy (HR), negative trend accuracy (HR-), and positive
trend accuracy (HR+), were utilized to evaluate the predictive performance and validate the strength and
directional accuracy of the LSTM4 model proposed in this study. HR, HR-, and HR+ were employed to
assess the accuracy of trend prediction direction [17], [35], while MAPE was used to gauge prediction
accuracy [29]. These metrics are computed using (6) to (9).

󰇻

󰇻
  (6)

󰇛
󰇜

󰇛
󰇜 (7)

󰇛
󰇜

󰇛󰇜 (8)

󰇛
󰇜

󰇛󰇜 (9)
where 
and  represent the predicted value and the actual value on day k, N indicates the total number of
days.
ISSN: 2252-8938
Int J Artif Intell, Vol. 14, No. 2, April 2025: 933-944
940
Table 4 presents the statistical averages of the four indicators for 45 stocks listed in Table 1 when
d=4 for the return trend rate, specifically predicting stock closing prices four days into the future. It is evident
from Table 4 that all four indicators of LSTM4 outperform those of a single LSTM prediction model across
the 2021-2023 simulation data, showing improvements of approximately 1%. Additionally, the proposed
method in this paper demonstrates comparable MAPE to the AE+LSTM algorithm used by Ma et al. [17] for
predicting stock prices one day ahead, with slight enhancements in HR, HR+, and HR-. This suggests that
compared to the benchmark model, the algorithm proposed in this paper marginally improves overall
prediction accuracy and positively impacts higher returns for investment portfolios. However, Table 4 also
indicates an average MAPE above 4% and fluctuating trend accuracy indicators (HR, HR+, and HR-) around
50%, indicating substantial prediction errors and low model stability, thereby suggesting susceptibility to
significant losses when trading based on predicted return trend rates.
Table 4. The statistical average of 45 stocks on 4 indicators
Year
Model
MAPE (%)
HR (%)
HR+ (%)
HR- (%)
2021
LSTM
4.14
51.02
52.09
50.82
2021
LSTM4
4.08
52.12
52.89
51.62
2022
LSTM
5.34
47.82
48.62
47.19
2022
LSTM4
5.27
48.52
49.12
48.23
2023
LSTM
4.32
50.12
51.39
49.62
2023
LSTM4
4.27
51.03
52.49
50.22
4.3. Profit performance of IMV model
In this section, the enhanced IMV model is compared with the benchmark MV model in terms of
profitability performance and frequency of trading strategy execution. Figure 2 illustrates the simulation
results for group 1, group 2, group 3, and group 4 using LSTM4-IMV and LSTM4-MV algorithms over the
years 2021, 2022, and 2023. The y-axis in Figure 2 represents the total funds after executing the trading
strategy. Analysis of Figure 2 reveals distinct patterns: subgraphs numbered 1, 3, 4, 9, 10, and 11
demonstrate that the LSTM4-IMV algorithm achieves significantly higher cumulative profits compared to the
LSTM4-MV algorithm. Conversely, in subgraphs numbered 5, 6, 7, 8, and 12, the cumulative profits of the
LSTM4-IMV algorithm are generally comparable to those of the LSTM4-MV algorithm. Only subgraph
number 2 indicates that the LSTM4-IMV algorithm yields notably lower cumulative returns than the
LSTM4-MV algorithm. Figure 2 also highlights that the transaction frequency of the LSTM4-IMV algorithm
is considerably lower than that of the LSTM4-MV algorithm, indicating fewer trades executed. Despite this,
the LSTM4-IMV algorithm achieves superior cumulative returns compared to LSTM4-MV. In conclusion,
the proposed LSTM4-IMV algorithm significantly enhances portfolio profitability when incorporating the
risk trend rate index, thereby mitigating prediction errors by reducing transaction frequency.
4.4. Model comparison
To further validate the profitability of the LSTM4-IMV algorithm proposed in this study, we
compare its performance with the benchmark LSTM4-MV algorithm, as well as with the state-of-the-art
AE+LSTM+OMEGA algorithm [17] and RF+MVF algorithm [23] in simulation experiments involving nine
investment portfolio groups from 2021 to 2023. Three metrics-AR, SR, and MD-are employed to assess the
profitability of trading strategies. The AR measures the profit performance of the portfolio after executing the
trading strategy for one year. A higher AR indicates better performance. The SR evaluates the profit
performance of an investment portfolio after deducting risk-free investment returns. A higher SR indicates
better performance, reflecting higher returns per unit of risk. The paper computes the SR using the monthly
variance of portfolio returns and a risk-free rate of 0.02. MD represents the maximum historical decline in net
asset value, indicating the peak-to-trough decline. A lower MD suggests lower risk, while a higher drawdown
signifies higher risk. The formulas for calculating these metrics are detailed as follows.

  (10)

 (11)
󰇡
󰇢 (12)
Where  is the total investment funds at the end of the year, and  means the initial investment
funds at the beginning of the year. RF is the fixed return on treasury bonds, and represents the standard
Int J Artif Intell ISSN: 2252-8938
A portfolio optimization model for return trend rate and risk trend rate based on machine (Chunman Zhu)
941
deviation of the portfolio's monthly return every month. indicates the maximum value of the current
investment funds in the upward trend, and is the minimum value of the current investment funds that do
not exceed after the reversal of the current upward trend.
Figure 2. The return trend chart of group 1-4 after trading strategy simulation on 2021-2023
As shown in Tables 5 to 7, the LSTM4-IMV algorithm exhibits a notably higher average AR rate
compared to the other three models, consistently exceeding 18%. Moreover, this algorithm achieved positive
returns in 8 groups in 2021, 5 groups in 2022, and 7 groups in 2023, surpassing the performance of the other
algorithms. Therefore, the LSTM4-IMV algorithm clearly outperforms the other models in terms of
profitability. The average AR of all algorithms in 2022 are lower than those in 2021 and 2023, which is
largely affected by the worst economic situation before China's COVID-19 was announced to open up in
December 2022, leading to significant fluctuations in China's stock market and an overall downward trend
before the opening up, affecting the prediction accuracy. In terms of the SR, the LSTM4-IMV algorithm
demonstrates a significantly higher average SR in 2021 and 2023 compared to the other three algorithms,
albeit slightly lower than the AE+LSTM+OMEGA algorithm in 2022. Hence, the LSTM4-IMV algorithm
exhibits superior profitability stability. Finally, regarding maximum retracement, the LSTM4-MV algorithm
records the lowest average maximum retracement value, while the LSTM4-IMV algorithm shows a slightly
ISSN: 2252-8938
Int J Artif Intell, Vol. 14, No. 2, April 2025: 933-944
942
higher average maximum retracement value. This difference arises because the LSTM4-IMV algorithm
concentrates portfolio investments on strong stocks within robust industry indices, resulting in larger
pullbacks in case of forecast failures. Overall, the LSTM4-IMV algorithm demonstrates superior profitability
and stability compared to LSTM4-MV, AE+LSTM+OMEGA, and RF+MVF models, thereby enhancing the
performance of forecast-based portfolio optimization models.
Table 5. Four algorithms simulation results in 2021
Group
LSTM4-IMV (%)
LSTM4-MV (%)
AE+LSTM+OMEGA (%)
RF+MVF (%)
SR
AR
MD
SR
AR
MD
SR
AR
MD
SR
AR
MD
Group1
102.6
19.6
13.1
-103.3
-10.7
17.6
1.9
2.2
13.1
-105.2
-16.9
34.2
Group2
619.3
125.5
6.0
311.7
53.1
8.8
347.8
70.2
19.7
649.0
117.1
13.2
Group3
25.7
8.2
24.8
53.6
12.1
19.2
-9.7
-1.1
19.9
-63.7
-18.0
32.5
Group4
290.1
98.2
17.2
171.1
64.5
12.9
109.0
32.1
10.6
293.8
93.6
10.2
Group5
-44.6
-13.8
32.8
106.9
23.4
14.0
30.0
7.3
20.2
-67.2
-25.6
33.5
Group6
216.1
36.0
17.2
-45.6
-5.0
24.9
-60.9
-9.9
25.1
-21.6
-4.1
22.2
Group7
59.7
29.1
19.4
173.5
56.3
8.9
55.1
19.0
17.2
48.5
15.3
24.6
Group8
182.7
66.6
15.5
130.5
32.9
15.4
-4.1
0.9
27.2
44.4
9.4
17.7
Group9
0.5
2.2
18.1
-32.1
-6.9
20.3
-170.4
-28.3
28.9
-41.2
-16.7
34.5
Average
161.3
41.3
18.3
85.1
24.4
15.8
33.2
10.3
20.2
81.9
17.1
24.7
Table 6. Four algorithms simulation results in 2022
Group
LSTM4-IMV (%)
LSTM4-MV (%)
AE+LSTM+OMEGA (%)
RF+MVF (%)
SR
AR
MD
SR
AR
MD
SR
AR
MD
SR
AR
MD
Group1
-36.9
-11.1
25.2
3.6
2.8
9.8
50.9
17.0
13.0
-90.8
-26.2
35.0
Group2
-6.3
0.9
18.0
-0.5
1.9
11.7
29.0
5.9
15.6
-160.3
-25.4
33.2
Group3
-47.9
-13.7
33.4
-78.4
-16.6
24.7
-146.2
-29.7
34.0
-110.2
-14.3
24.8
Group4
312.6
121.5
23.0
16.1
5.9
18.0
109.3
26.2
7.8
149.0
79.0
31.6
Group5
8.0
4.6
31.5
-0.5
1.9
15.9
-67.6
-18.5
26.9
49.7
11.7
17.1
Group6
66.2
33.8
23.3
55.8
11.6
9.7
110.8
26.2
12.9
19.4
6.1
17.1
Group7
-46.4
-16.7
29.6
-77.8
-15.7
20.8
-53.4
-12.5
22.0
-83.9
-12.2
24.4
Group8
-13.6
-2.4
30.5
-63.6
-12.3
18.5
118.4
32.5
11.9
-28.1
-0.8
9.2
Group9
113.0
48.9
34.3
-1.5
1.7
16.7
297.9
33.9
6.9
135.5
23.5
8.9
Average
38.7
18.4
27.7
-16.3
-2.1
16.2
49.9
9.0
16.8
-13.3
4.6
22.4
Table 7. Four algorithms simulation results in 2023
Group
LSTM4-IMV (%)
LSTM4-MV (%)
AE+LSTM+OMEGA (%)
RF+MVF (%)
SR
AR
MD
SR
AR
MD
SR
AR
MD
SR
AR
MD
Group1
49.1
12.3
11.6
-74.4
-11.9
19.0
22.8
5.7
11.0
-29.0
-5.9
25.6
Group2
63.3
25.7
25.3
76.5
23.4
17.0
8.1
3.7
15.6
0.7
2.3
28.7
Group3
110.1
28.1
11.7
-51.0
-6.6
25.2
-97.0
-16.3
25.0
45.4
16.1
18.3
Group4
-11.6
-2.6
35.4
-10.5
0.4
19.3
-132.2
-14.2
20.1
-30.6
-0.8
6.9
Group5
27.2
10.8
26.4
-9.6
-0.2
20.6
-114.7
-19.1
25.8
-106.0
-27.7
42.6
Group6
-63.8
-6.0
12.6
-63.7
-5.8
13.0
-72.6
-6.4
17.0
41.8
13.8
30.0
Group7
129.3
50.6
18.4
279.9
103.2
11.6
281.5
101.1
18.7
147.4
29.1
18.1
Group8
115.5
51.4
28.6
97.0
35.1
19.5
175.5
91.3
15.6
23.0
11.4
33.6
Group9
65.2
19.1
15.6
66.4
14.1
12.0
219.9
40.2
13.4
95.6
57.3
28.7
Average
53.8
21.1
20.6
34.5
16.9
17.5
32.4
20.7
18.0
20.9
10.6
25.9
5. CONCLUSION
This paper presented a portfolio optimization model based on the machine learning to predict return
trend rate and risk trend rate, and designs a portfolio trading strategy algorithm based on this model, namely
LSTM4-IMV. The prediction accuracy of the LSTM4 network is evaluated and compared with state-of-the-art
algorithms. Findings indicate several key outcomes. Firstly, the LSTM4 model shows an overall improvement of
approximately 1% across four prediction accuracy metrics: MAPE, HR, HR-, and HR+. This improvement
slightly outperforms the LSTM model. Higher forecast accuracy correlates with increased portfolio returns.
Secondly, accounting for transaction costs, taxes, and the initial capital, the LSTM4-IMV algorithm outperforms
current advanced models-LSTM4-MV, AE+LSTM+OMEGA, and RF+MVF-in two profitability indicators: AR
and SR. However, it exhibits a slightly higher risk as indicated by the maximum retracement rate. Lastly,
experiments demonstrate that a holding period of 4 days achieves an optimal balance between forecast accuracy
and portfolio return. The introduced return trend rate and risk trend rates play pivotal roles in this portfolio
optimization model, expanding the current literature on prediction-based portfolio models. The model effectively
identifies rising stocks in rising industry indices, significantly enhancing profitability over benchmark
LSTM4-MV and other advanced models, thereby advancing portfolio optimization based on prediction. Despite
Int J Artif Intell ISSN: 2252-8938
A portfolio optimization model for return trend rate and risk trend rate based on machine (Chunman Zhu)
943
valuable conclusions, this study acknowledges certain limitations. In future research, three aspects can be
explored further. Firstly, this paper only focuses on the pre-selected stock portfolio, so the selected portfolio may
not be the optimal portfolio, and the algorithm for selecting the optimal stock portfolio can be further studied.
Secondly, despite the LSTM4 model's proposal, the prediction error remains significant, indicating a need for
enhanced prediction accuracy. Lastly, while this paper establishes a correlation between the risk trend rate and the
stock, future studies could delve into additional risk indicators influencing short-term stock price trends, such as
news dynamics, investor sentiment, economic conditions, and financial data.
ACKNOWLEDGEMENTS
This research was supported by the China-Laos-Thailand Education Digitization International Joint
Research and Development Center of Yunnan Province (Project Number: 202203AP140006), the Sichuan Science
and Technology Program of China under Grant 2023YFG0130, the Sichuan Transfer Payment Application
Program of China under Grant R22ZYZF0004, the Sichuan Tourism University Research Project under Grant
2023SCTUZD16, and in part by the A Ba Achievements Transformation Program under Grant R22CGZH0006.
REFERENCES
[1] X. Pang, Y. Zhou, P. Wang, W. Lin, and V. Chang, “An innovative neural network approach for stock market prediction,” The
Journal of Supercomputing, vol. 76, no. 3, pp. 20982118, Mar. 2020, doi: 10.1007/s11227-017-2228-y.
[2] O. B. Sezer and A. M. Ozbayoglu, “Algorithmic financial trading with deep convolutional neural networks: time series to image
conversion approach,” Applied Soft Computing, vol. 70, pp. 525538, Sep. 2018, doi: 10.1016/j.asoc.2018.04.024.
[3] Y. Zhang, X. Li, and S. Guo, “Portfolio selection problems with Markowitz’s mean–variance framework: a review of literature,”
Fuzzy Optimization and Decision Making, vol. 17, no. 2, pp. 125158, Jun. 2018, doi: 10.1007/s10700-017-9266-z.
[4] P. Ghosh, A. Neufeld, and J. K. Sahoo, “Forecasting directional movements of stock prices for intraday trading using LSTM and
random forests,” Finance Research Letters, vol. 46, May 2022, doi: 10.1016/j.frl.2021.102280.
[5] M. Liu, K. Luo, J. Zhang, and S. Chen, “A stock selection algorithm hybridizing grey wolf optimizer and support vector
regression,” Expert Systems with Applications, vol. 179, Oct. 2021, doi: 10.1016/j.eswa.2021.115078.
[6] T. Fischer and C. Krauss, “Deep learning with long short-term memory networks for financial market predictions,” European
Journal of Operational Research, vol. 270, no. 2, pp. 654669, Oct. 2018, doi: 10.1016/j.ejor.2017.11.054.
[7] F. Zhou, H. Zhou, Z. Yang, and L. Yang, “EMD2FNN: a strategy combining empirical mode decomposition and factorization
machine based neural network for stock market trend prediction,” Expert Systems with Applications, vol. 115, pp. 136151, Jan.
2019, doi: 10.1016/j.eswa.2018.07.065.
[8] F. Feng, X. He, X. Wang, C. Luo, Y. Liu, and T.-S. Chua, “Temporal relational ranking for stock prediction,” ACM Transactions
on Information Systems, vol. 37, no. 2, pp. 130, Apr. 2019, doi: 10.1145/3309547.
[9] B. Li, Y. Sun, G. Aw, and K. L. Teo, “Uncertain portfolio optimization problem under a minimax risk measure,” Applied
Mathematical Modelling, vol. 76, pp. 274281, Dec. 2019, doi: 10.1016/j.apm.2019.06.019.
[10] L. O. Orimoloye, M.-C. Sung, T. Ma, and J. E. V. Johnson, “Comparing the effectiveness of deep feedforward neural networks
and shallow architectures for predicting stock price indices,” Expert Systems with Applications, vol. 139, 2020, doi:
10.1016/j.eswa.2019.112828.
[11] C. Chalvatzis and D. Hristu-Varsakelis, “High-performance stock index trading via neural networks and trees,” Applied Soft
Computing, vol. 96, Nov. 2020, doi: 10.1016/j.asoc.2020.106567.
[12] Y. Yan and D. Yang, “A stock trend forecast algorithm based on deep neural networks,” Scientific Programming, vol. 2021,
pp. 17, Jul. 2021, doi: 10.1155/2021/7510641.
[13] J. Yang, W. Zhang, X. Zhang, J. Zhou, and P. Zhang, “Enhancing stock movement prediction with market index and curriculum
learning,” Expert Systems with Applications, vol. 213, Mar. 2023, doi: 10.1016/j.eswa.2022.118800.
[14] Y. Liu, “Novel volatility forecasting using deep learning–long short-term memory recurrent neural networks,” Expert Systems
with Applications, vol. 132, pp. 99109, Oct. 2019, doi: 10.1016/j.eswa.2019.04.038.
[15] G. Song, T. Zhao, S. Wang, H. Wang, and X. Li, “Stock ranking prediction using a graph aggregation network based on stock
price and stock relationship information,” Information Sciences, vol. 643, Sep. 2023, doi: 10.1016/j.ins.2023.119236.
[16] W. Lu, J. Li, Y. Li, A. Sun, and J. Wang, “A CNN-LSTM-based model to forecast stock prices,” Complexity, vol. 2020, pp. 110,
Nov. 2020, doi: 10.1155/2020/6622927.
[17] Y. Ma, W. Wang, and Q. Ma, “A novel prediction-based portfolio optimization model using deep learning,” Computers &
Industrial Engineering, vol. 177, Mar. 2023, doi: 10.1016/j.cie.2023.109023.
[18] F. D. Paiva, R. T. N. Cardoso, G. P. Hanaoka, and W. M. Duarte, “Decision-making for financial trading: a fusion approach of machine
learning and portfolio selection,” Expert Systems with Applications, vol. 115, pp. 635655, Jan. 2019, doi: 10.1016/j.eswa.2018.08.003.
[19] N. N. Y. Vo, X. He, S. Liu, and G. Xu, “Deep learning for decision making and the optimization of socially responsible
investments and portfolio,” Decision Support Systems, vol. 124, Sep. 2019, doi: 10.1016/j.dss.2019.113097.
[20] J.-R. Yu, W.-J. Paul Chiou, W.-Y. Lee, and S.-J. Lin, Portfolio models with return forecasting and transaction costs,”
International Review of Economics & Finance, vol. 66, pp. 118130, Mar. 2020, doi: 10.1016/j.iref.2019.11.002.
[21] J.-R. Yu, W.-J. P. Chiou, W.-Y. Lee, and T.-Y. Chuang, “Realized performance of robust portfolios: worst-case Omega vs.
CVaR-related models,” Computers & Operations Research, vol. 104, pp. 239255, Apr. 2019, doi: 10.1016/j.cor.2018.12.004.
[22] W. Wang, W. Li, N. Zhang, and K. Liu, “Portfolio formation with preselection using deep learning from long-term financial
data,” Expert Systems with Applications, vol. 143, Apr. 2020, doi: 10.1016/j.eswa.2019.113042.
[23] Y. Ma, R. Han, and W. Wang, “Portfolio optimization with return prediction using deep learning and machine learning,” Expert
Systems with Applications, vol. 165, Mar. 2021, doi: 10.1016/j.eswa.2020.113973.
[24] J. Kim and M. Lee, “Portfolio optimization using predictive auxiliary classifier generative adversarial networks,” Engineering
Applications of Artificial Intelligence, vol. 125, Oct. 2023, doi: 10.1016/j.engappai.2023.106739.
[25] J. Behera, A. K. Pasayat, H. Behera, and P. Kumar, “Prediction based mean-value-at-risk portfolio optimization using machine
learning regression algorithms for multi-national stock markets,” Engineering Applications of Artificial Intelligence, vol. 120,
Apr. 2023, doi: 10.1016/j.engappai.2023.105843.
ISSN: 2252-8938
Int J Artif Intell, Vol. 14, No. 2, April 2025: 933-944
944
[26] O. B. Sezer, M. U. Gudelek, and A. M. Ozbayoglu, “Financial time series forecasting with deep learning: a systematic literature
review: 2005–2019,” Applied Soft Computing, vol. 90, May 2020, doi: 10.1016/j.asoc.2020.106181.
[27] Y. Qiu, H.-Y. Yang, S. Lu, and W. Chen, “A novel hybrid model based on recurrent neural networks for stock market timing,”
Soft Computing, vol. 24, no. 20, pp. 1527315290, Oct. 2020, doi: 10.1007/s00500-020-04862-3.
[28] G. Van Houdt, C. Mosquera, and G. Nápoles, “A review on the long short-term memory model,” Artificial Intelligence Review,
vol. 53, no. 8, pp. 59295955, Dec. 2020, doi: 10.1007/s10462-020-09838-1.
[29] W. Chen, H. Zhang, M. K. Mehlawat, and L. Jia, “Mean-variance portfolio optimization using machine learning-based stock price
prediction,” Applied Soft Computing, vol. 100, Mar. 2021, doi: 10.1016/j.asoc.2020.106943.
[30] V. Gambeta and R. Kwon, Risk return trade-off in relaxed risk parity portfolio optimization,” Journal of Risk and Financial
Management, vol. 13, no. 10, Oct. 2020, doi: 10.3390/jrfm13100237.
[31] A. Cousin, J. Lelong, and T. Picard, “Mean-variance dynamic portfolio allocation with transaction costs: a wiener chaos expansion
approach,” Applied Mathematical Finance, vol. 30, no. 6, pp. 313353, Nov. 2023, doi: 10.1080/1350486X.2024.2357200.
[32] N. F. Silva, M. dos Santos, C. F. S. Gomes, and L. P. de Andrade, “An integrated CRITIC and grey relational analysis approach for
investment portfolio selection,” Decision Analytics Journal, vol. 8, Sep. 2023, doi: 10.1016/j.dajour.2023.100285.
[33] J. C. Mba, K. A. Ababio, and S. K. Agyei, “Markowitz mean-variance portfolio selection and optimization under a behavioral
spectacle: new empirical evidence,” International Journal of Financial Studies, vol. 10, no. 2, Apr. 2022, doi: 10.3390/ijfs10020028.
[34] J. De Spiegeleer, S. Höcht, D. Jakubowski, S. Reyners, and W. Schoutens, “ESG: a new dimension in portfolio allocation,” Journal of
Sustainable Finance & Investment, vol. 13, no. 2, pp. 827867, Apr. 2023, doi: 10.1080/20430795.2021.1923336.
[35] Y. Ma, R. Han, and W. Wang, “Prediction-based portfolio optimization models using deep neural networks,” IEEE Access, vol. 8, pp.
115393115405, 2020, doi: 10.1109/ACCESS.2020.3003819.
BIOGRAPHIES OF AUTHORS
Chunman Zhu is currently a lecturer at Sichuan Tourism College in China. He is
currently pursuing a Ph.D. at the International College of Digital Innovation, Chiang Mai
University, Thailand. He received his Master's degree in Applied Computer Technology from
Chongqing University in China and his bachelor's degree from Shaanxi University of Science
and Technology in China. His research includes financial quantitative investing, machine
learning, pattern recognition, and artificial intelligence. He can be contacted at email:
chunman_zhu@cmu.ac.th.
Asst. Prof. Dr. Ahmad Yahya Dawod is currently a lecturer at International
College of Digital Innovation at Chiang Mai University, Thailand. He received his Ph.D. degree
in machine learning and artificial intelligence from the National University of Malaysia in 2018
with the topic “Hand gesture recognition based on isolated and continuous sign language”. He
also graduated with his master’s degree in computing and informatics from Multimedia
University of Malaysia and had his bachelor’s degree in computer science from The University
of Mustansirya of Iraq. His research includes machine learning, pattern recognition, computer
vision, robotics, and artificial intelligence. He has published 20 articles up to date with more than
a hundred citations. He can be contacted at email: ahmadyahyadawod.a@cmu.ac.th.
Dr. Yu Xi is a full professor at Chengdu University in China and a doctoral
supervisor at Chiang Mai University. He received his doctorate from the University of Lyon II
in France. He obtained a master's degree from the University of Electronic Science and
Technology of China and an undergraduate degree from Chengdu University of Technology of
China. Currently, he serves as the dean of Stirling College of Chengdu University, a member
of the Teaching Steering Committee of Laboratory Construction and Practice in general
undergraduate colleges and universities of Sichuan Province, the secretary general of the
Education and Training Committee of Sichuan Computer Society, and the secretary general of
Chengdu Western Returned Scholars Association in France, and won the title of high-level
overseas talents in Sichuan Province. At present, he is mainly engaged in the research of
artificial intelligence in intelligent education, intelligent welding, and intelligent medical
treatment. He can be contacted at email: yuxi@cdu.edu.cn.
Gongsuo Chen is currently pursuing the Ph.D. degree with the Department of
International College of Digital Innovation at Chiang Mai University, Thailand. He received a
master's degree in computer science from Fudan University and the B.S. degree in information
and computing science from Anhui Polytechnic University. His major research interests
include fire detection, and various sub-domains of machine learning, deep learning, and
computer vision for real-world applications such as tourism. He can be contacted at email:
gongsuo_chen@cmu.ac.th.
ResearchGate has not been able to resolve any citations for this publication.
Article
Full-text available
The selection of investment portfolios is a complex problem, encompassing multiple and conflicting criteria. We propose an integrated multi-criteria decision making (MCDM) model composed of the Criteria Importance Through Intercriteria Correlation (CRITIC) method and Grey Relational Analysis (GRA). The proposed CRITIC-GRA model considers a series of financial indicators to assess investment alternatives, aiming to select the best options for inclusion in an investment portfolio. Data were collected from the Economatica database, and 190 companies with shares listed on the Brazilian stock exchange were selected as investment alternatives. Ten financial criteria were identified through a comprehensive literature review for use in the integrated model. To validate the proposed approach, the alternatives chosen using the method were incorporated into an optimization model, applying mean–variance analysis to define the investment weights. The results were then compared with a market benchmark, considering risk, return, and the Sharpe ratio. The portfolio selected in the study surpassed the benchmark in both risk and return.
Article
Full-text available
This paper investigates the robustness of the conventional mean-variance (MV) optimization model by making two adjustments within the MV formulation. First, the portfolio selection based on a behavioral decision-making theory that encapsulates the MV statistics and investors psychology. The second aspect involves capturing the portfolio asset dependence structure through copula. Using the behavioral MV (BMV) and the copula behavioral MV (CBMV), the results show that stocks with lower behavioral scores outperform counterpart portfolios with higher behavioral scores. On the other hand, in the Forex market, the reverse is observed for the BMV approach, while the CBMV remains consistent.
Article
Full-text available
As a recognized complex dynamic system, the stock market has many influencing factors, such as nonstationarity, nonlinearity, high noise, and long memory. It is difficult to explain it simply through mathematical models. Therefore, the analysis and prediction of the stock market have been a very challenging job since long time. Therefore, this paper adopts an encoder-decoder model of attention mechanism, adding attention mechanism from two aspects of feature and time. Both encoder and decoder use LSTM neural network. This method solves two problems in time series prediction; the first problem is that multiple input features have different degrees of influence on the target sequence, the feature attention mechanism is used to deal with this problem, and the weights of different input features can be obtained. A more robust feature association relationship is obtained; the second problem is that the data before and after the sequence have a strong time correlation. The time attention mechanism is used to deal with this problem, and the weights at different time points can be obtained to obtain more robustness and good timing dependencies. The simulation and experimental results show that the introduction of the attention mechanism can obtain lower forecast errors, which proves the effectiveness of the model in dealing with stock forecasting problems.
Article
The future performance of stock markets is the most crucial factor in portfolio creation. As machine learning technique is advancing, new possibilities have opened up for incorporating prediction concepts into portfolio selection. A hybrid approach that constitutes machine learning algorithms for stock return prediction and a mean–VaR (value-at-risk) model for portfolio selection is illustrated in this paper as a unique portfolio construction technique. Machine learning regression models such as Random Forest, Extreme Gradient Boosting (XGBoost), Adaptive Boosting (AdaBoost), Support Vector Machine Regression (SVR), k-Nearest Neighbors (KNN), and Artificial Neural Network (ANN) are adopted to forecast stock values for the next period. The stocks with greater prospective returns are chosen in the first stage of this affection. Further, the mean–VaR portfolio optimization model is employed for portfolio selection in the second stage. The monthly datasets of the Bombay Stock Exchange (BSE), India, Tokyo Stock Exchange, Japan, and Shanghai Stock Exchange, China, are used as the research sample, and the findings show that the mean–VaR model with AdaBoost prediction outperforms other models.
Article
Stock movement prediction is a complex and challenging task, because the real stock market system is sophisticated and noisy. There are two obstacles with directly using historical trading data to predict stock price movement: (1) the stock market is time-varying, resulting in the mismatch between training and test data and poor generalization performance; (2) the stock market is a noisy system in which price moving signal is difficult to capture. To overcome these two challenges, we propose a method enhancing stock movement prediction with market index and curriculum learning. We consider the impact of the market movement on individual stock movement, and propose to use market index to split the impacts of market movement and intrinsic individual stock movement. In response to the noise issue, we propose two hypotheses: the trading mode deviation hypothesis and the price prediction uncertainty hypothesis. Based on these two hypotheses, we separately use autoencoder and Mixture Density Network (MDN) to obtain Trading Mode Deviation (TMD) and Price Prediction Uncertainty (PPU) of samples. TMD and PPU are correlated with the difficulty of samples and can be used to assess the uncertainty of price movement. Then, we propose to use curriculum learning algorithm to train model. The experimental results of the CSI Smallcap 500 index (CSI500) stock trading data show that the Micro-F1 of our method has been improved and our method effectively alleviates the class imbalance.
Article
We employ both random forests and LSTM networks (more precisely CuDNNLSTM) as training methodologies to analyze their effectiveness in forecasting out-of-sample directional movements of constituent stocks of the S&P 500 from January 1993 till December 2018 for intraday trading. We introduce a multi-feature setting consisting not only of the returns with respect to the closing prices, but also with respect to the opening prices and intraday returns. As trading strategy, we use Krauss et al. (2017) and Fischer and Krauss (2018) as benchmark. On each trading day, we buy the 10 stocks with the highest probability and sell short the 10 stocks with the lowest probability to outperform the market in terms of intraday returns — all with equal monetary weight. Our empirical results ² show that the multi-feature setting provides a daily return, prior to transaction costs, of 0.64% using LSTM networks, and 0.54% using random forests. Hence we outperform the single-feature setting in Fischer and Krauss (2018) and Krauss et al. (2017) consisting only of the daily returns with respect to the closing prices, having corresponding daily returns of 0.41% and of 0.39% with respect to LSTM and random forests, respectively.