3.1. Portfolio Optimization with SSD Constraints: PSG Code
This section is intended for readers interested in the practical implementation of portfolio optimization with SSD constraints. The Introduction referred to many efficient implementations of portfolio optimization problems with SSD constraints. However, these implementations are described in research papers, and they are not readily available for portfolio optimization practitioners. The optimization problem (5) can be directly solved with PSG software without additional coding. PSG is free for academic purposes. We posted at this link [
22] several instances of solved problems (codes, data and solutions) in PSG Run-File (text) format and in PSG MATLAB (MathWorks, Natick, MA, USA) format. Below is the code for Problem (5) in PSG Run-File (text) format:
Maximize
avg_g(matrix_sde)
Constraint: =1
Linear(matrix_budget)
MultiConstraint: ≤vector_ubound_sd
pm_pen(vector_benchmark_sd, matrix_sde)
Box: ≥0, ≤1
Matrix “matrix_sde” contains a set of scenarios for instruments of the portfolio. The function “avg_g (matrix_sde)” calculates the average return of the portfolio defined by the matrix of scenarios. Linear function “linear (matrix_budget)” is used in the budget constraint; it is defined by the coefficients in the matrix “matrix_budget”. SSD constraints are defined by the partial moment function “pm_pen (vector_benchmark_sd, matrix_sde)”, which depends on the “vector_benchmark_sd” containing the components of the vector,
and the matrix of scenarios “matrix_sde” for instruments. The vector “vector_ubound_sd” contains values
. The PSG code does not have cycles; basically, it is presenting the problem (5) in analytic format with precoded functions. The website link [
22] also contains data for the PSG MATLAB Toolbox for solving Problem (5) with data imported from PSG text format. Furthermore, the MATLAB subroutine for Problem (5) was automatically generated from the PSG MATLAB Toolbox. A reader can solve Problem (5) by using the PSG MATLAB subroutine without learning the PSG capabilities. This MATLAB subroutine was used in cycles in the out-of-sample simulations described in the following section.
Further, we discuss several numerical runs posted at the link [
22]. The problems were solved with a PC with 3.14 GHz.
PROBLEM_1 describes three instances of portfolio optimization problems considered in the following section. We found portfolios of stocks, which SSD dominate, the DAX, Dow Jones and S&P 100 indices. The instances have 3046, 3020 and 3020 scenarios (daily returns) and 26, 29 and 90 variables (stocks from the indices included in the optimization), accordingly. The solution times are 0.27, 0.05 and 0.21 s, accordingly. The PSG automatic procedure for removing redundant constraints removed 8, 0 and 2 constraints in the three instances, accordingly.
PROBLEM_2 describes a dataset with 30,000 scenarios considered in Fabian et al. [
18]. This dataset contains many repeated (coinciding) nonlinear constraints. The PSG MultiConstraint setting in the problem statement does automatic preprocessing and removes redundant and repeated constraints. The initial number of constraints (corresponding to the number of scenarios) is 30,000; the automatic PSG preprocessing of constraints reduces this number to 972. The solution time is 1.41 s.
PROBLEM_3 describes the same dataset as PROBLEM_2 with 30,000 scenarios, but all SSD constraints are manually specified in the list. The list includes only 972 constraints, because we manually removed repeated constraints. The solution time is 1.40 s.
PSG is free for academic purposes. The PSG solution times for similar dimensions are comparable with the solution times of specialized algorithms described in Dentcheva and Ruszczynski [
12,
14], Dentcheva and Ruszczynski [
16], Rudolf and Ruszczynski [
13], Roman et al. [
17] and Fabian et al. [
18,
19]. The advantage of the described problems and PSG codes is that the numerical runs can be easily verified with the data posted at the link [
22]. Similar problems can be solved by replacing data in the matrices included in the PSG code. Since PSG codes are specified in analytic format, it is possible to modify the codes without significant effort. For instance, additional constraints, such as “cardinality”, can be included in the problem statement to limit the number of securities in an optimal portfolio.
3.2. Mean-Variance Portfolios versus Portfolios with SSD Constraints
This section calculates mean-variance optimal portfolios and optimal portfolio with SSD constraints specified by (5) for datasets of stocks from the Dow Jones, S&P 100 and DAX indices.
The first dataset includes stocks from the Dow Jones Index (DJI), and the DJ Index is considered as a benchmark. Similar, the second and third datasets include stocks from the S&P 100 and DAX indices, and the S&P 100 and DAX indices were used as a benchmark, respectively. The data were downloaded from Yahoo! Finance [
23] and include 3020, 3020 and 3046 historical daily returns of stocks from 1 January 2004 to 31 December 2015 for the DJ, S&P 100 and DAX indices respectively. The lists of stocks in the indices are taken on 31 December 2015. Therefore, we considered only 29 stocks from the DJ Index, 90 stocks from the S&P 100 Index and 26 stocks from the DAX Index (
Appendix B contains the list of the stocks selected for this paper). The stock returns on a daily basis,
, were calculated using the logarithm of the ratio of the stock adjusted closing prices,
,
We adjusted for splits the stocks prices of four companies from the DAX Index
2. We considered daily returns as equally probable scenarios. We calculated SSD-based portfolios described in (5), equally weighted, minimum variance and mean-variance portfolios with the constant and time-varying covariance matrices. Shorting is not allowed, and the sum of portfolio weights is equal to one,
Here is a brief description of the portfolios:
- i.
Equally Weighted (EW)
All stocks in the portfolio are equally weighted. Every stock has the same weight , where is the number of stocks in the portfolio.
- ii.
Minimum Variance (MinVar)
The minimum variance portfolio has minimum variance without any constraint on portfolio return. Shorting is not allowed, and the sum of the portfolio weights is equal to one.
- iii.
Mean-Variance (Mean-Var)
The mean-variance portfolio [
1] uses the mean return and the variance of the stock returns. We considered Mean-Var problems having variance in the objective function and the expected portfolio return of 8% per year in the constraint. Shorting is not allowed, and the sum of the portfolio weights is equal to one. We imposed a 0.2 upper bound constraint on the positions.
The numerical code was implemented with MATLAB R2012b [
24]. We have used the PSG riskprog subroutine for MATLAB environment to solve MinVar and mean-variance portfolio problems. The calculations were performed on a notebook having a 2.5-GHz CPU and 8 GByte of RAM.
Table 1 shows the expected yearly returns of the portfolios for the considered approaches.
The SSD dominating portfolios can be used for actual investments. At least in the past, these portfolios SSD dominated the corresponding indices. Moreover, the expected yearly return of the portfolio SSD dominating the DJ index equals 0.08762 and significantly exceeds the DJ index return in this period. Similar observations are valid for the portfolio of S&P 100 and DAX indices; the expected yearly returns of portfolio SSD dominating the benchmarks equal 0.24250 and 0.17922, respectively.
We compared solving times of SSD constrained optimization (using the PSG subroutine) with the MinVar and Mean-Var approaches (using the PSG riskprog subroutine). Data loading and solving times are given in
Table 2; all problems are solved almost instantaneously.
3.3. Out-Of-Sample Simulations
We have evaluated the out-of-sample performance of several variants of mean-variance portfolios and SSD constrained portfolios. We considered a time series framework where the estimation period (750 and 1000 days) is rolled over time. Portfolios are re-optimized on every first business day of the month using the recent historical daily returns (750 or 1000). We kept constant positions during the month. We set a 9% per year return constraint in Mean-Var problem. If the expected return 9% per year is not feasible (in the beginning of the month), then we set a 6% expected return constraint, and if we still do not have feasibility, we reduce the expected return to 3% and then to 0%.
The classical mean-variance model considers the constant covariance matrix. For the out-of-sample simulations, we also considered the time-dependent covariance matrix using the Constant and Dynamic Conditional Correlation GARCH (CCC and DCC) models in the MinVar and Mean-Var approaches. Further, we briefly describe the estimation procedure for the time-dependent covariance matrices.
We considered constant and dynamic conditional correlation GARCH models for estimation of large time-dependent covariance matrices [
25,
26,
27,
28]. We estimated the time-dependent covariance matrix using
with a simple GARCH(1,1) model. The CCC-GARCH model assumes that correlations are constant,
, and that covariances may change over time, and the time-dependent covariance matrix
is extracted from this model, where
. The DCC-GARCH model assumes that correlations may change over time, and time-dependent covariance matrix
is extracted from the model, where
. Here,
is the diagonal matrix from a univariate GARCH model, and
is the time-dependent correlation matrix [
29]. This paper assumes the simplest conditional mean return equation where
is the sample mean, and the deviation of returns
is conditionally normal with zero mean and time-dependent covariance matrix
[
30]. We used
in MinVar and Mean-Var problems. For the estimation of the time-dependent covariance matrix, we used the MFE Toolbox
3 [
31]. The difficulty in the estimation of the covariance matrices with the DCC model is that the time-dependent conditional correlation matrix has to be positive definite for all time moments. We observe that with small in-sample time intervals (such as 250 days), the variance-covariance matrix may not be positive definite. Therefore, we have used 750 and 1000 days as the in-sample periods.
The out-of-sample performances of portfolios are represented in
Table 3,
Table 4,
Table 5,
Table 6,
Table 7 and
Table 8. The tables include yearly compounded portfolio returns for the years 2007–2015, the Total compounded Return (T_R) and the Sharpe Ratio (Sh_R).
In
Table 3 (DJ stocks, t = 750), the SSD constrained portfolio has the highest T_R (1.3961) and Sh_R (0.5761) higher than all considered portfolios, except DCC Mean-Var and CCC Mean-Var.
In
Table 4 (DJ stocks, t = 1000), the SSD constrained portfolio has the highest T_R (1.5317) and Sh_R (0.9008).
In
Table 5 (S&P 100 stocks, t = 750), the SSD constrained portfolio has the highest T_R (3.0027) and Sh_R (0.9157).
In
Table 6 (S&P 100 stocks, t = 1000), the SSD constrained portfolio has the highest T_R (1.9756) and Sh_R (0.7110).
In
Table 7 (DAX stocks, t = 750), the SSD constrained portfolio has T_R (1.9364) higher than all considered portfolios, except CCC MinVar, and Sh_R (0.5164) higher than all considered portfolios, except CCC MinVar and DCC MinVar.
In
Table 8 (DAX stocks, t = 1000), the SSD constrained portfolio has T_R (1.4897) and Sh_R (0.39520) higher than all considered portfolios, except MinVar, CCC MinVar and DCC MinVar.
Appendix A shows the weights of SSD constrained portfolios at the last month of the out-of-sample period and portfolio weights with all in-sample data.
Appendix B shows company codes and names for the Dow Jones, SP500 and DAX indices.