RiskIndicators | R Documentation |
Calculate cumulative return, annualized return, max drawdown, annualized sharp ratio, calmar ratio, sortino ratio, alpha, beta and information ratio with returns.
RiskIndicators(ret, rb, rf = 0)
ret |
vector of return |
rb |
return of market portfolio |
rf |
risk free rate |
A matrix of return and risk indicators
date <- as.Date("2015-01-01") + days(0:249) ret <- as.xts(rnorm(250), date) rb <- as.xts(rep(0, 250), date) RiskIndicators(ret, rb = rb, rf = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.