Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xandao-dev/monte-carlo-betting-simulations
A bunch of betting simulations using Monte Carlo method. Useful for showing how your bankroll will collapse (or not) over time by betting.
https://github.com/xandao-dev/monte-carlo-betting-simulations
betting betting-models binary-options blackjack casino kelly-criterion martingale monte-carlo monte-carlo-simulation roulette
Last synced: about 2 months ago
JSON representation
A bunch of betting simulations using Monte Carlo method. Useful for showing how your bankroll will collapse (or not) over time by betting.
- Host: GitHub
- URL: https://github.com/xandao-dev/monte-carlo-betting-simulations
- Owner: xandao-dev
- License: mit
- Created: 2020-01-20T23:42:43.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-12-08T22:09:53.000Z (about 2 years ago)
- Last Synced: 2024-10-10T12:50:43.332Z (2 months ago)
- Topics: betting, betting-models, binary-options, blackjack, casino, kelly-criterion, martingale, monte-carlo, monte-carlo-simulation, roulette
- Language: Python
- Homepage:
- Size: 1.66 MB
- Stars: 18
- Watchers: 4
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Monte Carlo Betting Simulations
A collection of Monte Carlo simulations for betting strategies like the Martingale, D'Alembert, and much more. The project generates a series of plots for each strategy, and also generates a summary table of the results.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
## About The Project
Sample with the Fixed Bettor, Fixed Martingale, Fixed D'Alembert, Fixed Soros and Kelly Criterion in European Roulette, betting on red/black (same as odd/even or high/low).
It was run 20 simulations of 10000 bets each, for each strategy and the initial bankroll was 100$.### Features
* Template Method Design Pattern, so it's easy to add new strategies.
* Plots and summary table for each strategy.
* **List of strategies**:* **Fixed Bettor** - Bet the same amount of money every time.
* **Percentage Bettor** - Bet a fixed percentage of the bankroll every time.
* **[Kelly Criterion](https://en.wikipedia.org/wiki/Kelly_criterion)** - Bet a percentage of the bankroll based on the probability of winning.
* **[Fixed Martingale](https://pt.wikipedia.org/wiki/Martingale)** - Double the bet every time you lose.
* **[Fixed Martingale Inverted](https://en.wikipedia.org/wiki/Martingale_(betting_system)#Anti-martingale)** - Also known as Anti-Martingale, double the bet every time you win.
* **Percentage Martingale** - Same as Fixed Martingale, but the bet is a percentage of the bankroll.
* **Percentage Martingale** with Kelly Percentage - Same as Percentage Martingale, but the percentage is calculated using the Kelly Criterion.
* **Percentage Martingale Inverted** - Same as Fixed Martingale Inverted, but the bet is a percentage of the bankroll.
* **Percentage Martingale Inverted with Kelly Percentage** - Same as Percentage Martingale Inverted, but the percentage is calculated using the Kelly Criterion.
* **Fixed Soros** - A strategy where you reinvests the winnings of the previous bet.
* **Percentage Soros** - Same as Fixed Soros, but the bet is a percentage of the bankroll.
* **Percentage Soros with Kelly Percentage** - Same as Percentage Soros, but the percentage is calculated using the Kelly Criterion.
* **Fixed Fibonacci** - A strategy where you bet the next number in the Fibonacci sequence, when you lose.
* **Fixed Fibonacci Inverted** - Also known as Anti-Fibonacci, it's a strategy where you bet the net number in the Fibonacci sequence, when you win.
* **Percentage Fibonacci** - Same as Fixed Fibonacci, but the bet is a percentage of the bankroll.
* **Percentage Fibonacci with Kelly Percentage** - Same as Percentage Fibonacci, but the percentage is calculated using the Kelly Criterion.
* **Percentage Fibonacci Inverted** - Same as Fixed Fibonacci Inverted, but the bet is a percentage of the bankroll.
* **Percentage Fibonacci Inverted with Kelly Percentage** - Same as Percentage Fibonacci Inverted, but the percentage is calculated using the Kelly Criterion.
* **[Fixed DAlembert](https://en.wikipedia.org/wiki/D%27Alembert_system)** - Increase or decrease the bet by 1 unit every time you win or lose, respectively.
* **Fixed DAlembert Inverted** - Also known as Anti-D'Alembert, increase or decrease the bet by 1 unit every time you lose or win, respectively.### Built With
* [Python3](https://www.python.org/) - A general-purpose, high-level programming language
* [random](https://docs.python.org/3/library/random.html) - A library for generating random numbers
* [matplotlib](https://matplotlib.org/) - A comprehensive library for creating static, animated, and interactive visualizations
* [scipy](https://www.scipy.org/) - A Python-based ecosystem of open-source software for mathematics, science, and engineering## Usage
1. Install the dependencies
```sh
pip install -r requirements.txt
```
2. Configure the input data in the [main.py](./main.py) file.3. Comment or uncomment the strategies you want to run in the [main.py](./main.py) file.
3. Run the simulator
```sh
python3 main.py
```## Roadmap
See the [open issues](https://github.com/xandao-dev/monte-carlo-betting-simulations/issues) for a list of proposed features (and known issues).
## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request## License
Distributed under the MIT License. See [LICENSE](./LICENSE.md) for more information.
Free software =)
## Contact
Alexandre Calil - [Linkedin](https://www.linkedin.com/in/xandao-dev/) - [[email protected]](mailto:[email protected])
Project Link: [https://github.com/xandao-dev/monte-carlo-betting-simulations](https://github.com/xandao-dev/monte-carlo-betting-simulations)