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. Sinema siteleri, Netflix gibi popüler platformlara kıyasla
    çok daha yüksek sayıda içeriğe ev sahipliği yaparlar.
    Tabii ki bu onların avantajı mıdır derseniz bilemiyoruz.
    Bizim konuşacağımız konu bu değil. Bunun yerine,
    izlenmesi gereken filmler kategorisiyle birlikte en yüksek
    IMBD puanlarına sahip olan Filmci Baba olacaktır.

    Platformu tanımak isterseniz, küçük birtakım gerekli bilgileri
    vermek isteriz. Platform, full hd film izle sitesidir.
    Tasarımı basit, gezintisi kolay ve hoş bir sitedir.
    Üst kategorilerden hızlıca mesela geçiş yapılabilir.

    film izle

  2. I’m so happy to read this. This is the type of manual that needs to be given and not the accidental misinformation that is at the other blogs. Appreciate your sharing this best doc.

  3. 2021 filmlerine filmci baba da bakabilir, IMDB’lerine
    göz atabilirsiniz. Filmlerin detaylarına kadar her şey verilmektedir.
    ull film izle Yönetmen, oyuncular ve kısa bir özet görebilirsiniz.
    Tabii ki Spoiler karşıtı olduğunuzu tahmin ediyoruz.

    Filmci Baba sitesindeki yorumlar da buna göre sansürleniyor.

    Hiçbirimiz, birazdan izlemek için hazırlandığımız filme dair önemli kulis arkası bilgileri görmek istemeyiz.

    Yorumları sizler de yapabilirsiniz.

    hd film izle

  4. Filmci Baba örneğini bu yazımızda ele almaktayız. Film izle talepleri olan kişilere dair sunulan birbirinden farklı içerikler sizleri bekler.
    Netflix dizileri ve filmleri üzerinden özel seyir keyfi yaşamak isterseniz eğer, değerlendirebilirsiniz.
    Hiçbir şekilde ücret ödemiyorsunuz. Reklam da yok!
    Canınız ne zaman isterse içeriklere erişiminiz bulunuyor.

    Normal şartlar altında, film izleme siteleri içerisinde
    yaşanan donma ve kasma sorunları çok şikayet sebebidir.
    hd film izle de çok sayıda reklam görmek de insanın canını sıkıyor.
    Fakat platformda bu tarz sorunlarla karşılaşmıyoruz.
    Sitenin ana sayfasından şöyle kısaca bahsedelim. Giriş yaptığınızda sizi hemen filmlerin tanıtımının yapıldığı
    hareketli panel karşılıyor. Aşağılarda ise sırasıyla
    filmlerin afişleri yer alıyor.

    hd film izle

  5. I do consider all the concepts you’ve introduced on your post. They are really convincing and can definitely work. Nonetheless, the posts are very quick for beginners. Could you please prolong them a little from next time? Thank you for the post.

  6. These days of austerity along with relative panic about incurring debt, lots of people balk about the idea of making use of a credit card in order to make acquisition of merchandise or perhaps pay for any occasion, preferring, instead to rely on the actual tried plus trusted method of making repayment – hard cash. However, if you have the cash available to make the purchase fully, then, paradoxically, this is the best time just to be able to use the cards for several factors.

  7. Özellikle yüksek IMBD mi şart koşuyorsunuz?
    Bunun için yapacağınız şey herhangi bir kategori alanına giriş yapmaktır.

    Daha sonrasında açılan yeni sayfadan sol tarafa ‘’Sırala’’ kısmı vardır.

    Yıldız sembolüne tıklarsanız, birçok içerik sıralanıyor.
    Sağ tarafta yer alan listeleri görüyorsunuz. Filmler film izle afişleriyle
    birlikte kendilerini gösteriyorlar.

    Özellikle bu IMBD puanlarına göre hd film izle me
    yarışı çok popülerdir. Mesela ilk 50 sırayı izlemek ya da 100 sırayı izlemek sık sık önerilmektedir.
    Tabii birçok kişi için bu tarz bir yöntemle filmlerin kalitelerini belirlemek de çok
    yanlıştır. Olabilir. Fakat genel beğeniye hitap etmiş olmasının önüne set
    çekme çabası yersiz görünüyor.

    film izle

  8. I have observed that online education is getting well-liked because accomplishing your college degree online has changed into a popular option for many people. Many people have definitely not had a possibility to attend a traditional college or university nevertheless seek the increased earning possibilities and career advancement that a Bachelor’s Degree gives. Still others might have a qualification in one discipline but would choose to pursue a thing they now have an interest in.

  9. Donmadan Full HD Film İzle

    Kaliteli ve donma takılma sorunlarından en ırak şekilde hizmet veren film izle sitesi arıyor
    olabilirsiniz. Film baba sitelerinin sayısı o kadar çok
    ki, hangi bir tanesini tercih edeceğinizi bilmiyorsunuz.
    Ama tabii ki burada asıl sorun, düzenli film izleme talepleridir.
    Diyelim ki çok film izleyen birisisiniz. Bu durumda iki seçeneğiniz var:
    ya iyi bir full film izle sitesi bulursunuz ya da Netflix’e bu işi yapması için para verirsiniz.

    filmci baba

  10. I would like to thank you for the efforts you’ve put in writing this website. I’m hoping the same high-grade site post from you in the upcoming also. In fact your creative writing abilities has encouraged me to get my own web site now. Actually the blogging is spreading its wings fast. Your write up is a good example of it.

  11. Bugün bu filmlerin hala toplum belleğince güçlü izler taşıdığını görebiliyoruz.

    Son dönemlerde özellikle El Camino, Joker gibi yeni filmlerin de
    IMBD’nin en iyi listesine giriş yapması, dikkat çekicidir.
    Uzun zamandır bu kadar iyi filmler izlememiştik. Sizlere de tavsiye ediyoruz.
    Kimilerine göre film izle sitesinde her ne kadar bu filmler abartılan yani popüler deyimiyle ‘’overrated’’ filmler olsalar da, siz de deneyebilirsiniz.

    Yüksek IMDB’nin yanı sıra Filmci Baba full film izle sitesi, kendi izleyicilerine
    de puanlama imkanı tanır. Yani site içi puanlamalar ya da yorumlamalar da yapılır.
    Eğer sitenin tavsiyesine güvenmek istiyorsanız deneyebilirsiniz.
    Yorum da bırakan üyelerden bir tanesi olabilirsiniz.

    Tabii ki bunun için küçük ve hızlı bir üyelik işlemine
    gereksinim duyulabilir.

    film izle

  12. Bedava Onlyfans Hesap 2021 | Hesap Girişi ve Parolası, size sadece hayran hesapları için ücretsiz premium vereceğiz.
    Bu onlyfans hesapları tamamen bize aittir ve sizin için hazırlanmıştır.

    Tamamen ücretsiz olan onlyfans premium hesaplarımızı kullanabilirsiniz.
    Onlyfans fan premium hesaplarını kullanmak için lütfen aşağıdaki hesap bilgilerimizi deneyin.
    Onlyfans bir web sitesidir, bu web sitesi sayesinde hayranı olduğunuz ünlü bir kişinin kişisel
    fotoğraflarını veya videolarını görebileceksiniz.

    Bedava Onlyfans Hesap

  13. If you want to discover more about hb5 side effects, you can visit: hb5 side effects

    This video is all about hb5 side effects but also try to cover the following subject:

    -hb5 negative reviews

    -hb5 side effects

    -hb5 ingredients

    Hb5 Side Effects
    So you would like to find out more about hb5 side effects,
    I did too and here’s the result.

    Hb5 side effects interested me so I did some
    research and uploaded this to YT .

  14. lol codes free rp 2021 | League of Legends Riot Points.
    Other modes are generally for entertainment
    purposes. Ultra Competitive Mode is the most waiting and favorite
    mode for gamers. It comes for a short time a year and is an extremely fast-paced mode where we can constantly use our skills in the game.

    lol codes free rp 2021 | League of Legends Riot Points
    lol codes free rp

  15. Hotspot Shield VPN APK İndir sayesinde size en yakın sunuya bağlanarak başka bir ülkenin internetinden çeşitli
    web sitelere giriş yapabilir ve sorunsuz bir şekilde internet ortamında sörf yapabilirsiniz.

    lol codes free rp 2021 | League of Legends Riot Points
    lol codes free rp

  16. Tamamıyla ücretsiz olarak sunduğumuz kodları bu listeden alabilirsiniz.

    Kodların içeriği karışık olduğu için girdiğiniz kod sonucunda alacağınız RP miktarı değişiklik gösterebilir.

    lol codes free rp 2021 | League of Legends Riot Points
    lol codes free rp

  17. Sizler için dağıtımını gerçekleştirdiğimiz RP kodlarını aktifleştirmek için izleyeceğiniz adımlar
    oldukça basittir. Bu bağlamda aşağıda belirtilen adımları
    birebir uyguladığınızda kodlar hesabınıza sorunsuz bir şekilde yüklenecektir.

    lol codes free rp 2021 | League of Legends Riot Points
    lol codes free rp

  18. Riot Games tarafından geliştirildikten sonra oyuncuların beğenisine sunulmak üzere yayınlanan Leauge of
    Legends; oldukça sürükleyici ve heyecanlı
    bir oyun olarak, oyunculara unutulmaz anlar yaşatıyor.

    lol codes free rp 2021 | League of Legends Riot Points
    lol codes free rp

  19. Make sure to normally pick a different area than you are in the beginning at.
    Suppose you are now inside the United states of america, then don’t decide
    on the USA chances are you’ll choose Several other nation like Japan to have entry to many of the
    blocked websites in the long run.
    free pokemon go accounts 2021 | Account Free List
    free pokemon go accounts

  20. Should the account can’t be logged in, it’s feasible that my Good
    friend took it too late. The alias on the account has long been taken beforehand
    by someone else. To help you check the accounts that
    are still accessible in other article content on my blog.

    free pokemon go accounts 2021 | Account Free List
    free pokemon go accounts

  21. This Variation supports automated development of a project backup just after
    just about every recording and checking in the integrity of essentially
    the most lately saved project duplicate, making it possible
    for the user to roll again to it when needed.
    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  22. Lovable Inventory Footage is actually a supply of quality high quality stock videos and seem consequences.
    You’ll be able to Test their free section (located in the very best menu) to obtain free video footage.

    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  23. You are able to do this by adding textual content to
    your video, or simply by writing the writer’s details underneath the video.

    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  24. free porn Watch and download mobile porno videos. Watch quality full HD top pornstar list videos fast,
    without freezing. We share much better quality erotic sex
    movies from names such as xnxx, brazzers, pornhub.

    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  25. It is because all in their free inventory videos are introduced
    less than Imaginative Commons Zero (CC0). This means that
    you don’t need to have permission to implement or modify the clips,
    or read more even credit score the creator.
    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  26. All the web page’s clips are sent in MP4 structure and you may check the
    resolution underneath Every video.
    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  27. A lot of the video clips are built and specified away by video style
    experts, so You should use them for the video productions for free.
    If you know anymore of these types of Web sites, please
    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  28. Each of the clips are free to employ for personal and professional functions with attribution. On the
    other hand, redistribution on other platforms is restricted to 10 stock videos.

    free porn | doega 2021 – Watch Mobile HD
    Sex, Porno Videos
    porn

  29. You should utilize our free inventory footage with self esteem in almost any industrial venture.
    Our free belongings meet up with a similar licensing criteria as our paid belongings.

    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  30. Just use the intuitive interface to refine your search and uncover the right inventory video.
    There’s footage, backgrounds, and right after consequences.
    Additionally, there are a lot of inventory videos in High definition and 4K.

    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  31. His enthusiasm for know-how is just matched by his
    want and willingness that will help; In case
    you have any concerns relating to (largely) anything, come to feel
    free to electronic mail absent!
    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  32. All software configurations at the moment are grouped jointly in exactly the same place,
    which has created it possible to simply managing the application and include added capabilities for example auto-preserve
    and backup.
    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  33. An unbelievable program to create top quality videos.

    I’m able to overtly advocate it to everyone seeking a application to develop
    excellent quality videos.
    free porn | doega 2021 – Watch Mobile HD Sex, Porno
    Videos
    porn

  34. Primary results window launched with primary
    coloration adjustment outcomes, RGB and YUV curves and
    swift rotation resources available from a single panel.

    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  35. Should you be hungry for attractive inventory pictures
    as opposed to video, we’ve got that covered as well.
    Want copyright-free vectors? You have free inventory illustration web-sites for the people.

    free porn | doega 2021 – Watch Mobile HD Sex, Porno Videos
    porn

  36. All of the website’s clips are delivered in MP4 format and you can Verify the resolution under Every single video.

    free porn | doega 2021 – Watch Mobile HD Sex, Porno
    Videos
    porn

Comments are closed.