The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Algorithm::Kelly - calculates the fraction of of your bankroll to bet using the Kelly formula

VERSION

version 0.02

SYNOPSIS

    use Algorithm::Kelly;
    use feature 'say';

    say optimal_f(0.5, 2); # 0.25

FUNCTIONS

optimal_f ($probability, $payoff)

Returns the optimal fraction of bankroll to wager, using the Kelly Criterion, given the $probability and $payoff. Payoff should be the net odds of the wager, so the value of 3-to-1 would be 3. The optimal_f() sub is exported by default.

AUTHOR

David Farrell <dfarrell@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by David Farrell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.