backtesting.py icon indicating copy to clipboard operation
backtesting.py copied to clipboard

Remove flooring on ratios and adding Kelly Criterion

Open t2o2 opened this issue 3 years ago • 4 comments

Fixes https://github.com/kernc/backtesting.py/issues/715

  • Remove flooring on Sharpe Ratio
  • Adding Kelly Criterion

t2o2 avatar May 08 '22 20:05 t2o2

Any other comments?

t2o2 avatar May 13 '22 08:05 t2o2

Any update on this review?

cscbai avatar Jun 09 '22 21:06 cscbai

I've actually been meaning to but just didn't come round to trying it out and seeing what happens when positions are indeed sized as Kelly Criterion recommends. Say I run a backtest and get Kelly Criterion=0.5. Say I now repeat the same strategy backtest with trades size=0.5. What does the Kelly Criterion say at the end of this backtest? And if the value is different from before, of what real use is it?

kernc avatar Jun 09 '22 22:06 kernc

The traditional meaning of Kelly Criterion is indeed the bet size optimisation parameter. However, it also shows the confidence level on a particular strategy, similar to the Sharpe ratio, the higher is generally better.

In a portfolio sense, it tells the user, how much to invest in this particular strategy as part of user's overall portfolio.

t2o2 avatar Jun 09 '22 22:06 t2o2

Is it possible to merge in?

t2o2 avatar Oct 12 '22 21:10 t2o2

Sorry to have taken so long. CI was a mess. Thanks for the PR! :cake:

kernc avatar Dec 05 '22 16:12 kernc