Usage
chart.RiskReturnScatter(R, rf = 0, main = "Annualized Return and Risk", add.names = TRUE, xlab = "Annualized Risk", ylab = "Annualized Return", method = "calc", add.sharpe = c(1,2,3), add.boxplots = FALSE, colorset = 1, symbolset = 1, darken = FALSE , legend.loc = NULL, xlim = NULL, ylim = NULL, cex.legend = 1, cex.axis=0.8, cex.main = 1, cex.lab = 1, ...)
Arguments
R
a vector, matrix, data frame, timeSeries or zoo object of asset returns
rf
risk free rate, in same period as your returns
main
set the chart title, same as in plot
add.names
plots the row name with the data point. default TRUE. Can be removed by setting it to NULL
xlab
set the x-axis label, as in plot
ylab
set the y-axis label, as in plot
method
if set as "calc", then the function will calculate values from the set of returns passed in. If method is set to "nocalc" then we assume that R is a column of return and a column of risk (e.g., annualized returns, annualized risk), in that order. Other
add.sharpe
this draws a Sharpe ratio line that indicates Sharpe ratio levels of c(1,2,3)
. Lines are drawn with a y-intercept of the risk free rate and the slope of the appropriate Sharpe ratio level. Lines should be removed where not appropriate (e.g.
add.boxplots
TRUE/FALSE adds a boxplot summary of the data on the axis
colorset
color palette to use, set by default to rational choices
symbolset
from pch
in plot
, submit a set of symbols to be used in the same order as the data sets submitted darken
if true, draws the chart elements in "darkgray" rather than "gray". Makes it easier to print for some printers.
legend.loc
places a legend into one of nine locations on the chart: bottomright, bottom, bottomleft, left, topleft, top, topright, right, or center.
xlim
set the x-axis limit, same as in plot
ylim
set the y-axis limit, same as in plot
cex.axis
The magnification to be used for axis annotation relative to the current setting of 'cex', same as in plot
. cex.legend
The magnification to be used for sizing the legend relative to the current setting of 'cex'.
cex.main
The magnification to be used for sizing the title relative to the current setting of 'cex'.
cex.lab
The magnification to be used for x and y labels relative to the current setting of 'cex'.
...
any other passthru parameters