# The Extraction of Maximal-Sum Principal Submatrix and Its Applications
## 6 Applications
### Construct a Optimal Stock Portfolio
#### 6.2.3 Test the Optimal Investment Portfolio  
The test experiment is conducted using a simple portfolio, \(k=3\), without losing generality. When \(k=3\), the optimal portfolio consists of the 1 st stock Baogang Shares, the 14 th stock Pien tez huang, and the 40 th stock China Exempt, according to Table 5.  
We use the first one-third of the 153 weekly return rates (\(t_{1}=51\)) to calculate the correlation coefficient matrix and proceed with investment from the next working week. For convenient comparison, 30 random investment portfolios are also simulated, and each random investment portfolio consists of three stocks randomly selected from 46 stocks. Let the initial investment be 1 unit, and there is no buying or selling transactions during the period. The changes in assets during the investment period of all 30 random investment portfolios and ours are drawn as line charts (Figure 11).  
In Figure 11, the red line shows that after 102 weeks, its result is greater than the initial fund 1. This means successfully investing with the optimal investment portfolio recommended by our method. After 102 weeks, the results of the green or blue lines are diversified, which reflects the instability of random investments.  
Two indicators are used for quantitative analysis. The first is the overall standard deviation \(\sigma\) defined by Formula (9), which measures the volatility of investment returns [27].  
\[\sigma=\sqrt{\frac{1}{n}{\sum_{i=1}^{n}}(x_{i}-\overline{x})^{2}} \tag{9}\]  
where \(\overline{x}\) is the arithmetic mean, and \(x_{i}\) is the daily increase.  
Another indicator for quantitative analysis is the final asset quantity, denoted by _Ret.  
Figure 11: The changes in assets during the investment period according to the optimal investment portfolio and the 30 random portfolios.  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \(k\) & \multicolumn{8}{c}{**Portfolios**} \\ \hline
3 & & & & & 1 & 14 & 40 & & \\
4 & & & & 1 & 14 & 28 & 41 & & \\
5 & & & & 1 & 9 & 14 & 28 & 40 & & \\
6 & & & & 1 & 9 & 16 & 28 & 40 & 41 & \\
7 & & & 1 & 9 & 14 & 28 & 30 & 40 & 41 & \\
8 & & & 1 & 9 & 14 & 28 & 30 & 33 & 40 & 41 & \\
9 & & & 1 & 9 & 14 & 28 & 30 & 33 & 40 & 41 & 44 \\
10 & & 1 & 9 & 10 & 28 & 30 & 33 & 38 & 40 & 41 & 44 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Different investment portfolios corresponding to different \(k\) values.  
Using \"Rnd \(k\)\" to represent 30 random portfolios, \"Ours\" to represent the portfolio obtained by the MSPS-UR algorithm, the result after 102 weeks in Figure 11 is listed in Table 6.  
For a more direct comparison, we subtract the corresponding indicators, i.e.,  
\[\Delta\sigma=\sigma(Rnd\ k)-\sigma(Ours) \tag{10}\]  
\[\Delta Ret=Ret(Rnd\ k)-Ret(Ours) \tag{11}\]  
The comparison of 30 random portfolios and our portfolio is shown in Table 7.  
In Table 7, there are eight portfolios that satisfied \(\Delta Ret<0\) and \(\Delta\sigma>0\), which means that these portfolios not only have lower final returns than those obtained by the MSPS-RU algorithm, but also have greater asset volatility. There are 15 combinations that satisfied \(\Delta\sigma<0\) and \(\Delta Ret<0\), which means that although these portfolios have lower asset volatility, their returns are lower than ours too.