Learn R Programming

HDShOP (version 0.1.5)

new_MV_portfolio_traditional: Traditional mean-variance portfolio

Description

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.

Usage

new_MV_portfolio_traditional(x, gamma)

new_MV_portfolio_traditional_pgn(x, gamma)

Value

an object of class MeanVar_portfolio

ElementDescription
callthe function call with which it was created
cov_mtrxthe sample covariance matrix of asset returns
inv_cov_mtrxthe inverse of the sample covariance matrix
meanssample mean estimator of the asset returns
W_mv_hatsample estimator of portfolio weights
Port_Varportfolio variance
Port_mean_returnexpected portfolio return
Sharpeportfolio Sharpe ratio

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab