GithubHelp home page GithubHelp logo

xandao-dev / monte-carlo-betting-simulations Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 5.0 1.7 MB

A bunch of betting simulations using Monte Carlo method. Useful for showing how your bankroll will collapse (or not) over time by betting.

License: MIT License

Python 100.00%
monte-carlo monte-carlo-simulation betting betting-models binary-options martingale kelly-criterion blackjack roulette casino

monte-carlo-betting-simulations's Introduction


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
  1. About The Project
  2. Usage
  3. Roadmap
  4. Contributing
  5. License
  6. Contact

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 - Bet a percentage of the bankroll based on the probability of winning.
    • Fixed Martingale - Double the bet every time you lose.
    • Fixed Martingale Inverted - 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 - 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 - A general-purpose, high-level programming language
  • random - A library for generating random numbers
  • matplotlib - A comprehensive library for creating static, animated, and interactive visualizations
  • scipy - A Python-based ecosystem of open-source software for mathematics, science, and engineering

Usage

  1. Install the dependencies

    pip install -r requirements.txt
  2. Configure the input data in the main.py file.

  3. Comment or uncomment the strategies you want to run in the main.py file.

  4. Run the simulator

    python3 main.py

Roadmap

See the open 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 for more information.

Free software =)

Contact

Alexandre Calil - Linkedin - [email protected]

Project Link: https://github.com/xandao-dev/monte-carlo-betting-simulations

monte-carlo-betting-simulations's People

Contributors

xandao-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

monte-carlo-betting-simulations's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.