View source: R/S3_tradit_portfol.R
new_MV_portfolio_traditional | R Documentation |
Mean-variance portfolios with the traditional (sample) estimators for the mean
vector and the covariance matrix of asset returns. For more details of the method,
see MVShrinkPortfolio
. new_MV_portfolio_traditional is for the
case p<n, while new_MV_portfolio_traditional_pgn is for p>n, where p is the
number of assets and n is the number of observations.
new_MV_portfolio_traditional(x, gamma) new_MV_portfolio_traditional_pgn(x, gamma)
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. |
an object of class MeanVar_portfolio
Element | Description |
call | the function call with which it was created |
cov_mtrx | the sample covariance matrix of asset returns |
inv_cov_mtrx | the inverse of the sample covariance matrix |
means | sample mean estimator of the asset returns |
W_mv_hat | sample estimator of portfolio weights |
Port_Var | portfolio variance |
Port_mean_return | expected portfolio return |
Sharpe | portfolio Sharpe ratio |
n<-3e2 # number of realizations p<-.5*n # number of assets gamma<-1 x <- matrix(data = rnorm(n*p), nrow = p, ncol = n) test <- new_MV_portfolio_traditional(x=x, gamma=gamma) str(test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.