qf_lib.common.utils.miscellaneous.kelly.kelly(qf_series: QFSeries) float[source]

Calculates the value of the Kelly Criterion (the fraction of money that should be invested) for the series of returns/prices.

Kelly Criterion assumptions: 1. You trade the same way you traded in the past. 2. Each return corresponds to one trade. 3. Returns are normally distributed (calculated value will be close to the ideal kelly value even for highly skewed returns. Test showed that the difference of up to 10% (relative) might occur for extremely skewed distributions.


qf_series (QFSeries) – timeseries of returns/prices. Each return/price must correspond to one trade.


fraction of money that should be invested

Return type: