# Martingale Strategy Simulation

An overview and simulation of the Martingale betting system.

The Martingale Strategy is a popular betting system most commonly used in games like roulette and blackjack.
It is based on the principle of doubling your bet after each loss, with the idea that a win will eventually
occur, offsetting all previous losses and providing a profit equal to the original stake.

The strategy is typically applied to bets that have close to a 50% chance of winning, such as betting on red
or black, odd or even, or high or low in roulette.

To illustrate, consider a player using the Martingale Strategy in a game of roulette by placing an initial
bet of $1 on black. If the bet loses, the strategy dictates that the next bet should be doubled to $2. If
this second bet loses as well, the next bet should be doubled again to $4. This process is repeated until a
winning bet occurs. When the player eventually wins, the payout will cover all previous losses and provide a
profit equal to the initial $1 bet. The player then restarts the process with another $1 bet.

However, the Martingale Strategy is not without its pitfalls. The most significant risk is that a prolonged
losing streak can lead to extremely large bets, which may either exceed the player's budget or hit the
table's betting limit. This situation renders the strategy ineffective and can lead to substantial financial
losses. Additionally, the strategy doesn’t change the house edge in games like roulette, meaning that the
odds remain in favor of the casino in the long term. Therefore, while the Martingale Strategy can provide
short-term wins, it is not a foolproof or risk-free system and should be used with caution and awareness of
its limitations.

## Simulating the Martingale Strategy

## Simulating Multiple Games

We can run the simulation above many times (using the same parameters selected) to understand the maximum value range that can be achieved using this method. Once the simulations are run, the boxplot below will show the range of the maximum wallet value achieved for each game.That concludes the Martingale Stratergy!