Algorithm-Kelly

 view release on metacpan or  search on metacpan

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

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
    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:
 
    Type      Example    Net Odds
    ----      --------   --------
    Decimal   4.0        3.0
    Fraction  3/1        3.0
    American  +300       3.0
 
The different odds representations are also explained L<here|http://www.olbg.com/school/lesson10.htm>.
 
=head1 AUTHOR



( run in 0.310 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )