diff --git a/R/charts.efficient.frontier.R b/R/charts.efficient.frontier.R index dd8acca..021e692 100644 --- a/R/charts.efficient.frontier.R +++ b/R/charts.efficient.frontier.R @@ -842,8 +842,8 @@ chart.EfficientFrontierCompare <- function(R, portfolio, risk_type, n.portfolios text(out$frontier[1,m.p], out$frontier[1,2], labels = paste("(", round(out$frontier[1,m.p], 4), ",", round(out$frontier[1,2], 4), ")"), pos = 4, cex = cex.assets) text(out$frontier[which(x_diff == x_index),1], out$frontier[which(x_diff == x_index),2], labels = paste("(", round(out$frontier[which(x_diff == x_index),1], 4), ",", round(out$frontier[which(x_diff == x_index),2], 4), ")"), pos = 2, cex = cex.assets) } - legend.labels <- append(legend.labels, paste("% Change in Risk =", round((out$frontier[1,m.p] - out$frontier[1,1]) * 100 / out$frontier[1,1], 2))) - legend.labels <- append(legend.labels, paste("% Change in Return =", round((out$frontier[which(x_diff == x_index),2] - out$frontier[1,2]) * 100 / out$frontier[1,2], 2))) + legend.labels <- append(legend.labels, paste("% Decrease in Risk =", round((out$frontier[1,m.p] - out$frontier[1,1]) * 100 / out$frontier[1,1], 2))) + legend.labels <- append(legend.labels, paste("% Increase in Return =", round((out$frontier[which(x_diff == x_index),2] - out$frontier[1,2]) * 100 / out$frontier[1,2], 2))) } legend("bottomright", legend=legend.labels, col=col, lty=lty, lwd=lwd, cex=cex.legend, bty="n") return(invisible(out)) diff --git a/R/extract.efficient.frontier.R b/R/extract.efficient.frontier.R index 18308dc..8955500 100644 --- a/R/extract.efficient.frontier.R +++ b/R/extract.efficient.frontier.R @@ -214,7 +214,7 @@ meanvar.efficient.frontier <- function(portfolio, R, optimize_method='ROI', n.po #' @return a matrix of objective measure values and weights along the efficient frontier #' @author Ross Bennett #' @export -meanetl.efficient.frontier <- function(portfolio, R, optimize_method='ROI', n.portfolios=25, ...){ +meanetl.efficient.frontier <- meanes.efficient.frontier <- function(portfolio, R, optimize_method='ROI', n.portfolios=25, ...){ if(!is.portfolio(portfolio)) stop("portfolio object must be of class 'portfolio'") # step 1: find the minimum return given the constraints # step 2: find the maximum return given the constraints diff --git a/man/optimize.portfolio.Rd b/man/optimize.portfolio.Rd index 77b10b3..ac8e4f0 100644 --- a/man/optimize.portfolio.Rd +++ b/man/optimize.portfolio.Rd @@ -178,8 +178,8 @@ Because these convex optimization problem are standardized, there is no need for The \code{multiplier} argument in \code{\link{add.objective}} passed into the complete constraint object are ignored by the ROI solver. If \code{optimize_method="CVXR"} is specified, a default solver will be selected based on the optimization problem. -The default solver for Linear Problem and Quadratic Programming will be \code{OSQP}, -and the default solver for Second-Order Cone Programming will be \code{SCS}. +The default solver for Quadratic Programming will be \code{OSQP}, +and the default solver for Linear Problem and Second-Order Cone Programming will be \code{SCS}. Specified CVXR solver can be given by using \code{optimize_method=c("CVXR", "CVXRsolver")}. CVXR supports some commercial solvers, including CBC, CPLEX, GUROBI and MOSEK, and some open source solvers, including GLPK, GLPK_MI, OSQP, SCS and ECOS. For example, \code{optimize_method = c("CVXR", "ECOS")} can be specified and the optimization problem will be solved via CVXR using the ECOS solver.