R/KellyRatio.R
KellyRatio.RdKelly criterion ratio (leverage or bet size) for a strategy.
KellyRatio(R, Rf = 0, method = "half")The Kelly Criterion was identified by Bell Labs scientist John Kelly, and applied to blackjack and stock strategy sizing by Ed Thorpe.
The Kelly ratio can be simply stated as: “bet size is the ratio of edge over odds.” Mathematically, you are maximizing log-utility. As such, the Kelly criterion is equal to the expected excess return of the strategy divided by the expected variance of the excess return, or
$$leverage=\frac{(\overline{R}_{s}-R_{f})}{StdDev(R)^{2}}$$
As a performance metric, the Kelly Ratio is calculated retrospectively on a particular investment as a measure of the edge that investment has over the risk free rate. It may be use as a stack ranking method to compare investments in a manner similar to the various ratios related to the Sharpe ratio.
Thorp, Edward O. (1997; revised 1998). The Kelly Criterion in Blackjack, Sports Betting, and the Stock Market. https://en.wikipedia.org/wiki/Kelly_criterion
no longer online, but can be found at archive.ph /h1LuS
data(managers)
KellyRatio(managers[,1,drop=FALSE], Rf=.04/12)
#> HAM1
#> Kelly Ratio 5.929483
KellyRatio(managers[,1,drop=FALSE], Rf=managers[,10,drop=FALSE])
#> HAM1
#> Kelly Ratio 6.010854
KellyRatio(managers[,1:6], Rf=managers[,10,drop=FALSE])
#> HAM1 HAM2 HAM3 HAM4 HAM5 HAM6
#> Kelly Ratio 6.010854 4.069873 3.458124 1.376354 0.3876476 7.948295