Description Usage Arguments Note Examples
View source: R/QuantAnalysis.R
Sharpe Ratio
1 | sharpe_ratio(ret, rf, freq)
|
ret |
data.frame containing returns |
rf |
either numeric value representing annual risk-free rate or data.frame containing risk-free time-series |
freq |
character representing frequency |
Sharpe ratio = (annualized return less annual risk-free rate) / annualized volatility
1 2 3 4 | data(ETF)
data(FF)
sharpe_ratio(ret, ff$ff_ret, 'd')
sharpe_ratio(ret, 0.02, 'd')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.