\HeaderA{CalmarRatio}{calculate a Calmar or Sterling reward/risk ratio}{CalmarRatio}
\aliasA{SterlingRatio}{CalmarRatio}{SterlingRatio}
\keyword{ts}{CalmarRatio}
\keyword{multivariate}{CalmarRatio}
\keyword{distribution}{CalmarRatio}
\keyword{models}{CalmarRatio}
\begin{Description}\relax
Calmar and Sterling Ratios are yet another method of creating a risk-adjusted measure for ranking investments similar to the \code{\LinkA{SharpeRatio}{SharpeRatio}}.
\end{Description}
\begin{Usage}
\begin{verbatim}
   CalmarRatio(R, scale = NA)
   SterlingRatio(R, scale = NA, excess=.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{scale}] number of periods in a year (daily scale = 252, monthly scale = 12, quarterly scale = 4) 
\item[\code{excess}] for Sterling Ratio, excess amount to add to the max drawdown, traditionally and default .1 (10\%)
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Both the Calmar and the Sterling ratio are the ratio of annualized return over the absolute value of the maximum drawdown of an investment. The Sterling ratio adds an excess risk measure to the maximum drawdown, traditionally and defaulting to 10\%.

It is also traditional to use a three year return series for these calculations, although the functions included here make no effort to determine the length of your series.  If you want to use a subset of your series, you'll need to truncate or subset the input data to the desired length.

Many other measures have been proposed to do similar reward to risk ranking. It is the opinion of this author that newer measures such as Sortino's \code{\LinkA{UpsidePotentialRatio}{UpsidePotentialRatio}} or Favre's \code{\LinkA{SharpeRatio.modified}{SharpeRatio.modified}} are both \dQuote{better} measures, and should be preferred to the Calmar or Sterling Ratio.
\end{Details}
\begin{Value}
Calmar or Sterling Reward/Risk Ratio
\end{Value}
\begin{Author}\relax
Brian G. Peterson
\end{Author}
\begin{References}\relax
Bacon, Carl. \emph{Practical Portfolio Performance Measurement and Attribution}. Wiley. 2004.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{Return.annualized}{Return.annualized}},  \\
\code{\LinkA{maxDrawdown}{maxDrawdown}}, \\
\code{\LinkA{SharpeRatio.modified}{SharpeRatio.modified}}, \\
\code{\LinkA{UpsidePotentialRatio}{UpsidePotentialRatio}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
    data(managers)
    CalmarRatio(managers[,1,drop=FALSE])
    CalmarRatio(managers[,1:6]) 
    SterlingRatio(managers[,1,drop=FALSE])
    SterlingRatio(managers[,1:6])
\end{ExampleCode}
\end{Examples}

