Learn R Programming

HDShOP (version 0.1.5)

MVShrinkPortfolio: Shrinkage mean-variance portfolio

Description

The main function for mean-variance (also known as expected utility) portfolio construction. It is a dispatcher using methods according to argument type, values of gamma and dimensionality of matrix x.

Usage

MVShrinkPortfolio(x, gamma, type = c("shrinkage", "traditional"), ...)

Value

A portfolio in the form of an object of class MeanVar_portfolio potentially with a subclass. See Class_MeanVar_portfolio for the details of the class.

Arguments

x

a p by n matrix or a data frame of asset returns. Rows represent different assets, columns -- observations.

gamma

a numeric variable. Coefficient of risk aversion.

type

a character. The type of methods to use to construct the portfolio.

...

arguments to pass to portfolio constructors

Details

The sample estimator of the mean-variance portfolio weights, which results in a traditional mean-variance portfolio, is calculated by $$\hat w_{MV} = \frac{S^{-1} 1}{1' S^{-1} 1} + \gamma^{-1} \hat Q \bar x,$$ where \(S^{-1}\) and \(\bar x\) are the inverse of the sample covariance matrix and the sample mean vector of asset returns respectively, \(\gamma\) is the coefficient of risk aversion and \(\hat Q\) is given by $$\hat Q = S^{-1} - \frac{S^{-1} 1 1' S^{-1}}{1' S^{-1} 1} .$$ In the case when \(p>n\), \(S^{-1}\) becomes \(S^{+}\)- Moore-Penrose inverse. The shrinkage estimator for the mean-variance portfolio weights in a high-dimensional setting is given by $$\hat w_{ShMV} = \hat \alpha \hat w_{MV} + (1- \hat \alpha)b,$$ where \(\hat \alpha\) is the estimated shrinkage intensity and \(b\) is a target vector with the sum of the elements equal to one.

In the case \(\gamma \neq \infty\), \(\hat{\alpha}\) is computed following Eq. (2.22) of BOP16;textualHDShOP for c<1 and following Eq. (2.29) of BOP16;textualHDShOP for c>1.

The case of a fully risk averse investor (\(\gamma=\infty\)) leads to the traditional global minimum variance (GMV) portfolio with the weights given by $$\hat w_{GMV} = \frac{S^{-1} 1}{1' S^{-1} 1} .$$ The shrinkage estimator for the GMV portfolio is then calculated by $$\hat w_{ShGMV} = \hat\alpha \hat w_{GMV} + (1-\hat \alpha)b,$$ with \(\hat{\alpha}\) given in Eq. (2.31) of BPS2018;textualHDShOP for c<1 and in Eq. (2.33) of BPS2018;textualHDShOP for c>1.

These estimation methods are available as separate functions employed by MVShrinkPortfolio accordingly to the following parameter configurations:

FunctionPaperTypegammap/n
new_MV_portfolio_weights_BDOPS21BOP16;textualHDShOPshrinkage< Inf<1
new_MV_portfolio_weights_BDOPS21_pgnBOP16;textualHDShOPshrinkage< Inf>1
new_GMV_portfolio_weights_BDPS19BPS2018;textualHDShOPshrinkageInf<1
new_GMV_portfolio_weights_BDPS19_pgnBPS2018;textualHDShOPshrinkageInf>1
new_MV_portfolio_traditionaltraditional> 0<1
new_MV_portfolio_traditional_pgntraditional> 0>1

References

Examples

Run this code
n<-3e2 # number of realizations
gamma<-1

# The case pn

p<-1.2*n # Re-define the number of assets
b<-rep(1/p,p)

x <- matrix(data = rnorm(n*p), nrow = p, ncol = n)

test <- MVShrinkPortfolio(x=x, gamma=gamma, type='shrinkage',
                          b=b, beta = 0.05)
str(test)

test <- MVShrinkPortfolio(x=x, gamma=Inf, type='shrinkage',
                          b=b, beta = 0.05)
str(test)

Run the code above in your browser using DataLab