port_estim_efficient: Estimation of the Efficient Frontier

Description Usage Arguments Value Examples

View source: R/port-optim.R

Description

Calculates the weights and the standard deviations along the Efficient Frontier.

Usage

1
port_estim_efficient(Sigma, mu, mugrid, res_all = FALSE)

Arguments

Sigma

a pxp covariance matrix of asset returns.

mu

a vector, the expected returns.

mugrid

a vector with length m as the grid of expected returns, along which the capital market line is to be estimated.

res_all

a logical. If TRUE, the result includes the calculated weights and the standard deviations for the CML. If FALSE, only the weights. Default value is FALSE.

Value

a pxm matrix with the weights of the CML portfolio along mugrid.

a vector of length m with the corresponding standard deviations.

Examples

1
2
3
4
5
6
data(sp500_rets)
example_rets <- sp500_rets[,2:11]
covMat <- var(example_rets)
muVec <- colMeans(example_rets)
mugrid <- seq(0, 0.2, by=0.001)
results <- port_estim_efficient(covMat, muVec, mugrid, res_all=FALSE)

antshi/auxPort documentation built on Oct. 27, 2020, 1:16 p.m.