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. Thanks for finally talking about > 10,000 Nights at a Casino –
    Using Python to test my Roulette Strategy – Phil
    Strazzulla's Blog free accounts

  2. Heya i am for the primary time here. I came across this board and I
    in finding It truly useful & it helped me out much.
    I hope to offer one thing again and help others like
    you helped me.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  3. Thanks for finally talking about > 10,000 Nights at a Casino – Using Python to test my Roulette Strategy – Phil Strazzulla's Blog free accounts

  4. Hello, constantly i used to check webpage posts here in the early hours in the
    daylight, because i love to find out more and more.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  5. Hi it’s me, I am also visiting this site on a regular basis, this web
    site is truly nice and the visitors are really sharing nice thoughts.

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

  6. I do consider all the ideas you have offered for your post.
    They are very convincing and can definitely work. Still, the posts are very short for starters.
    May you please extend them a little from next time?

    Thanks for the post.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  7. Hi there! Someone in my Facebook group shared this site with us so I came to look it over.
    I’m definitely enjoying the information. I’m bookmarking and will be tweeting
    this to my followers! Great blog and brilliant design and style.

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

  8. Wonderful work! This is the type of info that should be
    shared across the net. Shame on Google for now not positioning this put up upper!
    Come on over and discuss with my web site . Thanks =)
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  9. Wonderful beat ! I would like to apprentice
    while you amend your web site, how can i subscribe for a blog website?
    The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast
    provided bright clear concept
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  10. Hey! Do you use Twitter? I’d like to follow
    you if that would be okay. I’m absolutely enjoying your
    blog and look forward to new updates.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  11. I just like the valuable info you supply in your articles.
    I’ll bookmark your blog and check once more right here regularly.
    I’m rather certain I will learn a lot of new stuff right right here!
    Good luck for the next!
    Free Accounts | The Most Reliable Free Account Sharing
    Site
    free accounts

  12. Pretty great post. I just stumbled upon your blog and wanted to say that I have really loved surfing around
    your weblog posts. After all I’ll be subscribing on your rss feed
    and I hope you write again soon!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  13. Hi there just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading properly.

    I’m not sure why but I think its a linking issue. I’ve tried it in two different internet
    browsers and both show the same results.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  14. Papaz büyüsünün konstrüksiyonlması evet da bozulması hususunda bili peyda etmek evet da
    bu uygulamaların dokumalması konusunda medet kısaltmak istiyorsanız maslahatinin ehli
    medyumları aramalısınız.
    Papaz Büyüsü En Etkili Kara Büyümüdür ?
    papaz büyüsü

  15. My spouse and I absolutely love your blog and find nearly all of
    your post’s to be just what I’m looking for.
    Do you offer guest writers to write content in your case?
    I wouldn’t mind producing a post or elaborating on a lot of the
    subjects you write in relation to here. Again, awesome web log!

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

  16. My partner and I stumbled over here different web page and thought I might as well
    check things out. I like what I see so now i’m following you.
    Look forward to going over your web page repeatedly.

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

  17. Terrific article! This is the type of info that should be shared around the web.
    Disgrace on the seek engines for now not positioning this put up higher!
    Come on over and talk over with my website . Thank you =)
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  18. Hey there would you mind stating which blog platform you’re using?

    I’m planning to start my own blog in the near future
    but I’m having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design seems
    different then most blogs and I’m looking for something unique.
    P.S Apologies for being off-topic but I had to ask!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

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

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

  20. Hello there! This post couldn’t be written much better!
    Looking through this article reminds me of my
    previous roommate! He continually kept preaching about this.
    I am going to send this information to him. Fairly certain he will have a great read.
    Thank you for sharing!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  21. Hmm is anyone else encountering problems with the images on this
    blog loading? I’m trying to find out if its a problem on my end or if it’s the
    blog. Any feedback would be greatly appreciated.

  22. I do not even know how I ended up here, but I thought this post was good.

    I don’t know who you are but certainly you are going to a famous blogger
    if you aren’t already 😉 Cheers!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  23. Oh my goodness! Impressive article dude! Thank you
    so much, However I am having problems with your RSS. I don’t understand the reason why I
    am unable to subscribe to it. Is there anyone else getting the
    same RSS issues? Anyone that knows the solution can you kindly
    respond? Thanks!!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  24. I loved as much as you will receive carried
    out right here. The sketch is attractive, your authored
    subject matter stylish. nonetheless, you command get got
    an edginess over that you wish be delivering the following.
    unwell unquestionably come more formerly again since exactly the same nearly very often inside case you shield this hike.

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

  25. Hi, all the time i used to check website posts here in the early hours in the break of day, as
    i enjoy to gain knowledge of more and more.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  26. For hottest news you have to pay a quick visit internet and on internet I found this site as a finest website for most recent updates.

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

  27. Sigortalı ofis taşıma şirketleri sayısı bölgede sürekli olarak artmaktadır. Özellikle son yıllarda hızla büyüyen sektörde bilinçlenen vatandaşlar sigortalı nakliye hizmeti olmayan firmaları tercih etmekten kaçınmaktadır. Soylu nakliyat firması olarak anlaşma yaptığımız acente sayesinde taşıma hizmetinden önce hemen poliçe hazırlayıp müşterilerimize tamamen güvenilir ofis taşımacılığı hizmeti vermekteyiz. Sigortalı ofis nakliyesi hizmetlerinde Soylu nakliye firmamız bölgede her zaman ilk tercih edilen firmalardan bir tanesi olacaktır. ofis taşıma

  28. We’re a group of volunteers and opening a new scheme in our community.
    Your site provided us with helpful information to work on. You
    have performed an impressive activity and our entire community
    will be thankful to you.

  29. vazgeçme ederek çekip gitti ise papaz büyüsü ile revan kocayı
    aptal getirme akıllıca ve tamamlamak bir şekilde tamamlanırsa 2 hafta kabil
    endamsız bir sürede aptal gelmesi kabil olabilir.

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

  30. I was recommended this blog by my cousin. I’m not sure whether this post is
    written by him as no one else know such detailed about my
    problem. You’re amazing! Thanks!
    Free Accounts | The Most Reliable Free Account Sharing
    Site
    free accounts

  31. Şirketimizde verilen depolama hizmeti yeriniz olmaması durumunda ya da envanterinizin azaltılması gereken durumlarda size yardımcı olacaktır. Depolama işlemi oldukça maliyetli bir iştir. Hem uygun ortam ayarlayarak masraflarını karşılamak hem de güvenlik uygulamalarını yürütmek oldukça masraflıdır. Hal böyle olunca da sigortalı depolama hizmeti veren lojistik firmaları ise ilgi görmektedir. Her türlü eşyanızı ve ürününüzü en uygun saklama koşullarında istediğiniz süre boyunca depolayabiliriz. Eşya Depolama

  32. Its such as you read my mind! You appear to understand a lot approximately this, like you wrote the e
    book in it or something. I think that you just can do with a few % to force the message home a little
    bit, however instead of that, this is excellent blog.
    A fantastic read. I will certainly be back.

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

  33. Its like you read my thoughts! You seem to grasp a lot approximately this, such as you wrote the guide
    in it or something. I feel that you just can do with some percent to power the message home
    a little bit, however other than that, that
    is magnificent blog. A fantastic read. I’ll definitely
    be back.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  34. I must thank you for the efforts you have put in penning this website.

    I’m hoping to see the same high-grade blog posts by you later on as well.
    In truth, your creative writing abilities has motivated me to get my
    own website now 😉
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

Comments are closed.