When you build your portfolio you must decide what is your risk profile. A pension fund’s risk profile is different than that of a hedge fund, which is different than that of a family office. Everyone’s goal is to maximize returns given the risk. Sinfully but commonly risk is defined as the variability in the portfolio, and so we feed our expected returns and expected risk to some optimization procedure in order to find the optimal portfolio weights. Risk serves as a decision variable. You choose the risk, and (hope to) get the returns.

A new paper from Kris Boudt, Dries Cornilly, Frederiek Van Hollee and Joeri Willems titled Algorithmic Portfolio Tilting to Harvest Higher Moment Gains makes good progress in terms of our definition of risk, and risk-return trade-off. They propose a quantified way in which you can adjust your portfolio to account not only for the variance, but also for higher moments, namely skewness and kurtosis. They do that in two steps. The first is to simply set your portfolio based on whichever approach you follow (e.g. minvol, equal risk contribution or other). In the second step you tilt the portfolio such that the higher moments are brought into focus and get the attention they deserve. This is done by deviating from the original optimization target so that higher moments are utility-improved: less variance, better skew and lower kurtosis.

Since the paper is so clear, and the code is made public^{*} it was very easy to check it out. In their paper they use 12 assets but I use only 3 ETFs here: SPY (S&P), TLT (long term US bonds) and IEF (medium term US bonds). Some code is coming, and directly after there is a chart with the resulting weights of the portfolio for different tilting values. A tilting value (kappa) determines the amount of “attention” you would like to budget for those higher moments.

The following code pulls the data, split the data into in- and out of sample, and solve the optimization for the portfolio weights of the three ETFs.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# packages needed library(quantmod) # Pulling the data k <- 10 # how many years back? end <- format(Sys.Date(),"%Y-%m-%d") start <- format(Sys.Date() - (k*365), "%Y-%m-%d") symetf = c('SPY','TLT', 'IEF') l <- length(symetf) w0 <- NULL for (i in 1:l){ dat0 = getSymbols(symetf[i], src="yahoo", from=start, to=end, auto.assign = F, warnings = FALSE, symbol.lookup = F) w1 <- weeklyReturn(dat0) w0 <- cbind(w0,w1) } time <- as.Date(substr(index(w0),1,10)) w0 <- as.matrix(w0) colnames(w0) <- symetf # Creating in and out of sample t_insample <- NROW(w0)/2 tmpind <- 1:t_insample w0_insample <- w0[tmpind, ] w0_outsample <- w0[-tmpind, ] # Getting estimates for the higher moments w0 <- w0*100 va <- M2.shrink(w0, targets = 1)$M2sh sk <- M3.shrink(w0, targets = 1)$M3sh ku <- M4.shrink(w0, targets = 1)$M4sh # Optimize the portfolio resVSK <- mvskPortfolio(M2 = va, M3 = sk, M4 = ku, w0 = "DR", g = "mvsk", ub = rep(0.6, 3), href = "DR", kappa = c(0, 0.005, 0.015, 0.35), relative = TRUE) |

### The resulting weights of the portfolio for different tilting values

We use, as in the paper, the maximum diversification portfolio (DR) as the reference portfolio. The parameter `kappa`

lets you choose how much you would like to deviate from this reference portfolio. You can see that the more you ask from the higher moments, the more conservative the portfolio will become, with SPY weight decreasing and medium term bonds (IEF) increasing. The larger the allowed deviation from the reference portfolio, the more pronounced the change. The innovation here is that the optimization now accounts not only for the second moment, but for third and fourth also.

It is only a start, so we can’t yet choose which moment we would like to focus on. All three higher moments are “bunched together” in the optimization but maybe something for further research.

Let’s see how the portfolios do in the second, out-of-sample period:

1 2 3 4 5 6 7 8 9 |
library(magrittr) ports <- resVSK$w %*% t(w0_outsample) %>% t dim(ports) cum_ret <- matrix(nrow= NROW(ports), ncol= NCOL(ports) ) for(j in 1:NCOL(ports)) { for( i in 1: NROW(ports) ) { cum_ret[i, j] <- prod( (1 + ports[1:i, j]) ) - 1 } } |

### Out of sample performance of the portfolio for different tilting values

Since the blue line is for `kappa=0`

it means that it is exactly the maximum diversification portfolio. Results are quite intuitive, an improved risk profile, now aided by the higher moments, the lower the overall returns.

So now we have a quantified way to to make an educated trade-off between return and risk, with risk more broadly and intuitively defined. We don’t account for the whole return distribution, but accounting for the first four moments we are almost there.

### Footnotes

* Code for all the functions which are needed is on Dries Cornilly’s github.

* A bit more on the estimation of Higher-Order Comoments in a previous post .

## One comment on “Portfolio Construction Tilting towards Higher Moments”