<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">IASC</journal-id>
<journal-id journal-id-type="nlm-ta">IASC</journal-id>
<journal-id journal-id-type="publisher-id">IASC</journal-id>
<journal-title-group>
<journal-title>Intelligent Automation &#x0026; Soft Computing</journal-title>
</journal-title-group>
<issn pub-type="epub">2326-005X</issn>
<issn pub-type="ppub">1079-8587</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">14962</article-id>
<article-id pub-id-type="doi">10.32604/iasc.2021.014962</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Short-Term Stock Price Forecasting Based on an SVD-LSTM Model</article-title>
<alt-title alt-title-type="left-running-head">Short-Term Stock Price Forecasting Based on an SVD-LSTM Model</alt-title>
<alt-title alt-title-type="right-running-head">Short-Term Stock Price Forecasting Based on an SVD-LSTM Model</alt-title>
</title-group>
<contrib-group content-type="authors">
<contrib id="author-1" contrib-type="author">
<name name-style="western">
<surname>Sun</surname>
<given-names>Mei</given-names>
</name>
<xref ref-type="aff" rid="aff-1">1</xref>
</contrib>
<contrib id="author-2" contrib-type="author">
<name name-style="western">
<surname>Li</surname>
<given-names>Qingtao</given-names>
</name>
<xref ref-type="aff" rid="aff-2">2</xref>
</contrib>
<contrib id="author-3" contrib-type="author" corresp="yes">
<name name-style="western">
<surname>Lin</surname>
<given-names>Peiguang</given-names>
</name>
<xref ref-type="aff" rid="aff-2">2</xref>
<email>llpwgh@163.com</email>
</contrib>
<aff id="aff-1">
<label>1</label><institution>Department of Finance and Taxation, Shandong University of Finance and Economics</institution>, <addr-line>Jinan, 250014</addr-line>, <country>China</country></aff>
<aff id="aff-2">
<label>2</label><institution>Department of Computer science and Technology, Shandong University of Finance and Economics</institution>, <addr-line>Jinan, 250014</addr-line>, <country>China</country></aff>
</contrib-group><author-notes><corresp id="cor1">&#x002A;Corresponding Author: Peiguang Lin. Email: <email>llpwgh@163.com</email></corresp></author-notes>
<pub-date pub-type="epub" date-type="pub" iso-8601-date="2021-01-01">
<day>1</day>
<month>1</month>
<year iso-8601-date="2021">2021</year>
</pub-date>
<volume>28</volume>
<issue>2</issue>
<fpage>369</fpage>
<lpage>378</lpage>
<history>
<date date-type="received">
<day>29</day>
<month>10</month>
<year iso-8601-date="2020">2020</year>
</date>
<date date-type="accepted">
<day>04</day>
<month>2</month>
<year iso-8601-date="2021">2021</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2021 Sun, Li and Lin</copyright-statement>
<copyright-year>2021</copyright-year>
<copyright-holder>Sun, Li and Lin</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_IASC_14962.pdf"></self-uri>
<abstract>
<p>Stocks are the key components of most investment portfolios. The accurate forecasting of stock prices can help investors and investment brokerage firms make profits or reduce losses. However, stock forecasting is complex because of the intrinsic features of stock data, such as nonlinearity, long-term dependency, and volatility. Moreover, stock prices are affected by multiple factors. Various studies in this field have proposed ways to improve prediction accuracy. However, not all of the proposed features are valid, and there is often noise in the features&#x2014;such as political, economic, and legal factors&#x2014;which can lead to poor prediction results. To overcome such limitations, this study proposes a forecasting model for predicting stock prices in a short-term time series. First, we use singular value decomposition (SVD) to reconstruct the features of stock data, eliminate data noise, retain the most effective data features, and improve the accuracy of prediction. We then model the time-series stock data based on a long short-term memory (LSTM) model. We compare our proposed SVD-LSTM model with four state-of-the-art methods using real-world stock datasets from two Chinese banks: Ping an Bank and Shanghai Pudong Development Bank. The experimental results show that the proposed method can improve the accuracy of stock price predictions.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Short-term stock price forecasting</kwd>
<kwd>singular value decomposition</kwd>
<kwd>deep learning</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>As a high-risk but high-yield investment method, stock trading has received a great deal of attention from both investors and researchers. However, predicting stock prices and stock movement is challenging because of uncertainties such as political factors, market factors, and environmental factors.</p>
<p>Since stock prices are affected by multiple factors, researchers have introduced various features to improve the results of stock price prediction. However, there is often noise in these features, which affects the accuracy of stock price prediction. Moreover, traditional forecasting methods typically use statistical models to make predictions based on linear connections between stocks. Yet, given the existence of nonlinearity in stock data, these types of statistical models often fail to accurately predict stock prices. To address this problem, the present study developed a model based on singular value decomposition (SVD) and long short-term memory (LSTM).</p>
<p>SVD, as a matrix decomposition method, has been used extensively in the imaging field. For example, SVD can be used to compress images by reconstructing an image matrix based on singular values [<xref ref-type="bibr" rid="ref-1">1</xref>]. In recent years, with the development of artificial neural networks (ANNs) [<xref ref-type="bibr" rid="ref-2">2</xref>], LSTM networks have facilitated significant progress in research on processing time-series data [<xref ref-type="bibr" rid="ref-3">3</xref>]. Compared to traditional multilayer perceptron (MLP) [<xref ref-type="bibr" rid="ref-4">4</xref>], convolutional neural network (CNN) [<xref ref-type="bibr" rid="ref-5">5</xref>], and recurrent neural network (RNN) models, LSTM networks account for the long-term nature of time-series stock data and add three gates to deal with problems such as vanishing or exploding gradients.</p>
<p>Stock prices are highly prone to volatility as a result of political and economic factors, among others. For this study, we used the top 30% of forecasting results as short-term forecasts, and all forecast results were used as long-term forecasts. The experimental results indicated that our proposed model achieved better results for short-term prediction than for long-term prediction.</p>
<p>This study proposes a deep learning model for predicting stock prices in a time series based on an SVD-LSTM model. We used SVD to reconstruct the data by selecting partial features with large singular values; this can eliminate noise in the data and improve data quality. Meanwhile, LSTM was used to train the cleaned input data and predict the closing prices of stocks. In our experiments, the proposed SVD-LSTM model was shown to outperform MLP, CNN, LSTM, and PCA-LSTM models in the short-term prediction of stock prices.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Work</title>
<p>There are many well-known models for stock forecasting, such as the autoregressive (AR) model, autoregressive&#x2013;moving-average (ARMA) model, and autoregressive integrated moving average (ARIMA) model [<xref ref-type="bibr" rid="ref-6">6</xref>,<xref ref-type="bibr" rid="ref-7">7</xref>]. These traditional time-series stock models mainly rely on linear dependency among stock prices. In reality, however, such linearity does not apply to time series because of factors such as the political climate, and traditional time-series models thus have difficulty predicting stock prices with acceptable accuracy.</p>
<p>With the development of neural networks, Bayesian [<xref ref-type="bibr" rid="ref-8">8</xref>,<xref ref-type="bibr" rid="ref-9">9</xref>] and decision tree [<xref ref-type="bibr" rid="ref-10">10</xref>] models, among others, have been used for time-series forecasting. However, such models have difficulty accurately predicting stock prices since they are primarily suited for classification tasks. Given their successful application in the field of image processing, CNN models were subsequently adopted for predicting time-series data. For example, using a stock dataset consisting of 1721 companies listed on the National Stock Exchange of India, Selvin et al. [<xref ref-type="bibr" rid="ref-11">11</xref>] was able to accurately predict stock prices using a CNN model.</p>
<p>Nevertheless, CNN models are mainly applied in the field of image processing through operations such as convolution. While CNN models are used to retain image features and reduce the search space of image processing, they cannot fully consider the temporal dependency of stock prices. For example, using an eight-year stock dataset from the Chinese company Pingtan, Li et al. [<xref ref-type="bibr" rid="ref-12">12</xref>] found that RNN models predicted stocks more accurately than certain traditional machine learning models. However, when handling data with a long time sequence, RNN models are prone to problems such as vanishing or exploding gradients, which reduce prediction accuracy. To address such problems, Hochreiter and Schmidhuber [<xref ref-type="bibr" rid="ref-13">13</xref>] proposed LSTM&#x2014;a variant of RNN&#x2014;which comprises three control units: a forget gate, an input gate, and an output gate. Using an LSTM model to predict the stock price of Chinese pharmaceutical company Yunnan Baiyao, Wang et al. [<xref ref-type="bibr" rid="ref-14">14</xref>] achieved a prediction accuracy of 60&#x2013;65%. In the present study, therefore, we also used an LSTM model to forecast stock prices.</p>
<p>Stock data have many different characteristics, each of which has a different effect (weight) on price forecasting. It is important, then, that stock prediction models take such characteristics into consideration.</p>
<p>The traditional processing method of principal component analysis (PCA) reduces the dimensionality of stock data by only considering the most representative data features. In SVD, however, PCA is mainly applied to the diagonal and right singular matrix and is not applicable to processing the left singular matrix. Han [<xref ref-type="bibr" rid="ref-15">15</xref>] achieved good prediction results in a time series by leveraging a newly proposed SVD-based time-series neural network. Thus, in our study, we used an SVD model to reconstruct stock data in the feature-processing stage, which helped to clean up noise in the data.</p>
<p>We should note that, in SVD, large singular values indicate influential information while small singular values refer to noisy information. In this study, we considered only large singular values when reconstructing the data and ignored small ones with noise. We reconstructed the data matrix using singular values whose accumulated weights accounted for more than 90% of all singular values.</p>
</sec>
<sec id="s3">
<label>3</label>
<title>Time-Series Stock Forecasting Model Based on SVD-LSTM</title>
<p>This section describes using SVD to process the data and then using LSTM as the prediction model.</p>
<sec id="s3_1">
<label>3.1</label>
<title>Data Preprocessing</title>
<p>Stock data involve many characteristics, such as closing price, opening price, highest price, lowest price, and transaction value. Using the closing price as the predicted value, we employed the SVD method to retrieve influential factors (e.g., opening price) that are closely related to the predicted value and then reconstructed the input matrix by eliminating noise in the data.</p>
<sec id="s3_1_1">
<label>3.1.1</label>
<title>Data Standardization</title>
<p>Given the different scales of stock characteristics, we standardize these characteristics via <xref ref-type="disp-formula" rid="eqn-1">Eq. (1)</xref>:</p>
<p><disp-formula id="eqn-1">
<label>(1)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-1.png"/><tex-math id="tex-eqn-1"><![CDATA[\tilde x = \displaystyle{{x - {x_{\min }}} \over {{x_{\max }} - {x_{\min }}}}]]></tex-math>--><mml:math id="mml-eqn-1" display="block"><mml:mrow><mml:mover><mml:mi>x</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mstyle scriptlevel="0" displaystyle="true"><mml:mrow><mml:mfrac><mml:mrow><mml:mi>x</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mo form="prefix" movablelimits="true">min</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mo form="prefix" movablelimits="true">max</mml:mo></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mo form="prefix" movablelimits="true">min</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:mrow></mml:mfrac></mml:mrow></mml:mstyle></mml:math>
<!--</alternatives>--></disp-formula></p>
</sec>
<sec id="s3_1_2">
<label>3.1.2</label>
<title>Singular Value Decomposition</title>
<p>SVD decomposition is essentially a type of matrix decomposition. For stock data, it can be represented as a matrix of <inline-formula id="ieqn-1">
<!--<alternatives><inline-graphic xlink:href="ieqn-1.tif"/><tex-math id="tex-ieqn-1"><![CDATA[m \times n]]></tex-math>--><mml:math id="mml-ieqn-1"><mml:mi>m</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>n</mml:mi></mml:math>
<!--</alternatives>--></inline-formula>, where <inline-formula id="ieqn-2">
<!--<alternatives><inline-graphic xlink:href="ieqn-2.tif"/><tex-math id="tex-ieqn-2"><![CDATA[m]]></tex-math>--><mml:math id="mml-ieqn-2"><mml:mi>m</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> is the number of stock data records and <inline-formula id="ieqn-3">
<!--<alternatives><inline-graphic xlink:href="ieqn-3.tif"/><tex-math id="tex-ieqn-3"><![CDATA[n]]></tex-math>--><mml:math id="mml-ieqn-3"><mml:mi>n</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> is the number of stock features (i.e., dimensionality). In this study, <inline-formula id="ieqn-4">
<!--<alternatives><inline-graphic xlink:href="ieqn-4.tif"/><tex-math id="tex-ieqn-4"><![CDATA[n]]></tex-math>--><mml:math id="mml-ieqn-4"><mml:mi>n</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> represents features other than the stock closing price:</p>
<p><disp-formula id="eqn-2">
<label>(2)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-2.png"/><tex-math id="tex-eqn-2"><![CDATA[X=\left( {\matrix{ {{x_{11}}} &#9; \ldots &#9; {{x_{1n}}} \cr \vdots &#9; \ddots &#9; \vdots \cr {{x_{m1}}} &#9; \cdots &#9; {{x_{mn}}} \cr } } \right)]]></tex-math>--><mml:math id="mml-eqn-2" display="block"><mml:mi>X</mml:mi><mml:mo>&#x003D;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mn>11</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mrow></mml:mtd><mml:mtd><mml:mo>&#x2026;</mml:mo></mml:mtd><mml:mtd><mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mn>1</mml:mn><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mo>&#x22EE;</mml:mo></mml:mtd><mml:mtd><mml:mo>&#x22F1;</mml:mo></mml:mtd><mml:mtd><mml:mo>&#x22EE;</mml:mo></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mrow></mml:mtd><mml:mtd><mml:mo>&#x22EF;</mml:mo></mml:mtd><mml:mtd><mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
<p>SVD is used to decompose the stock data matrix as follows:</p>
<p><disp-formula id="eqn-3">
<label>(3)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-3.png"/><tex-math id="tex-eqn-3"><![CDATA[X = U\Sigma {V^T}]]></tex-math>--><mml:math id="mml-eqn-3" display="block"><mml:mi>X</mml:mi><mml:mo>&#x003D;</mml:mo><mml:mi>U</mml:mi><mml:mi mathvariant="normal">&#x03A3;</mml:mi><mml:mrow><mml:msup><mml:mi>V</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
<p><disp-formula id="eqn-4">
<label>(4)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-4.png"/><tex-math id="tex-eqn-4"><![CDATA[{X^T}X = \left( {V{S^T}{U^T}} \right)US{V^T} = V({S^T}S){V^T}]]></tex-math>--><mml:math id="mml-eqn-4" display="block"><mml:mrow><mml:msup><mml:mi>X</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mi>X</mml:mi><mml:mo>&#x003D;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>V</mml:mi><mml:mrow><mml:msup><mml:mi>S</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mrow><mml:msup><mml:mi>U</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mi>U</mml:mi><mml:mi>S</mml:mi><mml:mrow><mml:msup><mml:mi>V</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>V</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msup><mml:mi>S</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mi>S</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:msup><mml:mi>V</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
<p><disp-formula id="eqn-5">
<label>(5)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-5.png"/><tex-math id="tex-eqn-5"><![CDATA[X{X^T} = US{V^T}\left( {V{S^T}{U^T}} \right) = U\left( {S{S^T}} \right){U^T}]]></tex-math>--><mml:math id="mml-eqn-5" display="block"><mml:mi>X</mml:mi><mml:mrow><mml:msup><mml:mi>X</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>U</mml:mi><mml:mi>S</mml:mi><mml:mrow><mml:msup><mml:mi>V</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>V</mml:mi><mml:mrow><mml:msup><mml:mi>S</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mrow><mml:msup><mml:mi>U</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>U</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>S</mml:mi><mml:mrow><mml:msup><mml:mi>S</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msup><mml:mi>U</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
<p><disp-formula id="eqn-6">
<label>(6)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-6.png"/><tex-math id="tex-eqn-6"><![CDATA[{{\rm \sigma }_i} = \sqrt {{{\rm \lambda }_i}}]]></tex-math>--><mml:math id="mml-eqn-6" display="block"><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x03C3;</mml:mi></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:msqrt><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x03BB;</mml:mi></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msqrt></mml:math>
<!--</alternatives>--></disp-formula></p>
<p>In <xref ref-type="disp-formula" rid="eqn-4">Eq. (4)</xref>, the feature matrix <inline-formula id="ieqn-5">
<!--<alternatives><inline-graphic xlink:href="ieqn-5.tif"/><tex-math id="tex-ieqn-5"><![CDATA[{X^T}X]]></tex-math>--><mml:math id="mml-ieqn-5"><mml:mrow><mml:msup><mml:mi>X</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mi>X</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> is actually the <inline-formula id="ieqn-6">
<!--<alternatives><inline-graphic xlink:href="ieqn-6.tif"/><tex-math id="tex-ieqn-6"><![CDATA[V]]></tex-math>--><mml:math id="mml-ieqn-6"><mml:mi>V</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> matrix in SVD. In <xref ref-type="disp-formula" rid="eqn-5">Eq. (5)</xref>, the feature matrix <inline-formula id="ieqn-7">
<!--<alternatives><inline-graphic xlink:href="ieqn-7.tif"/><tex-math id="tex-ieqn-7"><![CDATA[X{X^T}]]></tex-math>--><mml:math id="mml-ieqn-7"><mml:mi>X</mml:mi><mml:mrow><mml:msup><mml:mi>X</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:math>
<!--</alternatives>--></inline-formula> is actually the <inline-formula id="ieqn-8">
<!--<alternatives><inline-graphic xlink:href="ieqn-8.tif"/><tex-math id="tex-ieqn-8"><![CDATA[U]]></tex-math>--><mml:math id="mml-ieqn-8"><mml:mi>U</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> matrix in SVD. In <xref ref-type="disp-formula" rid="eqn-6">Eq. (6)</xref>, the square root of the eigenvalue of the <inline-formula id="ieqn-9">
<!--<alternatives><inline-graphic xlink:href="ieqn-9.tif"/><tex-math id="tex-ieqn-9"><![CDATA[\Sigma]]></tex-math>--><mml:math id="mml-ieqn-9"><mml:mi mathvariant="normal">&#x03A3;</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> matrix is equal to the eigenvalue of the <inline-formula id="ieqn-10">
<!--<alternatives><inline-graphic xlink:href="ieqn-10.tif"/><tex-math id="tex-ieqn-10"><![CDATA[{X^T}X]]></tex-math>--><mml:math id="mml-ieqn-10"><mml:mrow><mml:msup><mml:mi>X</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mi>X</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> matrix. Specifically, matrix <inline-formula id="ieqn-11">
<!--<alternatives><inline-graphic xlink:href="ieqn-11.tif"/><tex-math id="tex-ieqn-11"><![CDATA[U]]></tex-math>--><mml:math id="mml-ieqn-11"><mml:mi>U</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> is a right singular matrix of <inline-formula id="ieqn-12">
<!--<alternatives><inline-graphic xlink:href="ieqn-12.tif"/><tex-math id="tex-ieqn-12"><![CDATA[m \times m]]></tex-math>--><mml:math id="mml-ieqn-12"><mml:mi>m</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>m</mml:mi></mml:math>
<!--</alternatives>--></inline-formula>, matrix <inline-formula id="ieqn-13">
<!--<alternatives><inline-graphic xlink:href="ieqn-13.tif"/><tex-math id="tex-ieqn-13"><![CDATA[\Sigma]]></tex-math>--><mml:math id="mml-ieqn-13"><mml:mi mathvariant="normal">&#x03A3;</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> is a matrix of <inline-formula id="ieqn-14">
<!--<alternatives><inline-graphic xlink:href="ieqn-14.tif"/><tex-math id="tex-ieqn-14"><![CDATA[m \times n]]></tex-math>--><mml:math id="mml-ieqn-14"><mml:mi>m</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>n</mml:mi></mml:math>
<!--</alternatives>--></inline-formula>, and matrix <inline-formula id="ieqn-15">
<!--<alternatives><inline-graphic xlink:href="ieqn-15.tif"/><tex-math id="tex-ieqn-15"><![CDATA[V]]></tex-math>--><mml:math id="mml-ieqn-15"><mml:mi>V</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> is an <inline-formula id="ieqn-16">
<!--<alternatives><inline-graphic xlink:href="ieqn-16.tif"/><tex-math id="tex-ieqn-16"><![CDATA[n \times n]]></tex-math>--><mml:math id="mml-ieqn-16"><mml:mi>n</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>n</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> right singular matrix.</p>
<p>Based on SVD, matrix <inline-formula id="ieqn-17">
<!--<alternatives><inline-graphic xlink:href="ieqn-17.tif"/><tex-math id="tex-ieqn-17"><![CDATA[X]]></tex-math>--><mml:math id="mml-ieqn-17"><mml:mi>X</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> can be converted into a form in which three matrices are multiplied. The diagonal elements of matrix <inline-formula id="ieqn-18">
<!--<alternatives><inline-graphic xlink:href="ieqn-18.tif"/><tex-math id="tex-ieqn-18"><![CDATA[\Sigma]]></tex-math>--><mml:math id="mml-ieqn-18"><mml:mi mathvariant="normal">&#x03A3;</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> are the singular values of matrix <inline-formula id="ieqn-19">
<!--<alternatives><inline-graphic xlink:href="ieqn-19.tif"/><tex-math id="tex-ieqn-19"><![CDATA[X]]></tex-math>--><mml:math id="mml-ieqn-19"><mml:mi>X</mml:mi></mml:math>
<!--</alternatives>--></inline-formula>, which can approximately reflect feature importance in the matrix. The small singular values in the matrix can be ignored since they can be considered noise.</p>
</sec>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>Stock Forecasting Model</title>
<p>We chose an LSTM model as the prediction tool since it can handle temporal dependency in stock data. An LSTM network is a variant of an RNN; RNNs use sequence data as inputs and connect the units in chains [<xref ref-type="bibr" rid="ref-16">16</xref>].</p>
<p>An RNN model&#x2019;s memory feature can save the status of previous stages and transfer it to later stages. In the training process, an RNN model can save and transmit previous inputs as a hidden state. In an RNN model, the output is generated jointly by the current input and the previously saved units.</p>
<p>RNNs are primarily trained via back-propagation. However, given a long-term input sequence, it is possible to lose the gradient in the process of back-propagation. To overcome this, we used an LSTM model as the training model (which, as mentioned earlier, includes forget, input, and output gates).</p>
<p>The <italic>forget gate</italic> (i.e., Eq. [<xref ref-type="bibr" rid="ref-7">7</xref>]) determines the amount of information retained from previous states, where <inline-formula id="ieqn-20">
<!--<alternatives><inline-graphic xlink:href="ieqn-20.tif"/><tex-math id="tex-ieqn-20"><![CDATA[{\rm \sigma }]]></tex-math>--><mml:math id="mml-ieqn-20"><mml:mrow><mml:mi>&#x03C3;</mml:mi></mml:mrow></mml:math>
<!--</alternatives>--></inline-formula> is the sigmoid function, <inline-formula id="ieqn-21">
<!--<alternatives><inline-graphic xlink:href="ieqn-21.tif"/><tex-math id="tex-ieqn-21"><![CDATA[W]]></tex-math>--><mml:math id="mml-ieqn-21"><mml:mi>W</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> is the weight, and <inline-formula id="ieqn-22">
<!--<alternatives><inline-graphic xlink:href="ieqn-22.tif"/><tex-math id="tex-ieqn-22"><![CDATA[b]]></tex-math>--><mml:math id="mml-ieqn-22"><mml:mi>b</mml:mi></mml:math>
<!--</alternatives>--></inline-formula> is a bias term. When input data at the current moment passes through the forget gate, the sigmoid function of the forget gate will map the input data to either 1 or 0, where 1 and 0 indicate the pass or fail of the input values, respectively.</p>
<p><disp-formula id="eqn-7">
<label>(7)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-7.png"/><tex-math id="tex-eqn-7"><![CDATA[{f_t} = \sigma \left( {{W_f} \cdot \left[ {{h_{t - 1}},{x_t}} \right] + {b_f}} \right)]]></tex-math>--><mml:math id="mml-eqn-7" display="block"><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mo>&#x002B;</mml:mo><mml:mrow><mml:msub><mml:mi>b</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
<p>The <italic>input gate</italic> determines the amount of input states retained from the current state. More specifically, the input gate determines the amount of data to be retained at the current moment via <xref ref-type="disp-formula" rid="eqn-8">Eq. (8)</xref>, obtains the new candidate value <inline-formula id="ieqn-23">
<!--<alternatives><inline-graphic xlink:href="ieqn-23.tif"/><tex-math id="tex-ieqn-23"><![CDATA[{\tilde C_t}]]></tex-math>--><mml:math id="mml-ieqn-23"><mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>C</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:math>
<!--</alternatives>--></inline-formula> via <xref ref-type="disp-formula" rid="eqn-9">Eq. (9)</xref>, and updates the current cell state via <xref ref-type="disp-formula" rid="eqn-10">Eq. (10)</xref>:</p>
<p><disp-formula id="eqn-8">
<label>(8)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-8.png"/><tex-math id="tex-eqn-8"><![CDATA[{i_t} = \sigma \left( {{W_i} \cdot \left[ {{h_{t - 1}},{x_t}} \right] + {b_i}} \right)]]></tex-math>--><mml:math id="mml-eqn-8" display="block"><mml:mrow><mml:msub><mml:mi>i</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mo>&#x002B;</mml:mo><mml:mrow><mml:msub><mml:mi>b</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
<p><disp-formula id="eqn-9">
<label>(9)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-9.png"/><tex-math id="tex-eqn-9"><![CDATA[{\tilde C_t} = \tanh \left( {{W_C} \cdot \left[ {{h_{t - 1}},{x_t}} \right] + {b_C}} \right)]]></tex-math>--><mml:math id="mml-eqn-9" display="block"><mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>C</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>tanh</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mi>C</mml:mi></mml:msub></mml:mrow><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mo>&#x002B;</mml:mo><mml:mrow><mml:msub><mml:mi>b</mml:mi><mml:mi>C</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
<p><disp-formula id="eqn-10">
<label>(10)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-10.png"/><tex-math id="tex-eqn-10"><![CDATA[{C_t} = {f_t}*{C_{t - 1}} + {i_t}*{\tilde C_t}]]></tex-math>--><mml:math id="mml-eqn-10" display="block"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>&#x2217;</mml:mo><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x002B;</mml:mo><mml:mrow><mml:msub><mml:mi>i</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>&#x2217;</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>C</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
<p>The <italic>output gate</italic> determines the amount of output information based on the LSTM model via <xref ref-type="disp-formula" rid="eqn-11">Eq. (11)</xref> and <xref ref-type="disp-formula" rid="eqn-12">(12)</xref>:</p>
<p><disp-formula id="eqn-11">
<label>(11)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-11.png"/><tex-math id="tex-eqn-11"><![CDATA[{o_t} = \sigma \left( {{W_o}\left[ {{h_{t - 1}},{x_t}} \right] + {b_o}} \right)]]></tex-math>--><mml:math id="mml-eqn-11" display="block"><mml:mrow><mml:msub><mml:mi>o</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mi>o</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mo>&#x002B;</mml:mo><mml:mrow><mml:msub><mml:mi>b</mml:mi><mml:mi>o</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
<p><disp-formula id="eqn-12">
<label>(12)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-12.png"/><tex-math id="tex-eqn-12"><![CDATA[{h_t} = {o_t}*\tanh \left( {{C_t}} \right)]]></tex-math>--><mml:math id="mml-eqn-12" display="block"><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mrow><mml:msub><mml:mi>o</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>&#x2217;</mml:mo><mml:mi>tanh</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
<!--</alternatives>--></disp-formula></p>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Experiment</title>
<sec id="s4_1">
<label>4.1</label>
<title>Dataset</title>
<p>We evaluated the performance of the proposed model using two real bank datasets&#x2014;Ping an Bank and Shanghai Pudong Development Bank (SPD Bank)&#x2014;collected from January 4, 2009, to December 31, 2019. For both datasets, we selected five attributes as the characteristics: opening price, closing price, highest price, lowest price, and trading volume. We used the SVD-LSTM model as the training model and set 70% of the data as the training set and the remaining 30% as the testing set. We then used the top 30% of the test dataset as the short-term prediction reference data.</p>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Feature Extraction</title>
<p>Using the closing price as the prediction target, we decomposed the other data features based on SVD, reconstructed the data matrix by selecting singular values whose accumulated weights accounted for more than 90% of all singular values, and cleaned the data noise. <xref ref-type="table" rid="table-1">Tab. 1</xref> shows the singular stock values of Ping an Bank and SPD Bank. From the results, the weights of the first two singular values accounted for more than 90% in both datasets. We then reconstructed the input matrix by selecting the first two singular values.</p>

