rtn.summary: rtn.summary

Description Usage Arguments Value Author(s) Examples

View source: R/pub01_utilityFuncs.R

Description

get the summary infomation of the rtn series,including Annualized Return,Annualized Std Dev,Annualized Sharpe,HitRatio,Worst Drawdown

Usage

1
rtn.summary(rtn, hitFreq = "day", hitSatisfied = 0, Rf = 0)

Arguments

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 cut.Date for detail.

hitSatisfied

a numeric, indicating how much return could be called a "hit".See hitRatio for detail.

Rf

risk free rate, in same period as your returns

Value

a matrix, giving the summary infomation of the rtn series,including Annualized Return,Annualized Std Dev,Annualized Sharpe,HitRatio,Worst Drawdown

Author(s)

Ruifei.Yin

Examples

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)

QuantAndrew/QUtility documentation built on May 14, 2019, 7:36 a.m.