12#' classic risk reward scatter3#'4#' This function charts the \code{optimize.portfolio} object in risk-return space.5#'6#' @details7#' \code{neighbors} may be specified in three ways.8#' The first is as a single number of neighbors. This will extract the \code{neighbors} closest9#' portfolios in terms of the \code{out} numerical statistic.10#' The second method consists of a numeric vector for \code{neighbors}.11#' This will extract the \code{neighbors} with portfolio index numbers that correspond to the vector contents.12#' The third method for specifying \code{neighbors} is to pass in a matrix.13#' This matrix should look like the output of \code{\link{extractStats}}, and should contain14#' \code{risk.col},\code{return.col}, and weights columns all properly named.15#'16#' @param object optimal portfolio created by \code{\link{optimize.portfolio}}.17#' @param neighbors set of 'neighbor' portfolios to overplot, see Details.18#' @param \dots any other passthru parameters.19#' @param return.col string matching the objective of a 'return' objective, on vertical axis.20#' @param risk.col string matching the objective of a 'risk' objective, on horizontal axis.21#' @param chart.assets TRUE/FALSE. Includes a risk reward scatter of the assets in the chart.22#' @param element.color color for the default plot scatter points.23#' @param cex.axis The magnification to be used for axis annotation relative to the current setting of \code{cex}.24#' @param xlim set the x-axis limit, same as in \code{\link{plot}}.25#' @param ylim set the y-axis limit, same as in \code{\link{plot}}.26#' @param rp TRUE/FALSE to generate random portfolios to plot the feasible space27#' @param main a main title for the plot.28#' @param labels.assets TRUE/FALSE to include the names in the plot.29#' @param pch.assets plotting character of the assets, same as in \code{\link{plot}}30#' @param cex.assets numerical value giving the amount by which the asset points should be magnified relative to the default.31#' @param cex.lab numerical value giving the amount by which the labels should be magnified relative to the default.32#' @param colorset color palette or vector of colors to use.33#' @seealso \code{\link{optimize.portfolio}}34#' @export35chart.RiskReward <- function(object, ...){36UseMethod("chart.RiskReward")37}383940###############################################################################41# R (https://r-project.org/) Numeric Methods for Optimization of Portfolios42#43# Copyright (c) 2004-2021 Brian G. Peterson, Peter Carl, Ross Bennett, Kris Boudt44#45# This library is distributed under the terms of the GNU Public License (GPL)46# for full details see the file COPYING47#48# $Id$49#50###############################################################################515253