wGMV {DOSPortfolio} | R Documentation |
The functions computes the sample estimate of the weights of the global minimum variance portfolio (see, e.g., Eq. (1.4) of Bodnar et al. (2021))).
wGMV(data)
data |
an n by p matrix of asset returns. Columns represent different assets rows are observations, where n>p, containing, for instance, log-returns. |
a vector, which is the Global Minimum Variance Portfolio.
n <- 200
p <- 80
data <- 3/5 * matrix(rt(n*p, df=5), ncol=p, nrow=n)
weights <- wGMV(data)
# since the covariance matrix is the identity-matrix the estimated weights
# should be close to the equally weighted portfolio.
mean(abs(wGMV(data) - 1/p))