hitRatio: hitRatio

Description Usage Arguments Value Author(s) Examples

View source: R/pub01_utilityFuncs.R

Description

get the hit ratio of the return series.

Usage

1
hitRatio(rtn, satisfied = 0)

Arguments

rtn

a vector or a matrix(or a matrix-like object,eg.xts,zoo,timeSeries,..each column gives a rtn series of an asset)

satisfied

a numeric, indicating how much return could be called a "hit"

Value

the hit ratio, a matrix with dims 1*NCOL(rtn)

Author(s)

Ruifei.Yin

Examples

1
2
rtn <- matrix(runif(100,0,0.05),50,2)
hit <- hitRatio(rtn,0.02)

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