<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>Singular Values for Ping An Bank and SPD Bank</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Feature</th>
<th>Ping an Bank singular value size</th>
<th>SPD Bank singular value size</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>22.81</td>
<td>28.36</td>
</tr>
<tr>
<td>2</td>
<td>5.754</td>
<td>3.992</td>
</tr>
<tr>
<td>3</td>
<td>0.765</td>
<td>0.351</td>
</tr>
<tr>
<td>4</td>
<td>0.329</td>
<td>0.249</td>
</tr>
<tr>
<td>5</td>
<td>0.272</td>
<td>0.201</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>Model Evaluation Indicators</title>
<p>We evaluated the performance of our SVD-LSTM model against four other models&#x2014;MLP, CNN, LSTM, and PCA-LSTM&#x2014;using three metrics: root-mean-square error (RMSE), mean absolute percent error (MAPE), and mean absolute error (MAE):</p>
<p><disp-formula id="eqn-13">
<label>(13)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-13.png"/><tex-math id="tex-eqn-13"><![CDATA[RMSE = \sqrt {\displaystyle{1 \over n}{{\sum\limits_{i = 1}^n {({{\hat y}_i} - {y_i})} }^2}}]]></tex-math>--><mml:math id="mml-eqn-13" display="block"><mml:mi>R</mml:mi><mml:mi>M</mml:mi><mml:mi>S</mml:mi><mml:mi>E</mml:mi><mml:mo>&#x003D;</mml:mo><mml:msqrt><mml:mstyle scriptlevel="0" displaystyle="true"><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mi>n</mml:mi></mml:mfrac></mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>&#x003D;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover></mml:mrow></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:mstyle></mml:msqrt></mml:math>
<!--</alternatives>--></disp-formula></p>
<p><disp-formula id="eqn-14">
<label>(14)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-14.png"/><tex-math id="tex-eqn-14"><![CDATA[MAPE = \displaystyle{{1{\rm 00\% }} \over n}\sum\limits_{i = 1}^n {\left| {\displaystyle{{{{\hat y}_i} - {y_i}} \over y}} \right|}]]></tex-math>--><mml:math id="mml-eqn-14" display="block"><mml:mi>M</mml:mi><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>E</mml:mi><mml:mo>&#x003D;</mml:mo><mml:mstyle scriptlevel="0" displaystyle="true"><mml:mrow><mml:mfrac><mml:mrow><mml:mn>1</mml:mn><mml:mrow><mml:mn>00</mml:mn><mml:mi mathvariant="normal">%</mml:mi></mml:mrow></mml:mrow><mml:mi>n</mml:mi></mml:mfrac></mml:mrow><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>&#x003D;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mrow><mml:mstyle scriptlevel="0" displaystyle="true"><mml:mrow><mml:mfrac><mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover></mml:mrow></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mi>y</mml:mi></mml:mfrac></mml:mrow></mml:mstyle></mml:mrow><mml:mo>|</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math>
<!--</alternatives>--></disp-formula></p>
<p><disp-formula id="eqn-15">
<label>(15)</label>
<!--<alternatives><graphic mimetype="image" mime-subtype="png" xlink:href="eqn-15.png"/><tex-math id="tex-eqn-15"><![CDATA[MAE{\rm\ =\ }\displaystyle{1 \over n}\sum\limits_{i = 1}^n {\left| {{{\hat y}_i} - {y_i}} \right|}]]></tex-math>--><mml:math id="mml-eqn-15" display="block"><mml:mi>M</mml:mi><mml:mi>A</mml:mi><mml:mi>E</mml:mi><mml:mrow><mml:mo>&#x003D;</mml:mo></mml:mrow><mml:mstyle scriptlevel="0" displaystyle="true"><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mi>n</mml:mi></mml:mfrac></mml:mrow><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>&#x003D;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover></mml:mrow></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>|</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math>
<!--</alternatives>--></disp-formula></p>
<p>where <inline-formula id="ieqn-24">
<!--<alternatives><inline-graphic xlink:href="ieqn-24.tif"/><tex-math id="tex-ieqn-24"><![CDATA[{\hat y_i}]]></tex-math>--><mml:math id="mml-ieqn-24"><mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math>
<!--</alternatives>--></inline-formula> represents the predicted value of the stock price, and <inline-formula id="ieqn-25">
<!--<alternatives><inline-graphic xlink:href="ieqn-25.tif"/><tex-math id="tex-ieqn-25"><![CDATA[{y_i}]]></tex-math>--><mml:math id="mml-ieqn-25"><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math>
<!--</alternatives>--></inline-formula> represents the real stock price data. The smaller the values of the three metrics, the better the performance of the model; the larger the values, the poorer the performance.</p>
</sec>
<sec id="s4_4">
<label>4.4</label>
<title>Parameter Sensitivity</title>
<p>An LSTM model&#x2019;s performance is affected by the choice of parameters. To study the sensitivity of the parameters, we simplified the analysis of the number of hidden neurons. Using other parameters as the default values, we varied the number of neurons as 16, 32, 64, 128, and 256. We selected the optimal hidden neuron parameter by determining the RMSE of all predicted datasets under different hidden neuron parameter settings.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>RMSE corresponding to different hidden neurons for Ping an Bank and SPD Bank</title>
</caption><graphic mimetype="image" mime-subtype="png" xlink:href="fig-1.png"/>
</fig>
<p><xref ref-type="fig" rid="fig-1">Fig. 1</xref> shows that the two datasets achieved the best performance (i.e., the lowest RMSE values) when the number of hidden neurons was set to 64. Therefore, we used an SVD-LSTM model with 64 hidden neurons for stock prediction.</p>
</sec>
<sec id="s4_5">
<label>4.5</label>
<title>Analysis of Results</title>
<p>We evaluated the performance of our SVD-LSTM model against MLP, CNN, LSTM, and PCA-LSTM models.</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>Comparison of different models&#x2019; prediction results for Ping An Bank (a) Ping An Bank SVD-LSTM forecast (b) Ping An Bank PCA-LSTM forecast (c) Ping An Bank LSTM forecast (d) Ping An Bank CNN forecast (e) Ping An Bank MLP forecast</title>
</caption><graphic mimetype="image" mime-subtype="png" xlink:href="fig-2.png"/>
</fig>
<fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>Comparison of different models&#x2019; prediction results for SPD Bank (a) SPD Bank SVD-LSTM forecast (b) SPD Bank PCA-LSTM forecast (c) SPD Bank LSTM forecast (d) SPD Bank CNN forecast (e) SPD Bank MLP forecast</title>
</caption><graphic mimetype="image" mime-subtype="png" xlink:href="fig-3.png"/>
</fig>

