Learn R Programming

PortfolioAnalytics (version 2.1.0)

meanrisk.efficient.frontier: Generate multiple efficient frontiers for the same portfolio

Description

This function generates the mean-risk efficient frontier of a portfolio specifying the constraints and objectives. The risk_type object is for the basic mean-risk efficient frontier, other efficient frontiers will be generated with the same target returns. All mean-StdDev, mean-ES and mean-CSM efficient frontiers will be generated.

Usage

meanrisk.efficient.frontier(
  portfolio,
  R,
  optimize_method = "CVXR",
  n.portfolios = 25,
  risk_type = "StdDev",
  compare_port = c("StdDev", "ES"),
  ...
)

Value

a matrix of objective measure values and weights along the efficient frontier

Arguments

portfolio

a portfolio object with constraints and objectives created via portfolio.spec

R

an xts or matrix of asset returns

optimize_method

the optimize method to get the efficient frontier, default is CVXR

n.portfolios

number of portfolios to generate the efficient frontier

risk_type

one of "StdDev", "ES" and "CSM", which determines the type of basic efficient frontier.

compare_port

vector composed of any risk "StdDev", "ES", "CSM", for example, compare_port=c("StdDev", "ES")

...

passthru parameters to optimize.portfolio

Author

Xinran Zhao