Monte Carlo Simulation and Python 13 - D'Alembert Strategy


Monte Carlo Simulation with Python Playlist:

In this video, we program the D'Alembert Strategy. The D'Alembert betting strategy is a progressive betting strategy that uses increments rather than multiples.

In the monte carlo simulation with Python series, we test various betting strategies. A simple 50/50 strategy, a martingale strategy, and the d'alembert strategy. We use the monte carlo simulator to calculate possible paths, as well as to calculate preferred variables to use including wager size, how many wagers, and more.

There are many purposes for a monte carlo simulator. Some people use them as a form of brute force to solve complex mathematical equations. A popular example used is to have a monte carlo simulator solve for pi. In our case, we are using the Monte Carlo simulator to account for randomness and the degree of risk associated with a betting strategy. In the world of sto...

Channel:  sentdex
Jon T 

Will you please retest this strategy where you reset to one unit after you profit ten or twenty units?

Jon T 

I would like to see what the results would be if you reset to 1 unit after reaching a profit of $500. I bet you could make it through all 10,000 bets.

Ass Russia 

import random

import matplotlib

import matplotlib.pyplot as plt

import time

lower_bust = 31.235

higher_profit = 63.208

sampleSize = 100

startingFunds = 10000

wagerSize = 100

wagerCount = 100

def rollDice():

roll = random.randint(1,100)

if roll == 100:

#print roll,'roll was 100, you lose. What are tho edds?! Play again!'

return False

elif roll <= 50:

#print roll, 'roll was 1-50, you lose. Play again!'

return False

elif 100 > roll >= 50:

#print roll, 'roll was 51-99, you win! * pretty lights flash* Play more!'

return True

def dAlembert(funds,initial_wager,wager_count):

global da_busts

global da_profits

value = funds

wager = initial_wager

currentWager = 1

previousWager = 'win'

previousWagerAmount = initial_wager

while currentWager <= wager_count:

if previousWager == 'win':

if wager == initial_wager:



wager -=


Roulette det not have a 50/50 chance. It's 18/37 so even worse than your roll dice function.