BernardoLedoitRatio | R Documentation |
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
Matthieu Lestel
Carl Bacon, Practical portfolio performance measurement and attribution, second edition 2008 p.95
data(portfolio_bacon)
print(BernardoLedoitRatio(portfolio_bacon[,1])) #expected 1.78
data(managers)
print(BernardoLedoitRatio(managers['1996']))
print(BernardoLedoitRatio(managers['1996',1])) #expected 4.598
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.