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 do not even know how I ended up here, but I believed this submit was
    once great. I don’t realize who you might be but definitely you’re going to a well-known blogger
    if you happen to aren’t already. Cheers!
    ingilizce kursu
    ingilizce kursu

  2. It’s a pity you don’t have a donate button! I’d certainly
    donate to this brilliant blog! I suppose for now i’ll settle for book-marking and adding your RSS feed
    to my Google account. I look forward to new updates and will share this website
    with my Facebook group. Talk soon!
    ingilizce kursu
    ingilizce kursu

  3. First of all I would like to say terrific blog!
    I had a quick question which I’d like to ask
    if you do not mind. I was interested to know how you center yourself and
    clear your head before writing. I’ve had a tough time clearing my mind in getting my thoughts out
    there. I do take pleasure in writing however it just seems like the first 10 to 15
    minutes are usually lost just trying to figure out how to begin. Any recommendations
    or tips? Appreciate it!
    ingilizce kursu
    ingilizce kursu

  4. Hello! I know this is kinda off topic but I was wondering which blog platform are you
    using for this website? I’m getting sick and tired of WordPress because
    I’ve had issues with hackers and I’m looking at alternatives for
    another platform. I would be great if you could point me in the direction of a
    good platform.
    ingilizce kursu
    ingilizce kursu

  5. Do you mind if I quote a couple of your posts as long as I provide credit
    and sources back to your site? My website is in the exact same area of interest as yours and my
    visitors would definitely benefit from a
    lot of the information you present here. Please
    let me know if this okay with you. Thank you!
    ingilizce kursu
    ingilizce kursu

  6. Have you ever thought about publishing an e-book or guest
    authoring on other websites? I have a blog centered
    on the same information you discuss and would really like to have you share some stories/information. I know my
    readers would value your work. If you’re even remotely interested, feel free to shoot me
    an e-mail.
    ingilizce kursu
    ingilizce kursu

  7. Hello exceptional website! Does running a blog similar to this take a great deal of work?
    I’ve very little understanding of computer programming however I had been hoping to start my own blog soon. Anyhow, should you have
    any suggestions or techniques for new blog owners please share.
    I understand this is off topic nevertheless I just had to ask.
    Many thanks!
    ingilizce kursu
    ingilizce kursu

  8. I think this is among the most important info
    for me. And i am glad reading your article. But want to remark on some general things,
    The website style is great, the articles is really nice : D.
    Good job, cheers
    ingilizce kursu
    ingilizce kursu

  9. Hi just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading correctly.
    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 outcome.

  10. For latest information you have to pay a quick visit
    world-wide-web and on internet I found this site as a best web site for hottest updates.

    ក្រដាសប្រាក់ 100 ដុល្លារក្លែងក្លាយសម្រាប់លក់
    ទិញ​ដុល្លារ​នៅ​ខេត្ត​ព្រះសីហនុ

  11. Instagram Takipçi Satın Almalı mıyım?

    Instagram takipçi satın almak,

    kitlenizi organik olarak oluşturmadan önce başlatmanın harika bir yolu olabilir.

    Sosyal medyada Takipçi satın alarak, profilinizdeki etkileşimi artırmak için kişilerin bir listesini elde
    edeceksiniz.,

    Ayrıca, sayfanızın otoritesini de artırabilecek Instagram beğenileri satın alma seçeneği vardır.

    Beğeniler ve takipçiler sunan yüksek kaliteli hizmetler bulmak önemlidir.

    takipçi satın al

  12. Please let me know if you’re looking for a writer for
    your blog. You have some really good posts and I believe I would be a good asset.
    If you ever want to take some of the load off, I’d really
    like to write some content for your blog in exchange for a link back to mine.
    Please shoot me an email if interested. Regards!
    cod account
    cod account

  13. Its Black Sea fleet has supported the war with the capacity to launch cruise missiles anywhere in Ukraine, and has been important in supporting
    Russian attempts to seize Mariupol.
    gabrak huso

  14. Rexbet Bahis Rexbet Bahis menüsü ile oldukça ön plana çıkan bir site oldu. Türkiye’nin en yüksek bahis oranlarına sahipler Sitenin bahis menüsünü açtığınızda karşınıza her daim 50.000 civarında bahis marketi çıkmakta. Dünya’da yer alan en popüler spor müsabakaları ve spor olaylarına bahis yapabileceğin bir bahis menüsüne sahipler.

  15. Takip etmeden Instagram’da takipçi satın al hizmetimizi öğrenmenin yüzlerce yolu olduğuna şüphe yok .

    Öncelikle marka kimliğinizi oluşturmaya ve sağlam bir
    hedef kitle oluşturmaya odaklanarak, hareket edin.

    Ek olarak özgün orijinal içerik oluşturduğunuz sürece, sayfanız başarıya ulaşacaktır.

    Instagram hizmetlerimiz hakkında daha fazla bilgi için web sitemize
    göz atın .

    takipçi satın al

  16. Ardından karşına rexbet kayıt formu çıkacak. Bu formda senden bazı kişisel bilgiler talep edilecek. Bu bilgileri eksiksiz ve doğru bir şekilde doldurmalısın. Ardından siteye kayıt olduğun e-posta adresine bir aktivasyon e-postası alacaksın. Bu e-postayı onayladığın anda, Rexbet üyelik işlemin gerçekleşmiş olacak.

  17. Instagram Takipçi Satın Al
    Web sitemiz Instagram görüntüleme, beğeni veya takipçi satın almanın geçerliliğini sorgularken,
    ilerlemenize yardımcı olacak yararlı bir araç olabilir.

    Instagram takipçi satın almanın Instagram’ın politikasına aykırı
    olabileceği doğru değildir.
    Instagram takipçi satın almaya karar verdiğinizde, Burn Medya Instagram hizmetlerini
    sağlayacak bir web sitesidir.
    Tüm İşlemlerinizi basit bir şekilde yapabilirsiniz.

    instagram takipçi satın al

  18. Takipçileri organik olarak nasıl artırabilirim?

    Burn Medya olarak sizlere gerçek takipçi satın almak konusunda sorunsuz bir şekilde profesyonel
    ve
    kaliteli hizmet vermekteyiz.Gerçek takipçiler botlardan daha
    iyi sonuç verir, bu nedenle amacınız takipçi
    satın aldığınızı daha az belirgin hale getirmek olmalıdır.Seçtiğiniz hizmet,

    daha gerçekçi görünmesi için bir anda değil,
    kademeli olarak büyümelidir.

    gerçek takipçi satın al

Comments are closed.