Skip to main content

bet-optimizer

bet-optimizer is a Python package designed for those interested in applying mathematical strategies to betting. It leverages the Kelly Criterion and the concept of positive expected value (EV) in betting, helping users calculate the optimal bet size and the minimum positive odds required for a bet to have a positive expected value.

Features

  • Kelly Criterion Bet Calculation: Calculate the optimal fraction of your bankroll to bet based on your probability of winning and the odds offered.
  • Positive Odds Calculation: Determine the minimum positive odds required for a bet to have a positive expected value, based on the probability of winning.

Installation

The package can be easily installed via pip. Just run the following command in your terminal:

pip install bet-optimizer

Usage

Kelly Criterion Bet Size Calculation

To calculate the optimal bet size using the Kelly Criterion:

from bet_optimizer import kelly_criterion_bet

probability = 0.5  # Probability of winning the bet
odds = 2.0  # Decimal odds of the bet
bankroll = 100  # Size of your current bankroll

bet_size = kelly_criterion_bet(probability, odds, bankroll)
print(f"Optimal Bet Size: {bet_size}")

Positive Odds Calculation

To calculate the minimum positive odds required for a bet:

from bet_optimizer import get_positive_odds

probability = 0.5  # Probability of winning the bet

positive_odds = get_positive_odds(probability)
print(f"Minimum Positive Odds: {positive_odds}")

Requirements

  • Python 3.6 or later.

License

This project is licensed under the Apache License - see the LICENSE file for details.

Contributions

Contributions are welcome! Please feel free to submit a pull request or open an issue.

Support

If you encounter any problems or have any questions, please open an issue on the project's GitHub page.

More Information

For more information and to download the package, visit bet-optimizer on PyPI.

Metadata

Release files for bet-optimizer 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bet-optimizer 0.0.2
File Size Uploaded
bet_optimizer-0.0.2.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bet-optimizer 0.0.2
File Interpreter ABI Platform
bet_optimizer-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 kB

Release files / bet_optimizer-0.0.2.tar.gz

Download URL bet_optimizer-0.0.2.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ac636cb6b412c2f58ec0d715aaa507320850e7c11b6c4caf34d31cc7d833bdf4
BLAKE2b-256 checksum
How to use checksums
99cd0f424c21d3deccdd8bd529d5e0fec1099350075347d7cc04822b856a2091
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Release files / bet_optimizer-0.0.2-py3-none-any.whl

Download URL bet_optimizer-0.0.2-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8567d1a7baf466516d1bfebb809ec54fb08b9d58942de9fe7b2a614107e75dd
BLAKE2b-256 checksum
How to use checksums
187e88c0d0c9195b0f85a853edf9639e4952cf5c5e5b0446bdf7ce9718fc45f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page