# Constrained Dynamic Mean-Variance Portfolio Selection in Continuous-Time
## 5 An Illustrative Example  
Here we consider an example of the MV portfolio selection model. We used the financial indices of six industrial sectors in U.S stock market as the risky assets, namely, the sectors of toys and recreation, communication, ship building, coal, gold, and industrial mining. The detailed instructions of these industrial indices and historical data can be found in [[http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/det_48_ind_port.html](http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/det_48_ind_port.html)]([http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/det_48_ind_port.html](http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/det_48_ind_port.html)) (accessed on 18 August 2021). Based on the historical data of monthly return from January 2008 to December 2013, we could estimate the parameters of average return rate and volatility; e.g., we set \(\mu(t)=\bar{\mu}\) and \(\sigma(t)=\bar{\sigma}\) for all \(t\in[0,T]\) with  
\[\bar{\mu} =\left( \begin{array}{cccccc}0.0321&0.0123&0.0217&0.0217&0.0282 &0.0146\end{array} \right)\text{ and }\] \[\bar{\sigma} =\left( \begin{array}{cccccc}0.0845&0.0062&0.0166&0.0069&0.0087 &0.0068\\ 0.0062&0.0327&0.0148&0.0124&0.0067&0.0054\\ 0.0166&0.0148&0.0589&0.0271&0.0204&0.0088\\ 0.0069&0.0124&0.0271&0.0105&0.0215&0.0501\\ 0.0087&0.0067&0.0204&0.0215&0.0609&0.0120\\ 0.0068&0.0054&0.0088&0.0501&0.0120&0.1313\end{array} \right).\]  
Differently from the MV portfolio model studied in [12], in which the no-shorting constraints were imposed in all risky assets, our model allows the no-shorting constraints to only be imposed on some of the assets; i.e., we set no-short constraints \(u_{2}(t)\geq 0,u_{3}(t)\geq 0\), \(u_{4}(t)\geq 0\) and \(u_{6}(t)\geq 0\) for \(t\in[0,T]\). The remaining assets had no constraints; i.e., \(u_{1}(t)\) and \(u_{5}(t)\) were free of constraints. These constraints can be easily represented in matrix formulation \(H(t)u(t)\leq\mathbf{0}\), i.e., by setting the diagonal elements of \(H(t)\) to be \(-1\) except the first and fifth elements, and setting all the other elements to be 0. We also assumed that there is a risk-free asset with the monthly return rate being 0.25%. The investor entered market with initial wealth \(x_{0}=100\) and hoped for the (expected) terminal wealth level \(d=130\), with the investment horizon being \(T=12\) months. We also included a penalty matrix for the portfolio: \(R(t)=10^{-2}\mathbf{I}\) for all \(t\in[0,T]\). Based on Theorem 1, we can compute the optimal Lagrangian multiplier as \(\lambda^{*}=189.78\), and the optimal portfolio policy is  
\[u^{*}(t)= \begin{cases}\hat{R}^{mv}(t)\Big{(}x(t)-189.78\times e^{0.0025(t-T)} \Big{)}\ \ \text{if}\ \ x(t)-189.78\times e^{0.0025(t-T)}\geq 0,\\ -\hat{R}^{mv}(t)\Big{(}x(t)-189.78\times e^{0.0025(t-T)}\Big{)}\ \ \text{if}\ \ x(t)-189.78\times e^{0.0025(t-T)}<0.\end{cases} \]  
where \(\hat{R}^{mv}(t)\) and \(\hat{R}^{mv}(t)\) are plotted in Figure 1 for \(t\in[0,T]\). We used the buy-and-hold portfolio policy as a benchmark; i.e., we treated the total \(T=12\) month as the one-period static MV portfolio selection model. All the constraints and parameters were set to be same as our dynamic MV portfolio selection model \((\mathcal{P}_{\text{MV}})\). Solving the problem provided us the buy-and-hold portfolio policy. Figure 2 plots the realizations of the wealth processes generated by our model \((\mathcal{P}_{\text{MV}})\) and the static benchmark for the identical sample path of the price process. Figure 2 shows that our model performed better than the static benchmark model. To compare the performances of these two models, we plotted the mean-variance efficient frontier of the terminal wealth \(x(T)\) for two models in Figure 3. The efficient frontier describes the Parato optimal set of the mean and standard deviation of the wealth. In this example, the efficient frontier was plotted in the following way.