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. I’m amazed, I have to admit. Seldom do I come across a
    blog that’s both equally educative and engaging,
    and let me tell you, you’ve hit the nail on the head.
    The issue is something too few men and women are speaking intelligently about.

    I’m very happy I came across this in my hunt for something regarding this.

    Free Account | New Free Accounts And Password List
    free accounts

  2. Hey there! This is kind of off topic but I need some help 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 quick.
    I’m thinking about creating my own but I’m not sure where to
    begin. Do you have any points or suggestions? Thank you
    Free Account | New Free Accounts And Password List
    free accounts

  3. Howdy! This post could not be written any better!
    Looking through this post reminds me of my previous roommate!

    He constantly kept talking about this. I’ll send this article to him.
    Pretty sure he’ll have a great read. Thanks for sharing!

    Free Account | New Free Accounts And Password List
    free accounts

  4. Having read this I believed it was extremely enlightening.
    I appreciate you taking the time and effort to put this information together.
    I once again find myself spending a lot of time both reading and leaving comments.
    But so what, it was still worthwhile!
    Free Account | New Free Accounts And Password List
    free accounts

  5. It is the best time to make a few plans for the future and it’s time to be happy.

    I’ve learn this put up and if I may I want to recommend you some
    attention-grabbing things or suggestions.
    Perhaps you can write next articles referring to this article.
    I desire to learn even more things approximately it!
    Free Account | New Free Accounts And Password List
    free accounts

  6. Hmm it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what
    I had written and say, I’m thoroughly enjoying your blog.
    I too am an aspiring blog writer but I’m still new to everything.
    Do you have any helpful hints for novice blog writers?

    I’d certainly appreciate it.
    Free Account | New Free Accounts And Password List
    free accounts

  7. Hello! I simply want to give you a big thumbs up for
    your great information you’ve got here on this post.
    I’ll be returning to your website for more soon.
    Free Account | New Free Accounts And Password List
    free accounts

  8. I do accept as true with all of the concepts you have presented in your post.
    They’re very convincing and can definitely work.
    Still, the posts are very quick for starters.
    Could you please lengthen them a bit from next time?

    Thanks for the post.
    Free Account | New Free Accounts And Password List
    free accounts

  9. I just couldn’t leave your website before suggesting that I actually loved the standard information a person supply
    to your visitors? Is going to be back regularly in order to check up on new posts
    Free Account | New Free Accounts And Password List
    free accounts

  10. It’s appropriate time to make some plans for the future and it’s time to be
    happy. I’ve read this post and if I could I wish to suggest
    you few interesting things or advice. Perhaps you could write next articles referring to
    this article. I wish to read more things about it!

    Free Account | New Free Accounts And Password List
    free accounts

  11. We’re a gaggle of volunteers and opening a new scheme in our community.

    Your website offered us with valuable information to work on. You have performed a formidable task and our entire neighborhood will likely
    be thankful to you.
    Free Account | New Free Accounts And Password List
    free accounts

  12. Fakat doğruluk medyumlar tarafından kuruluşlabilir yahut
    bozulabilir. Bozulmadığı sürece gittikçe kuvvetlenen bir enerji haline
    hasılat. Bu da etkilerinin gittikçe artacağı medlulına gelmektedir.

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

    papaz büyüsü

  13. always i used to read smaller articles that also
    clear their motive, and that is also happening
    with this paragraph which I am reading at this place.

    Free Account | New Free Accounts And Password List
    free accounts

  14. It is the best time to make some plans for the future and it is time to be happy.

    I have learn this submit and if I may just I want to recommend you some attention-grabbing things or
    advice. Maybe you can write next articles referring to this article.
    I want to read even more things approximately it!
    Free Account | New Free Accounts And Password List
    free accounts

  15. I loved as much as you’ll receive carried out right here.
    The sketch is tasteful, your authored subject matter stylish.
    nonetheless, you command get bought an edginess over that you wish be delivering the following.
    unwell unquestionably come more formerly again as
    exactly the same nearly a lot often inside case
    you shield this hike.
    Free Account | New Free Accounts And Password List
    free accounts

  16. certainly like your web site however you have to take a look at the spelling
    on quite a few of your posts. Many of them are rife with spelling issues and I to find it very bothersome to tell the reality nevertheless I will definitely come back again.
    Free Account | New Free Accounts And Password List
    free accounts

  17. I think that is one of the such a lot significant information for me.
    And i’m glad reading your article. But want to
    remark on few general issues, The website taste is ideal, the articles is really great : D.

    Excellent process, cheers
    Free Account | New Free Accounts And Password List
    free accounts

  18. Bu sayfamızda da Sweet Bonanza ile ilgili herkesin bilmesi gerekenleri sizlere detaylıca aktaracağız. Nasıl oynandığı, oyun özellikleri ve daha birçok konuda bilgi bu sayfada yer almaktadır.Yukarıdaki bölümden ücretsiz bir şekilde Sweet Bonanza slot oyununun deneme sürmünü oynayabilirsiniz. . Sweet Bonanza

  19. That is a great tip particularly to those fresh to the blogosphere.
    Brief but very accurate info… Thank you for sharing this one.
    A must read post!
    Free Account | New Free Accounts And Password List
    free accounts

  20. Thanks for the good writeup. It if truth be told was
    once a enjoyment account it. Glance advanced to far added agreeable
    from you! However, how can we be in contact?
    Free Account | New Free Accounts And Password List
    free accounts

  21. Interesting blog! Is your theme custom made or did
    you download it from somewhere? A theme like yours with a few simple
    adjustements would really make my blog stand out.
    Please let me know where you got your theme.
    Kudos
    Free Account | New Free Accounts And Password List
    free accounts

  22. I will immediately snatch your rss as I can not find your e-mail
    subscription hyperlink or newsletter service. Do you’ve any?
    Kindly permit me know so that I could subscribe.

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

  23. Sweet bonanza slot oyunları arasında en popüler olanlardan bir tanesidir. Oyun teması, oynanışı vb. birçok özelliği ile Sweet Bonanza günümüzde en çok oynanan ve kazandıran slot oyunları arasında yer alır. . Sweet Bonanza

  24. Papaz büyüsünün strüktürlması yahut bozulması dair
    vukuf peyda etmek yahut bu uygulamaların strüktürlması konusunda lütuf kaplamak istiyorsanız Musa Salah’ı aramalkaloriız.

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

  25. Asking questions are actually good thing if you are not understanding anything completely,
    however this article gives pleasant understanding yet.

    Free Account | New Free Accounts And Password List
    free accounts

  26. Hi there! I know this is sort of off-topic however I needed to ask.

    Does building a well-established website like yours require a massive amount work?

    I’m brand new to running a blog but I do write in my diary every day.
    I’d like to start a blog so I will be able to share my own experience
    and views online. Please let me know if you have any recommendations or tips for brand new aspiring bloggers.
    Thankyou!
    Free Account | New Free Accounts And Password List
    free accounts

  27. I really love your website.. Great colors & theme. Did you
    create this site yourself? Please reply back as I’m attempting to create my own personal blog and would like to know where you got this from or exactly what the theme
    is called. Thanks!
    Free Account | New Free Accounts And Password List
    free accounts

  28. This is the right web site for anyone who would like to understand this topic.
    You know a whole lot its almost hard to argue with you (not that I personally will need to…HaHa).
    You definitely put a brand new spin on a topic that has been discussed for many years.

    Great stuff, just excellent!
    Free Account | New Free Accounts And Password List
    free accounts

  29. I know this website presents quality dependent posts and additional stuff, is there any
    other web site which provides these kinds of things in quality?

    Free Account | New Free Accounts And Password List
    free accounts

  30. Thank you, I have just been looking for information approximately this topic for
    ages and yours is the greatest I have came upon till now.
    However, what about the bottom line? Are you positive about
    the source?
    Free Account | New Free Accounts And Password List
    free accounts

  31. I have been exploring for a little bit for any high quality articles
    or blog posts in this kind of house . Exploring in Yahoo I finally stumbled upon this
    site. Studying this info So i am happy to show that I have an incredibly good uncanny feeling I found out exactly what I needed.
    I most no doubt will make sure to do not overlook this web site
    and provides it a glance on a relentless basis.

    Free Account | New Free Accounts And Password List
    free accounts

  32. Attractive section of content. I just stumbled upon your web site and in accession capital
    to assert that I acquire in fact enjoyed account your weblog posts.
    Any way I’ll be subscribing on your feeds or even I fulfillment you
    get admission to persistently rapidly.
    Free Account | New Free Accounts And Password List
    free accounts

  33. Hi my family member! I wish to say that this article is awesome, great written and
    include approximately all significant infos.
    I would like to see extra posts like this
    .
    Free Account | New Free Accounts And Password List
    free accounts

Comments are closed.