<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>Evaluation index results</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr><th colspan="2"></th>
<th>RMSE</th>
<th>MAE</th>
<th>MAPE</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="10">Ping An Bank</td>
<td>SVD-LSTM (units &#x003D; 64)</td>
<td>0.268</td>
<td>0.215</td>
<td>1.854</td>
</tr>
<tr>
<td>MLP</td>
<td>0.284</td>
<td>0.226</td>
<td>1.981</td>
</tr>
<tr>
<td>CNN</td>
<td>0.338</td>
<td>0.268</td>
<td>2.284</td>
</tr>
<tr>
<td>LSTM</td>
<td>0.300</td>
<td>0.262</td>
<td>2.366</td>
</tr>
<tr>
<td>PCA-LSTM</td>
<td>0.284</td>
<td>0.227</td>
<td>2.034</td>
</tr>
<tr>
<td>SVD-LSTM (units &#x003D; 64, top 30%)</td>
<td><bold>0.186</bold></td>
<td><bold>0.152</bold></td>
<td><bold>1.557</bold></td>
</tr>
<tr>
<td>MLP (top 30%)</td>
<td>0.237</td>
<td>0.209</td>
<td>2.143</td>
</tr>
<tr>
<td>CNN (top 30%)</td>
<td>0.239</td>
<td>0.210</td>
<td>2.162</td>
</tr>
<tr>
<td>LSTM (top 30%)</td>
<td>0.267</td>
<td>0.242</td>
<td>2.532</td>
</tr>
<tr>
<td>PCA-LSTM (top 30%)</td>
<td>0.261</td>
<td>0.236</td>
<td>2.436</td>
</tr>
<tr>
<td rowspan="10">SPD Bank</td>
<td>SVD-LSTM (units &#x003D; 64)</td>
<td>0.322</td>
<td>0.292</td>
<td>2.483</td>
</tr>
<tr>
<td>MLP</td>
<td>0.360</td>
<td>0.311</td>
<td>2.411</td>
</tr>
<tr>
<td>CNN</td>
<td>0.389</td>
<td>0.321</td>
<td>2.487</td>
</tr>
<tr>
<td>LSTM</td>
<td>0.579</td>
<td>0544</td>
<td>4.745</td>
</tr>
<tr>
<td>PCA-LSTM</td>
<td>0.337</td>
<td>0.288</td>
<td>2.392</td>
</tr>
<tr>
<td>SVD-LSTM (units &#x003D; 64, top 30%)</td>
<td><bold>0.287</bold></td>
<td><bold>0.258</bold></td>
<td><bold>1.801</bold></td>
</tr>
<tr>
<td>MLP (top 30%)</td>
<td>0.433</td>
<td>0.381</td>
<td>2.488</td>
</tr>
<tr>
<td>CNN(top 30%)</td>
<td>0.580</td>
<td>0.541</td>
<td>3.656</td>
</tr>
<tr>
<td>LSTM (top 30%)</td>
<td>0.494</td>
<td>0.454</td>
<td>3.255</td>
</tr>
<tr>
<td>PCA-LSTM (top 30%)</td>
<td>0.328</td>
<td>0.275</td>
<td>1.997</td>
</tr>
</tbody>
</table>
</table-wrap>
<fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>Scatterplots of real and forecasted data for Ping an Bank and SPD Bank (a) Scatterplot of real and forecasted data for Ping An Bank (b) Scatterplot of real and forecasted data for SPD Bank</title>
</caption><graphic mimetype="image" mime-subtype="png" xlink:href="fig-4.png"/>
</fig>
<p><xref ref-type="fig" rid="fig-2">Figs. 2</xref> and <xref ref-type="fig" rid="fig-3">3</xref> show that the proposed SVD-LSTM model performed better than the other models for both datasets. Moreover, as shown in <xref ref-type="table" rid="table-2">Tab. 2</xref>, our proposed SVD-LSTM model outperformed the others for both datasets with regard to the MAE, MAPE, and RMSE metrics. We can also see in <xref ref-type="table" rid="table-2">Tab. 2</xref> that our proposed SVD-LSTM model achieved higher accuracy in predicting data in the short term versus the long term, thus confirming the advantage of the SVD-LSTM model for short-term stock forecasting.</p>
<p><xref ref-type="fig" rid="fig-4">Fig. 4</xref> shows scatterplots of the real and predicted values obtained by the SVD-LSTM model for the two banks. Ideally, the scatter points should be distributed around the straight line with a slope of 1, which is clearly the case in the figure. This verifies the predictive validity of our proposed SVD-LSTM model.</p>
<p>In summary, our experiments using datasets for SPD Bank and Ping an Bank verified the effectiveness of the proposed SVD-LSTM model for the short-term prediction of stock data.</p>
</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Conclusion</title>
<p>This study proposed a novel SVD-LSTM model for predicting stock prices. The model uses SVD to clean data noise and reconstruct the data matrix. In our experiments using datasets for Ping an Bank and SPD Bank, the proposed SVD-LSTM model outperformed four other models (i.e., MLP, CNN, LSTM, and PCA-LSTM) in predicting short-term stock prices.</p>
<p>Nevertheless, we considered only four stock characteristics&#x2014;opening price, highest price, lowest price, and trading volume&#x2014;and ignored the influence of other factors. In future work, we will consider additional factors (e.g., emotional indicators or policy factors), seek to improve the model&#x2019;s accuracy for long-term predictions, and improve the model&#x2019;s performance by dynamically optimizing parameters.</p>
</sec>
</body>
<back><fn-group>
<fn fn-type="other">
<p><bold>Funding Statement:</bold> Project manager: Chen Zhang. Grant number: 61802230. Type of funding: National Science Foundation of China.</p>
</fn>
<fn fn-type="conflict">
<p><bold>Conflicts of Interest:</bold> The authors declare that they have no conflicts of interest to report regarding this research.</p>
</fn>
</fn-group>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1">
<label>[1]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>H.</given-names> 
<surname>Andrews</surname></string-name> and <string-name>
<given-names>C.</given-names> 
<surname>Patterson</surname></string-name>
</person-group>, &#x201C;
<article-title>Singular value decomposition (SVD) image coding</article-title>,&#x201D; 
<source>IEEE Trans. on Communications</source>, vol. 
<volume>24</volume>, no. 
<issue>4</issue>, pp. 
<fpage>425</fpage>&#x2013;
<lpage>432</lpage>, 
<year iso-8601-date="1976">1976</year>.</mixed-citation>
</ref>
<ref id="ref-2">
<label>[2]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>M.</given-names> 
<surname>Qiu</surname></string-name> and <string-name>
<given-names>Y.</given-names> 
<surname>Song</surname></string-name>
</person-group>, &#x201C;
<article-title>Predicting the direction of stock market index movement using an optimized artificial neural network model</article-title>,&#x201D; 
<source>PLoS One</source>, vol. 
<volume>11</volume>, no. 
<issue>5</issue>, pp. 
<fpage>e0155133</fpage>, 
<year iso-8601-date="2016">2016</year>.</mixed-citation>
</ref>
<ref id="ref-3">
<label>[3]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>F. G.</given-names> 
<surname>Liu</surname></string-name>, <string-name>
<given-names>M. Q.</given-names> 
<surname>Cai</surname></string-name>, <string-name>
<given-names>L. M.</given-names> 
<surname>Wang</surname></string-name> and <string-name>
<given-names>Y. S.</given-names> 
<surname>Lu</surname></string-name>
</person-group>, &#x201C;
<article-title>An ensemble model based on adaptive noise reducer and over-fitting prevention LSTM for multivariate time series forecasting</article-title>,&#x201D; 
<source>IEEE Access</source>, vol. 
<volume>7</volume>, pp. 
<fpage>26102</fpage>&#x2013;
<lpage>26115</lpage>, 
<year iso-8601-date="2019">2019</year>.</mixed-citation>
</ref>
<ref id="ref-4">
<label>[4]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>M.</given-names> 
<surname>Khashei</surname></string-name> and <string-name>
<given-names>Z.</given-names> 
<surname>Hajirahimi</surname></string-name>
</person-group>, &#x201C;
<article-title>A comparative study of series ARIMA/MLP hybrid models for stock price forecasting</article-title>,&#x201D; 
<source>Communication in Statistics Simulation and Computation</source>, vol. 
<volume>48</volume>, no. 
<issue>9</issue>, pp. 
<fpage>1</fpage>&#x2013;
<lpage>16</lpage>, 
<year iso-8601-date="2018">2018</year>.</mixed-citation>
</ref>
<ref id="ref-5">
<label>[5]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>O. B.</given-names> 
<surname>Sezer</surname></string-name> and <string-name>
<given-names>A. M.</given-names> 
<surname>Ozbayoglu</surname></string-name>
</person-group>, &#x201C;
<article-title>Algorithmic financial trading with deep convolutional neural networks: Time series to image conversion approach</article-title>,&#x201D; 
<source>Applied Soft Computing</source>, vol. 
<volume>70</volume>, no. 
<issue>2</issue>, pp. 
<fpage>525</fpage>&#x2013;
<lpage>538</lpage>, 
<year iso-8601-date="2018">2018</year>.</mixed-citation>
</ref>
<ref id="ref-6">
<label>[6]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>S. S.</given-names> 
<surname>Nie</surname></string-name>
</person-group>, &#x201C;
<article-title>The historical development of time series analysis</article-title>,&#x201D; 
<source>Journal of Guangxi University for Nationalities (Natural Science Edition)</source>, vol. 
<volume>18</volume>, no. 
<issue>1</issue>, pp. 
<fpage>24</fpage>&#x2013;
<lpage>28</lpage>, 
<year iso-8601-date="2012">2012</year>.</mixed-citation>
</ref>
<ref id="ref-7">
<label>[7]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>P. F.</given-names> 
<surname>Pai</surname></string-name> and <string-name>
<given-names>C. S.</given-names> 
<surname>Lin</surname></string-name>
</person-group>, &#x201C;
<article-title>A hybrid arima and support vector machines model in stock price forecasting</article-title>,&#x201D; 
<source>Omega-Int. Journal of Management Science</source>, vol. 
<volume>33</volume>, no. 
<issue>6</issue>, pp. 
<fpage>497</fpage>&#x2013;
<lpage>505</lpage>, 
<year iso-8601-date="2005">2005</year>.</mixed-citation>
</ref>
<ref id="ref-8">
<label>[8]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>E.</given-names> 
<surname>Kita</surname></string-name>, <string-name>
<given-names>M.</given-names> 
<surname>Harada</surname></string-name> and <string-name>
<given-names>T.</given-names> 
<surname>Mizuno</surname></string-name>
</person-group>, &#x201C;
<article-title>Application of Bayesian network to stock price prediction</article-title>,&#x201D; 
<source>Artificial Intelligence Research</source>, vol. 
<volume>1</volume>, no. 
<issue>2</issue>, pp. 
<fpage>171</fpage>&#x2013;
<lpage>184</lpage>, 
<year iso-8601-date="2012">2012</year>.</mixed-citation>
</ref>
<ref id="ref-9">
<label>[9]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>Y.</given-names> 
<surname>Zuo</surname></string-name> and <string-name>
<given-names>E.</given-names> 
<surname>Kita</surname></string-name>
</person-group>, &#x201C;
<article-title>Stock price forecast using Bayesian network</article-title>,&#x201D; 
<source>Expert Systems with Applications</source>, vol. 
<volume>39</volume>, no. 
<issue>8</issue>, pp. 
<fpage>6729</fpage>&#x2013;
<lpage>6737</lpage>, 
<year iso-8601-date="2012">2012</year>.</mixed-citation>
</ref>
<ref id="ref-10">
<label>[10]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>T. S.</given-names> 
<surname>Chang</surname></string-name>
</person-group>, &#x201C;
<article-title>Comparative study of artificial neural networks, and decision trees for digital game content stocks price prediction</article-title>,&#x201D; 
<source>Expert Systems with Applications</source>, vol. 
<volume>38</volume>, no. 
<issue>12</issue>, pp. 
<fpage>14846</fpage>&#x2013;
<lpage>14851</lpage>, 
<year iso-8601-date="2011">2011</year>.</mixed-citation>
</ref>
<ref id="ref-11">
<label>[11]</label><mixed-citation publication-type="conf-proc">
<person-group person-group-type="author"><string-name>
<given-names>S.</given-names> 
<surname>Selvin</surname></string-name>, <string-name>
<given-names>R.</given-names> 
<surname>Vinayakumar</surname></string-name> and <string-name>
<given-names>E. A.</given-names> 
<surname>Gopalakrishna</surname></string-name>
</person-group>, &#x201C;
<article-title>Stock price prediction using lstm, rnn and cnn-sliding window model</article-title>,&#x201D; in <conf-name>Proc. ICACCI</conf-name>, 
<publisher-loc>Karnataka, India</publisher-loc>, pp. 
<fpage>1643</fpage>&#x2013;
<lpage>1647</lpage>, 
<year iso-8601-date="2017">2017</year>. </mixed-citation>
</ref>
<ref id="ref-12">
<label>[12]</label><mixed-citation publication-type="conf-proc">
<person-group person-group-type="author"><string-name>
<given-names>W.</given-names> 
<surname>Li</surname></string-name> and <string-name>
<given-names>L.</given-names> 
<surname>Jian</surname></string-name>
</person-group>, &#x201C;
<article-title>A comparative study on trend forecasting approach for stock price time series</article-title>,&#x201D; in <conf-name>Proc. ASID</conf-name>, 
<publisher-loc>Xiamen, China</publisher-loc>, pp. 
<fpage>74</fpage>&#x2013;
<lpage>78</lpage>, 
<year iso-8601-date="2017">2017</year>. </mixed-citation>
</ref>
<ref id="ref-13">
<label>[13]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>S.</given-names> 
<surname>Hochreiter</surname></string-name> and <string-name>
<given-names>J.</given-names> 
<surname>Schmidhuber</surname></string-name>
</person-group>, &#x201C;
<article-title>Long short-term memory</article-title>,&#x201D; 
<source>Neural Computation</source>, vol. 
<volume>9</volume>, no. 
<issue>8</issue>, pp. 
<fpage>1735</fpage>&#x2013;
<lpage>1780</lpage>, 
<year iso-8601-date="1997">1997</year>.</mixed-citation>
</ref>
<ref id="ref-14">
<label>[14]</label><mixed-citation publication-type="conf-proc">
<person-group person-group-type="author"><string-name>
<given-names>Y.</given-names> 
<surname>Wang</surname></string-name>, <string-name>
<given-names>Y.</given-names> 
<surname>Liu</surname></string-name> and <string-name>
<given-names>M.</given-names> 
<surname>Wang</surname></string-name>
</person-group>, &#x201C;
<article-title>Lstm model optimization on stock price forecasting</article-title>,&#x201D; in <conf-name>Proc. DCABES</conf-name>, 
<publisher-loc>Wuxi</publisher-loc>, pp. 
<fpage>173</fpage>&#x2013;
<lpage>177</lpage>, 
<year iso-8601-date="2018">2018</year>. </mixed-citation>
</ref>
<ref id="ref-15">
<label>[15]</label><mixed-citation publication-type="conf-proc">
<person-group person-group-type="author"><string-name>
<given-names>M.</given-names> 
<surname>Han</surname></string-name>, <string-name>
<given-names>M.</given-names> 
<surname>Fan</surname></string-name> and <string-name>
<given-names>Z.</given-names> 
<surname>Shi</surname></string-name>
</person-group>, &#x201C;
<article-title>Multivariate time series prediction by neural network combining svd</article-title>,&#x201D; in <conf-name>Proc. SMC</conf-name>, 
<publisher-loc>Beijing, China</publisher-loc>, pp. 
<fpage>3884</fpage>&#x2013;
<lpage>3889</lpage>, 
<year iso-8601-date="2006">2006</year>. </mixed-citation>
</ref>
<ref id="ref-16">
<label>[16]</label><mixed-citation publication-type="journal">
<person-group person-group-type="author"><string-name>
<given-names>H.</given-names> 
<surname>Sadr</surname></string-name>, <string-name>
<given-names>M. M.</given-names> 
<surname>Pedram</surname></string-name> and <string-name>
<given-names>M.</given-names> 
<surname>Teshnehlab</surname></string-name>
</person-group>, &#x201C;
<article-title>A robust sentiment analysis method based on sequential combination of convolutional and recursive neural networks</article-title>,&#x201D; 
<source>Neural Processing Letters</source>, vol. 
<volume>50</volume>, no. 
<issue>3</issue>, pp. 
<fpage>2745</fpage>&#x2013;
<lpage>2761</lpage>, 
<year iso-8601-date="2019">2019</year>.</mixed-citation>
</ref>
</ref-list>
</back>
</article>