Algorithm-Kelly

 view release on metacpan or  search on metacpan

lib/Algorithm/Kelly.pm  view on Meta::CPAN


=head1 VERSION

version 0.03

=head1 SYNOPSIS

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

    say optimal_f(0.5, 2); # 0.25

=head1 FUNCTIONS

=head2 optimal_f ($probability, $payoff)

Returns the optimal L<fraction|https://en.wikipedia.org/wiki/Kelly_criterion> of bankroll to wager, using the Kelly Criterion, given the C<$probability> and C<$payoff>. Payoff should be the net odds of the wager, so the value of 3-to-1 would be 3. Th...

=head1 CONVERTING ODDS

Odds are usually presented in one of three styles: decimal, fraction or American. The C<optimal_f> sub requires the net decimal odds. These odds are all equal:



( run in 0.456 second using v1.01-cache-2.11-cpan-483215c6ad5 )