MVShrinkPortfolio {HDShOP} | R Documentation |
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"), ...)
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
where and
are the inverse of the sample covariance
matrix and the sample mean vector of asset returns respectively,
is the coefficient of risk aversion and
is given by
In the case when ,
becomes
- Moore-Penrose
inverse. The shrinkage estimator for the mean-variance portfolio weights in
a high-dimensional setting is given by
where is the estimated shrinkage intensity and
is
a target vector with the sum of the elements equal to one.
In the case ,
is computed following
Eq. (2.22) of Bodnar et al. (2023) for c<1 and following
Eq. (2.29) of Bodnar et al. (2023) for c>1.
The case of a fully risk averse investor () leads to the
traditional global minimum variance (GMV) portfolio with the weights given by
The shrinkage estimator for the GMV portfolio is then calculated by
with given in
Eq. (2.31) of Bodnar et al. (2018) for c<1 and in
Eq. (2.33) of Bodnar et al. (2018) for c>1.
These estimation methods are available as separate functions employed by MVShrinkPortfolio accordingly to the following parameter configurations:
Function | Paper | Type | gamma | p/n |
new_MV_portfolio_weights_BDOPS21 | Bodnar et al. (2023) | shrinkage | < Inf | <1 |
new_MV_portfolio_weights_BDOPS21_pgn | Bodnar et al. (2023) | shrinkage | < Inf | >1 |
new_GMV_portfolio_weights_BDPS19 | Bodnar et al. (2018) | shrinkage | Inf | <1 |
new_GMV_portfolio_weights_BDPS19_pgn | Bodnar et al. (2018) | shrinkage | Inf | >1 |
new_MV_portfolio_traditional | traditional | > 0 | <1 | |
new_MV_portfolio_traditional_pgn | traditional | > 0 | >1 | |
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.
References
Bodnar T, Okhrin Y, Parolya N (2023).
“Optimal shrinkage-based portfolio selection in high dimensions.”
Journal of Business & Economic Statistics, 41, 140-156.
Bodnar T, Parolya N, Schmid W (2018).
“Estimation of the global minimum variance portfolio in high dimensions.”
European Journal of Operational Research, 266(1), 371–390.
Examples
n<-3e2 # number of realizations
gamma<-1
# The case p<n
p<-.5*n # 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)
test <- MVShrinkPortfolio(x=x, gamma=gamma, type='traditional')
str(test)
# The case p>n
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)