https://github.com/dnmfarrell/algorithm-kelly
Calculate the fraction of a bankroll to bet
https://github.com/dnmfarrell/algorithm-kelly
Last synced: about 2 months ago
JSON representation
Calculate the fraction of a bankroll to bet
- Host: GitHub
- URL: https://github.com/dnmfarrell/algorithm-kelly
- Owner: dnmfarrell
- License: other
- Created: 2015-03-20T11:02:49.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-23T12:16:37.000Z (about 11 years ago)
- Last Synced: 2025-01-16T16:49:20.686Z (over 1 year ago)
- Language: Perl
- Homepage:
- Size: 129 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.pod
- License: LICENSE
Awesome Lists containing this project
README
=pod
=encoding UTF-8
=head1 NAME
Algorithm::Kelly - calculates the fraction of a bankroll to bet using the Kelly formula
=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 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. The C sub is exported by default.
=head1 CONVERTING ODDS
Odds are usually presented in one of three styles: decimal, fraction or American. The C 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.
=head1 AUTHOR
David Farrell
=head1 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.
=cut