-
-
23 Mar 2015 12:16:20 UTC
- Distribution: Algorithm-Kelly
- Module version: 0.03
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (543 / 0 / 0)
- Kwalitee
Bus factor: 1- 100.00% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (9.58KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Algorithm::Kelly - calculates the fraction of a bankroll to bet using the Kelly formula
VERSION
version 0.03
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. Theoptimal_f()
sub is exported by default.CONVERTING ODDS
Odds are usually presented in one of three styles: decimal, fraction or American. The
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 here.
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.
Module Install Instructions
To install Algorithm::Kelly, copy and paste the appropriate command in to your terminal.
cpanm Algorithm::Kelly
perl -MCPAN -e shell install Algorithm::Kelly
For more information on module installation, please visit the detailed CPAN module installation guide.