The d ratio is similar to the Bernado Ledoit ratio but inverted and taking into account the frequency of positive and negative returns.

DRatio(R, ...)

Arguments

R

an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns

…

any other passthru parameters

Details

It has values between zero and infinity. It can be used to rank the performance of portfolios. The lower the d ratio the better the performance, a value of zero indicating there are no returns less than zero and a value of infinity indicating there are no returns greater than zero. $$DRatio(R) = \frac{n_{d}*\sum^{n}_{t=1}{max(-R_{t},0)}}{n_{u}*\sum^{n}_{t=1} {max(R_{t},0)}}$$

where \(n\) is the number of observations of the entire series, \(n_{d}\) is the number of observations less than zero, \(n_{u}\) is the number of observations greater than zero

References

Carl Bacon, Practical portfolio performance measurement and attribution, second edition 2008 p.95

Examples

data(portfolio_bacon) print(DRatio(portfolio_bacon[,1])) #expected 0.401
#> [1] 0.4013329
data(managers) print(DRatio(managers['1996']))
#> HAM1 HAM2 HAM3 HAM4 HAM5 HAM6 EDHEC LS EQ #> d ratio 0.07248996 0.0001052632 0.03085081 0.1383098 NaN NaN NaN #> SP500 TR US 10Y TR US 3m TR #> d ratio 0.04607631 1.361501 0
print(DRatio(managers['1996',1])) #expected 0.0725
#> [1] 0.07248996