The Sharpe Ratio is a risk-adjusted measure of return that uses standard deviation to represent risk.
Arguments
- R
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns
- Rf
risk free rate, in same period as your returns
- scale
number of periods in a year (daily scale = 252, monthly scale = 12, quarterly scale = 4)
- geometric
utilize geometric chaining (TRUE) or simple/arithmetic chaining (FALSE) to aggregate returns, default FALSE
- ...
any other passthru parameters
Details
The Sharpe ratio is simply the return per unit of risk (represented by variance). The higher the Sharpe ratio, the better the combined performance of "risk" and return.
This function annualizes the number based on the scale parameter.
$$\frac{\sqrt[n]{prod(1+R_{a})^{scale}}-1}{\sqrt{scale}\cdot\sqrt{\sigma}}$$
Using an annualized Sharpe Ratio is useful for comparison of multiple return streams. The annualized Sharpe ratio is computed by dividing the annualized mean monthly excess return by the annualized monthly standard deviation of excess return.
William Sharpe now recommends Information Ratio preferentially to the original Sharpe Ratio.
Examples
data(managers)
SharpeRatio.annualized(managers[, 1, drop = FALSE], Rf = .035 / 12)
#> HAM1
#> Annualized Sharpe Ratio (Rf=3.5%, p=95%): 1.109167
SharpeRatio.annualized(managers[, 1, drop = FALSE], Rf = managers[, 10, drop = FALSE])
#> HAM1
#> Annualized Sharpe Ratio (Rf=3.9%, p=95%): 1.067993
SharpeRatio.annualized(managers[, 1:6], Rf = .035 / 12)
#> HAM1 HAM2 HAM3 HAM4
#> Annualized Sharpe Ratio (Rf=3.5%, p=95%): 1.109167 1.059201 0.9041795 0.5274492
#> HAM5 HAM6
#> Annualized Sharpe Ratio (Rf=3.5%, p=95%): 0.0887506 1.183872
SharpeRatio.annualized(managers[, 1:6], Rf = managers[, 10, drop = FALSE])
#> HAM1 HAM2 HAM3 HAM4
#> Annualized Sharpe Ratio (Rf=3.9%, p=95%): 1.067993 1.041776 0.8809761 0.5063429
#> HAM5 HAM6
#> Annualized Sharpe Ratio (Rf=3.9%, p=95%): 0.1226791 1.313233
SharpeRatio.annualized(managers[, 1:6], Rf = managers[, 10, drop = FALSE], geometric = FALSE)
#> HAM1 HAM2 HAM3 HAM4
#> Annualized Sharpe Ratio (Rf=3.9%, p=95%): 1.067993 1.041776 0.8809761 0.5063429
#> HAM5 HAM6
#> Annualized Sharpe Ratio (Rf=3.9%, p=95%): 0.1226791 1.313233