Description Usage Arguments Value Author(s) Examples
View source: R/pub01_utilityFuncs.R
get the summary infomation of the rtn series,including Annualized Return,Annualized Std Dev,Annualized Sharpe,HitRatio,Worst Drawdown
1 | rtn.summary(rtn, hitFreq = "day", hitSatisfied = 0, Rf = 0)
|
rtn |
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
hitFreq, indicating |
the interval when computing the hitRatio of rtn. An interval specification, one of "day", "week", "month", "quarter" and "year", optionally preceded by an integer and a space, or followed by "s".See |
hitSatisfied |
a numeric, indicating how much return could be called a "hit".See |
Rf |
risk free rate, in same period as your returns |
a matrix, giving the summary infomation of the rtn series,including Annualized Return,Annualized Std Dev,Annualized Sharpe,HitRatio,Worst Drawdown
Ruifei.Yin
1 2 3 4 | rtn.long <- zoo(rnorm(100,0.001,0.02),as.Date("2010-01-01")+1:100)
rtn.short <- rtn.long + rnorm(100,-0.001,0.003)
rtn <- merge(rtn.long,rtn.short)
rtn.summary(rtn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.