To calculate Bernardo and Ledoit ratio we take the sum of the subset of returns that are above 0 and we divide it by the opposite of the sum of the subset of returns that are below 0
BernardoLedoitRatio(R, ...)
R | an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
---|---|
… | any other passthru parameters |
$$BernardoLedoitRatio(R) = \frac{\frac{1}{n}\sum^{n}_{t=1}{max(R_{t},0)}}{\frac{1}{n}\sum^{n}_{t=1}{max(-R_{t},0)}}$$
where \(n\) is the number of observations of the entire series
Carl Bacon, Practical portfolio performance measurement and attribution, second edition 2008 p.95
data(portfolio_bacon) print(BernardoLedoitRatio(portfolio_bacon[,1])) #expected 1.78#> [1] 1.779783data(managers) print(BernardoLedoitRatio(managers['1996']))#> HAM1 HAM2 HAM3 HAM4 HAM5 HAM6 EDHEC LS EQ #> Bernardo and Ledoit ratio 4.598338 2375 6.482812 3.615074 NaN NaN NaN #> SP500 TR US 10Y TR US 3m TR #> Bernardo and Ledoit ratio 4.340625 1.028277 -Infprint(BernardoLedoitRatio(managers['1996',1])) #expected 4.598#> [1] 4.598338