powered by
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)
:a vector of a risk asset return
:a vector of a benchmark return
# NOT RUN { artn <- runif(100,-1,1) brtn <- runif(100,-1,1) pt.btavg(artn,brtn) # }
Run the code above in your browser using DataLab