10,000 Nights at a Casino – Using Python to test my Roulette Strategy

A few years ago, friends and I took a pit stop in Macau during a trip through Asia after our graduation.  While there, I came up with a fairly simple roulette strategy that I thought could work for someone with enough of a bankroll.  Since then, my friend Steve and I have argued about 15x about the validity of this strategy.  In fact, Steve even wrote a VBA program to prove that I was wrong.  Well, Steve, I wrote my own program this past rainy Sunday (to highlight my gambling prowess, this Sunday I also doubled up in Texas Hold ‘EM poker after flopping a full house with 7, 2 off suite – but that’s a story for another day).

The strategy is as follows: put $1 on black.  If you win, take your winnings off the table and put a new $1 bet down.  If you lose, then put $2 down, if you lose again, double it to $4, if you lose again, double it to $8, and keep doubling down until you win, then take all of your money off the table (your winnings will offest your previous string of losses and leave you with a $1 profit), and start again with a $1 bet.  Of course, the problem becomes, what happens when you lose 10 times in a row.  Well, I’m glad you asked.

First off, let’s analyze the probability of you losing that many times in a row.  There are 38 possibilities in a roulette wheel – numbers 1-36, 0, and 00.  So, your chances of not hitting your color are ((38-18)/38, or about 53%.  So, you don’t have a great chance of winning if you just play once.  But, what are the chances of you losing several times in a row?  The below table illustrates how low these odds become (‘Necessary Bet’ is the bet needed to recover losses and make $1.  The ‘Probability’ is the cumulative probability of losing n many times in a row.  See R1:T17 of the first tab of the excel I link to at the bottom of the post for the calculations):

Below is a graph of what your pay offs may look like.  Note that you are winning only $1 at a time until you eventually get really unlucky, somewhere around your 13,000th spin in this case, and lose money beyond your bankroll which forces you to quit and walk out of Macau penniless (but hopefully not indebted to some Asian Gangsters).  Notice how the blue bar suddenly drops to -$9,000…

This type of payoff structure is analogous to “picking up nickles in front of a steam roller.”  If you haven’t already, you should read When Genius Failed, the story of the demise of Long Term Capital Management.  LTCM was a hedge fund run by Nobel laureates who made thousands of tiny bets using computer programs in a strategy called statistical arbitrage, among others.  The hedge fund blew up as they thought the scenarios that would cause their fund to collapse would only occur once every few centuries (it only took a few years for the fund to meet its very spectacular end in one of the first “too big to fail” situations.  Fun fact: all Wall Street banks pitched in to help unwind the fund’s assets, and thus divert a systemic break in the economy, except for Bear Stearns who refused to help…).

Below is a zip file with three Python programs whose outputs are captured in the excel.  The programs assume that you start with $100, and can borrow up to $5,000 from your friend (except for the last one that assumes you can borrow $15,000).  So, just as LTCM relied on leverage to try to double down on their bets and save their fund, this strategy also relies on loans to stay afloat in bad times when the odds go against you.

The first program is what would happen if you sat down and played until you went bust.  I ran this program once, and you make about $6,000 before hitting some bad luck and going bust (this is shown in the line graph above).  The second program basically runs the first program 10,000 times in order to get an average payout.  However, this one assumes you are only willing to play 100 games in a row as even 100 games would probably take a very long time in reality.  The last program is the same as the second, except that the player can lose up to $15,000 before quitting, and, if they have played 100 games and are at a negative value at the 100th game, they will play until they either recoup their losses, or go bust and lose $15,000.  This last scenario actually yields a positive expected value of about $4 (see the third table of the excel file I link to at the end of the post.  Expected value is what you would expect to win, on average, if you played this strategy many times).  Here is the distribution of returns from spending 10,000 nights in the casino with your friend that has $15,000 he can loan you if need be.  Pay no attention to the long tails where you lose $8,000 – that’s like a 10 sigma event and would NEVER happen 🙂

Conclusion: is this an effective strategy?  Not really.  Even if you found a table that let you start with $1 bets, and you had the patience to sit down and do this, and you had the bankroll, it’s just not going to yield all that much cash over time.

Please feel free to look over my code and let me know if you come up with any other conclusions by modifying it!  Also – I’m not a programmer – these scripts were very easy to do and took me only a few hours to write all three and conduct all analysis because Python is super easy!  If you want to learn more, MIT has FREE courses on Python that you should check out.  Enjoy!

To quote a really great “anti-recruiter” LinkedIn profile describing time spent at a large quant hedge fund: “I earn above-market returns 95% of years by collecting theta, selling volatility in the form of financial derivatives, naked short put options, and in summary, collect nickels and dimes in front of steam rollers, hoping the black swans never appear during my lifetime.

Attachments:

The Excel: Roulette Output

Python programs: Roulette Programs

7,734 Replies to “10,000 Nights at a Casino – Using Python to test my Roulette Strategy”

  1. Thank you, I have recently been searching for info about this topic for ages and yours is
    the best I’ve found out so far. However, what in regards to the
    conclusion? Are you positive about the supply?

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  2. I don’t know if it’s just me or if everyone else encountering problems with your blog.
    It seems like some of the text within your content are running off the screen. Can somebody else
    please provide feedback and let me know if this is happening to them as well?
    This may be a issue with my browser because I’ve had this happen before.
    Appreciate it
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  3. This is really interesting, You’re a very skilled blogger.
    I’ve joined your feed and look forward to seeking more of your fantastic post.
    Also, I have shared your site in my social networks!

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  4. Great post. I used to be checking continuously this weblog and I am inspired!
    Very useful information specifically the ultimate part :
    ) I take care of such info a lot. I used to be seeking this particular information for a
    very lengthy time. Thank you and best of luck.

    Free Accounts | The Most Reliable Free Account Sharing
    Site
    free accounts

  5. I’m really enjoying the theme/design of your blog. Do
    you ever run into any web browser compatibility problems?
    A handful of my blog visitors have complained about my website not
    operating correctly in Explorer but looks great in Opera.
    Do you have any solutions to help fix this issue?
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  6. Heya! I’m at work surfing around your blog from my
    new iphone 3gs! Just wanted to say I love reading your blog and look forward to
    all your posts! Keep up the great work!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  7. Excellent pieces. Keep writing such kind of info on your blog.

    Im really impressed by your blog.
    Hi there, You have performed a fantastic job. I will certainly
    digg it and for my part suggest to my friends. I’m sure they will be benefited from this web site.

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  8. After looking into a few of the blog posts
    on your blog, I honestly appreciate your technique of blogging.
    I saved it to my bookmark webpage list and will be checking back soon. Please check out my website as well and let me know your opinion.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  9. I got this web site from my friend who shared with me concerning this web site and at the
    moment this time I am visiting this web site and reading very informative content at this
    time.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  10. Hey! Do you know if they make any plugins to safeguard against hackers?
    I’m kinda paranoid about losing everything I’ve
    worked hard on. Any suggestions?
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  11. If some one wants expert view on the topic of blogging and site-building then i
    suggest him/her to go to see this website, Keep up the good job.

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  12. Wonderful blog! Do you have any suggestions for aspiring writers?
    I’m hoping to start my own site soon but I’m a little lost
    on everything. Would you propose starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I’m totally confused ..
    Any ideas? Cheers!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  13. Having read this I believed it was extremely enlightening.

    I appreciate you finding the time and effort to put this information together.
    I once again find myself personally spending way too much time both reading and posting comments.

    But so what, it was still worth it!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  14. If you are going for best contents like me, only go to see this web page every day for the reason that it offers feature contents, thanks
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  15. Hi! Someone in my Myspace group shared this website with us so
    I came to take a look. I’m definitely enjoying the information. I’m book-marking and will be tweeting this to my
    followers! Fantastic blog and brilliant design and style.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  16. Heya i’m for the first time here. I found this board and I
    to find It really useful & it helped me out a
    lot. I am hoping to give something back and aid others such as you aided me.

    Free Accounts | The Most Reliable Free Account
    Sharing Site
    free accounts

  17. I just couldn’t leave your web site prior to suggesting that I actually loved the
    usual info a person provide in your guests? Is going to be again incessantly in order to check up on new
    posts
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  18. Definitely believe that which you stated. Your favorite
    justification appeared to be on the net the simplest thing
    to be aware of. I say to you, I certainly get irked while people think about worries that they just do not
    know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect
    , people could take a signal. Will likely be back to get more.

    Thanks
    Free Account | New Free Accounts And Password List
    free accounts

  19. Medyum Dolunay; medyumluk sahaında uzun yıllardan bri
    sizler muhtevain hizmet vermekte olup senelerdir medyumluk meydanında faliyet gösteren Türkiye’nin sayılı
    resmi izin sahibi ve vergi levhalı medyumlarındandır.

    Papaz Büyüsü En Etkili Kara Büyümüdür ?

    papaz büyüsü

  20. I was more than happy to find this web site.
    I want to to thank you for your time for this wonderful read!!
    I definitely savored every part of it and i also have you book marked
    to look at new stuff in your site.
    Free Account | New Free Accounts And Password List
    free accounts

  21. You actually make it seem so easy with your presentation but I find
    this matter to be actually something which I think I would never understand.

    It seems too complex and extremely broad for me.
    I am looking forward for your next post, I’ll try to get the hang of
    it!
    Free Account | New Free Accounts And Password
    List
    free accounts

  22. Write more, thats all I have to say. Literally, it
    seems as though you relied on the video to make your point.

    You clearly know what youre talking about, why throw away your intelligence
    on just posting videos to your blog when you could be
    giving us something informative to read?
    Free Account | New Free Accounts And Password List
    free accounts

  23. Hi, I do believe this is an excellent blog. I stumbledupon it 😉 I will return yet again since I bookmarked it.
    Money and freedom is the best way to change, may you be rich and continue to guide others.

    Free Account | New Free Accounts And Password List
    free accounts

  24. wonderful publish, very informative. I wonder why the
    opposite experts of this sector do not understand this.
    You should proceed your writing. I’m sure, you’ve a huge readers’ base already!

    Free Account | New Free Accounts And Password List
    free accounts

  25. Hey There. I found your blog using msn. This is an extremely well written article.

    I’ll be sure to bookmark it and return to read more of
    your useful info. Thanks for the post. I’ll definitely return.
    Free Account | New Free Accounts And Password List
    free accounts

  26. I have been surfing on-line more than 3 hours these days,
    yet I by no means found any interesting article like yours.
    It is pretty worth enough for me. In my view, if all webmasters and
    bloggers made good content material as you did, the internet might be much more useful than ever before.

    Free Account | New Free Accounts And Password List
    free accounts

  27. Hi there, for all time i used to check webpage posts here in the early hours in the morning, as i love to gain knowledge of
    more and more.
    Free Account | New Free Accounts And Password List
    free accounts

  28. Howdy! This is kind of off topic but I need some advice from an established
    blog. Is it tough to set up your own blog? I’m not very techincal but I can figure
    things out pretty fast. I’m thinking about making my own but I’m not sure where to start.

    Do you have any points or suggestions? Many thanks
    Free Account | New Free Accounts And Password List
    free accounts

  29. fantastic submit, very informative. I’m wondering why the opposite specialists of this
    sector don’t realize this. You should continue your writing.
    I am confident, you have a huge readers’ base already!

    Free Account | New Free Accounts And Password List
    free accounts

  30. I have been browsing online greater than three hours nowadays, yet
    I by no means discovered any attention-grabbing article like yours.
    It’s lovely value enough for me. In my view, if all site owners and bloggers made excellent content material as
    you probably did, the net can be much more useful than ever before.

    Free Account | New Free Accounts And Password List
    free accounts

  31. I don’t even know how I ended up here, but I thought this post was good.
    I don’t know who you are but definitely you are going to a famous blogger if you aren’t
    already 😉 Cheers!
    Free Account | New Free Accounts And Password List
    free accounts

  32. Wow that was unusual. I just wrote an incredibly long comment but after I clicked submit my comment didn’t show
    up. Grrrr… well I’m not writing all that over again. Regardless, just wanted to say
    fantastic blog!
    Free Account | New Free Accounts And Password List
    free accounts

  33. It’s really a nice and helpful piece of information. I am happy that you shared this
    useful information with us. Please keep us informed like this.
    Thank you for sharing.
    Free Account | New Free Accounts And Password List
    free accounts

Comments are closed.