Description Usage Arguments Value Examples
Calculates the weights of an optimal unbiased Markowitz portfolio strategy.
1 | port_estim_markowitz_unb(Sigma, mu, rf = 0, gamma = 2, size_sample)
|
Sigma |
a pxp covariance matrix of asset returns. |
mu |
a vector, the expected returns. |
rf |
a double, the assumed risk-free return. Default value is 0. |
gamma |
an integer, the risk aversion parameter. Default value is 2. |
size_sample |
an integer, the sample size (number of observations) of the returns data. |
a vector of length p with the weights of the portfolio.
1 2 3 4 5 | data(sp500_rets)
example_rets <- sp500_rets[,2:11]
covMat <- var(example_rets)
muVec <- colMeans(example_rets)
port_estim_markowitz_unb(covMat, muVec, size_sample=dim(example_rets)[1])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.