This application is designed to help users calculate the optimal bet size using the Kelly Criterion, a popular formula used in gambling and investing to determine the ideal amount to bet to maximize wealth growth over time. The app takes into account the user's bankroll, the probability of winning a bet, and the American odds to calculate the optimal bet size.
- Input Validation: Checks for valid input ranges and provides feedback for invalid entries.
- American Odds Conversion: Converts American odds to European decimal odds for calculation.
- Optimal Bet Calculation: Uses the Kelly Criterion to calculate the optimal bet size.
- Error Handling: Includes server-side and client-side error handling to manage negative and impossible bet scenarios.
- Enter Probability of Winning: Input the probability of winning the bet (a value between 0 and 1).
- Enter American Odds: Input the American odds for the bet.
- Enter Bankroll: Input your total bankroll amount.
- Calculate: Click the 'Calculate' button to get the optimal bet size.
- Results: The optimal bet size will be displayed. If the bet is not advisable, the calculator will indicate so.
To set up this application:
- Clone the repository to your local machine.
- Navigate to the project directory and install dependencies (if any).
- Run the server (typically via
node server.js
). - Open the
index.html
file in a web browser to use the calculator (http://localhost:3000/
)
Contributions to improve the calculator are welcome. Please ensure to follow the project's code style and add tests for new features.
This calculator is provided for informational purposes only and should not be considered as financial advice.