\HeaderA{Return.excess}{Calculates the returns of an asset in excess of the given risk free rate}{Return.excess}
\keyword{ts}{Return.excess}
\keyword{multivariate}{Return.excess}
\keyword{distribution}{Return.excess}
\keyword{models}{Return.excess}
\begin{Description}\relax
Calculates the returns of an asset in excess of the given "risk free rate" for the period.

Ideally, your risk free rate will be for each period you have returns observations, but a single average return for the period will work too.
\end{Description}
\begin{Usage}
\begin{verbatim}
Return.excess(R, Rf=0)
\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, or as a sinlge digit average 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Mean of the period return minus the period risk free rate

\deqn{\overline{(R_{a}-R_{f})}}{}

OR

mean of the period returns minus a single numeric risk free rate

\deqn{\overline{R_{a}}-R_{f}}{}

Note that while we have, in keeping with common academic usage, assumed that the second parameter will be a risk free rate, you may also use any other timeseries as the second argument.  A common alteration would be to use a benchmark to produce excess returns over a specific benchmark, as demonstrated in the examples below.
\end{Details}
\begin{Value}
mean excess return
\end{Value}
\begin{Author}\relax
Peter Carl
\end{Author}
\begin{References}\relax
Bacon, Carl. \emph{Practical Portfolio Performance Measurement and Attribution}. Wiley. 2004. p. 47-52
\end{References}
\begin{Examples}
\begin{ExampleCode}
data(managers)
head(Return.excess(managers[,1,drop=FALSE], managers[,10,drop=FALSE]))
head(Return.excess(managers[,1,drop=FALSE], .04/12))
head(Return.excess(managers[,1:6], managers[,10,drop=FALSE]))
head(Return.excess(managers[,1,drop=FALSE], managers[,8,drop=FALSE]))
\end{ExampleCode}
\end{Examples}

