an xts, vector, matrix, data frame, timeSeries or zoo object of
portfolio returns
Rb
an xts, vector, matrix, data frame, timeSeries or zoo object of
benchmark returns
scale
number of periods in a year (daily scale = 252, monthly scale =
12, quarterly scale = 4)
geometric
generate geometric (TRUE) or simple (FALSE) excess returns,
default TRUE
Details
Annualized returns are useful for comparing two assets. To do so, you must
scale your observations to an annual scale by raising the compound return to
the number of periods in a year, and taking the root to the number of total
observations:
$$prod(1+R_{a})^{\frac{scale}{n}}-1=\sqrt[n]{prod(1+R_{a})^{scale}}-
1$$
where scale is the number of periods in a year, and n is the total number of
periods for which you have observations.
Finally having annualized returns for portfolio and benchmark we can compute
annualized excess return as difference in the annualized portfolio and
benchmark returns in the arithmetic case:
$$er = R_{pa} - R_{ba}$$
and as a geometric difference in the geometric case:
$$er = \frac{(1 + R_{pa})}{(1 + R_{ba})} - 1$$
References
Bacon, Carl. Practical Portfolio Performance Measurement
and Attribution. Wiley. 2004. p. 206-207