\HeaderA{chart.RiskReturnScatter}{scatter chart of returns vs risk for comparing multiple instruments}{chart.RiskReturnScatter}
\keyword{ts}{chart.RiskReturnScatter}
\keyword{multivariate}{chart.RiskReturnScatter}
\keyword{distribution}{chart.RiskReturnScatter}
\keyword{models}{chart.RiskReturnScatter}
\keyword{hplot}{chart.RiskReturnScatter}
\begin{Description}\relax
A wrapper to create a scatter chart of annualized returns versus annualized risk (standard deviation) for comparing manager performance. Also puts a box plot into the margins to help identify the relative performance quartile.
\end{Description}
\begin{Usage}
\begin{verbatim}
chart.RiskReturnScatter(R, Rf = 0, main = "Annualized Return and Risk", add.names = TRUE, xlab = "Annualized Risk", ylab = "Annualized Return", method = "calc", geometric = TRUE, scale = NA, add.sharpe = c(1, 2, 3), add.boxplots = FALSE, colorset = 1, symbolset = 1, element.color = "darkgray", legend.loc = NULL, xlim = NULL, ylim = NULL, cex.legend = 1, cex.axis = 0.8, cex.main = 1, cex.lab = 1, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{R}] an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns 
\item[\code{Rf}] risk free rate, in same period as your returns 
\item[\code{scale}] number of periods in a year (daily scale = 252, monthly scale = 12, quarterly scale = 4) 
\item[\code{geometric}] generate geometric (TRUE) or simple (FALSE) returns, default TRUE 
\item[\code{main}] set the chart title, same as in \code{plot} 
\item[\code{add.names}] plots the row name with the data point.  default TRUE. Can be removed by setting it to NULL 
\item[\code{xlab}] set the x-axis label, as in \code{\LinkA{plot}{plot}} 
\item[\code{ylab}] set the y-axis label, as in \code{\LinkA{plot}{plot}} 
\item[\code{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 method cases may be set for different risk/return calculations.  
\item[\code{add.sharpe}] this draws a Sharpe ratio line that indicates Sharpe ratio levels of \code{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., sharpe.ratio = NULL). 
\item[\code{add.boxplots}] TRUE/FALSE adds a boxplot summary of the data on the axis 
\item[\code{colorset}] color palette to use, set by default to rational choices 
\item[\code{symbolset}] from \code{pch} in \code{\LinkA{plot}{plot}},  submit a set of symbols to be used in the same order as the data sets submitted 
\item[\code{element.color}] provides the color for drawing chart elements, such as the box lines, axis lines, etc. Default is "darkgray" 
\item[\code{legend.loc}] places a legend into one of nine locations on the chart: bottomright, bottom, bottomleft, left, topleft, top, topright, right, or center. 
\item[\code{xlim}] set the x-axis limit, same as in \code{\LinkA{plot}{plot}} 
\item[\code{ylim}] set the y-axis limit, same as in \code{\LinkA{plot}{plot}} 
\item[\code{cex.axis}] The magnification to be used for axis annotation relative to the current setting of 'cex', same as in \code{\LinkA{plot}{plot}}.  
\item[\code{cex.legend}] The magnification to be used for sizing the legend relative to the current setting of 'cex'.  
\item[\code{cex.main}] The magnification to be used for sizing the title relative to the current setting of 'cex'.  
\item[\code{cex.lab}] The magnification to be used for x and y labels relative to the current setting of 'cex'.  
\item[\code{...}] any other passthru parameters to \code{plot} 
\end{ldescription}
\end{Arguments}
\begin{Value}
scatter chart with Return on one axis and some Risk measure on the other axis
\end{Value}
\begin{Note}\relax
Code inspired by a chart on:
\url{http://zoonek2.free.fr/UNIX/48_R/03.html}
\end{Note}
\begin{Author}\relax
Peter Carl
\end{Author}
\begin{Examples}
\begin{ExampleCode}
data(edhec)
chart.RiskReturnScatter(edhec, Rf = .04/12)
chart.RiskReturnScatter(edhec, Rf = .04/12, add.boxplots = TRUE)
\end{ExampleCode}
\end{Examples}

