To calculate Upside Frequency, we take the subset of returns that are more than the target (or Minimum Acceptable Returns (MAR)) returns and divide the length of this subset by the total number of returns.
UpsideFrequency(R, MAR = 0, ...)
R | an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
---|---|
MAR | Minimum Acceptable Return, in the same periodicity as your returns |
… | any other passthru parameters |
$$ UpsideFrequency(R , MAR) = \sum^{n}_{t=1}\frac{max[(R_{t} - MAR), 0]}{R_{t}*n}$$
where \(n\) is the number of observations of the entire series
Carl Bacon, Practical portfolio performance measurement and attribution, second edition 2008 p.94
data(portfolio_bacon) MAR = 0.005 print(UpsideFrequency(portfolio_bacon[,1], MAR)) #expected 0.542#> [1] 0.5416667data(managers) print(UpsideFrequency(managers['1996']))#> HAM1 HAM2 HAM3 HAM4 HAM5 HAM6 EDHEC LS EQ #> Upside Frequency (MAR = 0%) 0.75 0.8 0.8333333 0.6666667 NaN NaN NaN #> SP500 TR US 10Y TR US 3m TR #> Upside Frequency (MAR = 0%) 0.8333333 0.4166667 1print(UpsideFrequency(managers['1996',1])) #expected 0.75#> [1] 0.75