pt.btavg {YRmisc} | R Documentation |
The batting average of the asset is the ratio between the number of periods where the asset outperforms a benchmark and the total number of periods.
pt.btavg(ar,br)
ar |
:a vector of a risk asset return |
br |
:a vector of a benchmark return |
artn <- runif(100,-1,1)
brtn <- runif(100,-1,1)
pt.btavg(artn,brtn)