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. Center aged mature senior girl Keeping paper Invoice or letter applying
    laptop pc in your house for creating on line payments on Internet site, calculating
    monetary taxes price cost, reviewing financial institution account.

    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  2. Oh my goodness! Awesome article dude! Thank you so much, However I am having
    issues with your RSS. I don’t understand the reason why I cannot subscribe
    to it. Is there anybody else having the same RSS problems?
    Anybody who knows the answer can you kindly respond? Thanks!!

  3. bedava hesaplar arkadaşlar arasında çok fazla tartışma konusu olan bir konudur.
    Genelde insanlar oynadıkları oyunda en üst seviye karakter, eşya isterler.
    Para ile satın alıp daha fazla keyif almak isterler.
    Biz burada ücretsiz hesapları bedava veriyoruz, beleş hesap
    dağıtım merkezi diyebilirsiniz bizlere. Giriceksin web siteye sonra hangi hesabı almak istiyorsan o konuya giriceksin. Dilediğin gibi free
    hesap için üye olmadan, kayıt olmadan ücretsiz al ve
    kullan işte bukadar kolay.

    bedava hesap

  4. Bedava hesap platforumlarını sizinle paylaşıyorum.
    İstediğiniz siteye giriş yapıp BEDAVA
    HESAP elde edebilirsiniz. Para pul ile satılmıyor tamamen ücretsiz ve beleş
    olan bu siteleri paylaşmamda ki amacım bütün arkadaşlarımız
    yararlansın bedava hesaplara ulaşsın istiyorum.

    Eğer bir oyun oynuyorsanız istediğiniz seviye lvl deki hesapları yada premium
    hesapları bedava al kullan.

    bedava hesaplar

  5. superslot ซุปเปอร์สล็อต
    Superslot เว็บสล็อตแตกง่าย ยอดนิยม ที่แจกเครดิตฟรี 50 บาท แค่สมัคร เล่นง่ายๆ ได้เงินจริง “ซุปเปอร์สล็อต”
    เล่นเกมสล็อต ได้เงินจริง ระบบเสถียรดีที่สุด ไม่ต้องแชร์ wallet สมัครสล็อต ใช้วอลเล็ต ฝาก-ถอน สมัคร SLOTSUPER
    ด้วยระบบออโต้ ที่ทำง่ายๆได้ด้วยตัวเอง ขั้นตอนมีไม่กี่ขั้นตอน
    สามารถทำได้ด้วยตัวเองตลอด 24 ชั่วโมง ที่ผู้ให้บริการเกมสล็อตออนไลน์ อย่างครบวงจร
    แจ็คพอตแตกไว มี สล็อต ยิงปลา
    บิงโก คาสิโน และเกมอื่นๆ แบบครบครันSuperslot

  6. Freepik Organization does not transfer nor share gathered private information with 3rd events exterior to
    the business. The information provided will only be employed for identifying the Person and handling
    the account on the web site.
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  7. Heya this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if
    you have to manually code with HTML. I’m starting a blog soon but have no coding expertise so I
    wanted to get advice from someone with experience.

    Any help would be enormously appreciated!

  8. You have made ѕome decent poіnts there. I checked оn the web foг
    additional infоrmation about tһe issue and fօund most individuals ԝill ɡo alongg
    ѡith y᧐ur views on tһiѕ web site.

  9. Would you prefer to transfer them to your enterprise profile?
    Do not present all over again Get rolling We identified a license background,
    credits, or subscription system in your personal profile.
    Would you want to transfer them to your enterprise profile?
    Never show all over again Get started.
    Freepik Free Account 2021 | New Premium Username
    Password
    Freepik Free Account

  10. Each time a Person visits and works by using our Web-site, it stores and collects data quickly utilizing technologies or automated instruments.

    On the whole, this gathered details is associated with specialized specifics of the
    product, browsing action and use styles.
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  11. Hello! I know this is somewhat off topic but I wass wondering which
    blog platform are you using for this site? I’m
    getting sick and tired of WordPress because I’ve had issues with hackers and
    I’m looking at alternatives for anotyher platform.
    I would be great if you coul poiont me in the direction of a good platform.

    My webpage: 色情

  12. What’s Taking place i am new to this, I stumbled upon this I have discovered It absolutely helpful and it has helped me out loads.
    I hope to give a contribution & help other users like its aided me.
    Great job.

  13. Any information obtained by Freepik Company might
    be saved in a very file of Freepik Business and
    can be applied basically to respond to inquiries,
    recommendations or issues despatched by the web site’s Users..

    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Accountm/members/freepik-free-accounts/

  14. Vat refund cellular application web page onboard monitor template.

    people at tax free desk in airport return income for paying for.
    folks conserve finances, money notion. cartoon persons vector illustration.
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  15. “สตูดิโอแต่งงาน
    สตูดิโอถ่ายรูปแต่งงาน
    ถ่ายรูปแต่งงาน
    ถ่ายพรีเวดดิ้ง
    ถ่ายรูปพรีเวดดิ้ง
    pre wedding
    ชุดแต่งงาน
    ชุดเจ้าสาว
    ถ่ายภาพงานแต่งงาน
    ถ่ายภาพแต่งงาน
    แพคเกจแต่งงาน
    โปรโมชั่นแต่งงาน
    แต่งงานราคาถูก”ถ่ายพรีเวดดิ้ง

  16. Despite the fact that your person account might be
    valid for both Internet websites, high quality memberships do not operate in precisely the same way.
    When you get a top quality plan for Flaticon, this
    tends to .
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  17. bedava hesap servisimiz günün 7/24 saati ve gününde çalışmaktadır.
    Parasız ve ücretsiz olması siz değerli arkadaşlarımızın yüzünü güldürdüğünü biliyorum.
    Güncel bedava hesaplar ile doyasıya hesap alımı yapabilirsin. Günün her saati yeni free hesaplar paylaşıyoruz.
    Yorum yapın ve istediğiniz hesabı kişiye özel gönderelim.

    bedava hesap

  18. With all the free Freepik Top quality Account that we offer Edza, you will be
    able to Possess a far better and smooth expertise on Freepik.

    Platforms and applications are an indispensable A part of our daily life to really make it easier,
    and with quality accounts, your situation receives ten instances much better.
    Your experience on Freepik will be better while using the top quality
    free Freepick account we provide.
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  19. Click on the button to perspective the entire listing of
    all verified promo codes for Freepik all of sudden. You could copy and paste each code
    to discover the greatest price reduction for the buy.
    five confirmed coupon codes. Applied 692 moments. Previous utilized 14h
    ago. Open up All Codes
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  20. This authorized textual content applies to the knowledge we
    collect from you if you visit our Internet site, as in the subsequent circumstances: user registration, utilizing any of our products and services,
    collaboration, subscription to our newsletters or personal
    facts provided when filling in on the web sorts.
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  21. A sub-processor is an external knowledge processor contracted by Freepik Company,
    who has long been granted access to details (which can be personal) about customers and collaborators and who can course of action it.

    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  22. Ücretsiz bir hesap paylaşım sitesi; internet sayfaları, uygulamalar, çevrimiçi uygulamalar ve diğer birçok alan.
    Bedava bir hesap paylaşım sitesi; internet sayfaları, uygulamalar, çevrimiçi uygulamalar
    ve diğer birçok alan.

    bedava hesap

  23. Step one: Discover your Freepik lower price code on this website page and click the button to look
    at the code. The promo code will probably be quickly copied on the clipboard
    on your smartphone or Laptop or computer.
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  24. In case you are into graphic design or want to start
    out graphic coming up with and do not know where to start out, Freepik top quality is the best choice to suit your needs.
    As Edza, we are below that can assist you by getting
    a free Freepik high quality account.
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  25. The following sections tackle the gathering and processing of Consumers’ own facts
    as a result of any of the assignments operate by Freepik Company, like any
    in read more their subdomains and sections.

    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  26. Bedava Free Fire Hesap 2021 | Garena Hesap ve
    Şifre, Bu içerikte sizlere bedava ateş
    oyunu ve bedava hesaplar hakkında bilgi vereceğiz. Serbest atış
    çok güzel bir oyun olduğu kadar popüler bir oyun. Çoğu insan serbest atış oynarken heyecanlanır ve daha fazla hata yapar.
    Onlardan biri olmayın ve heyecanlanmadan güzelce oynamaya çalışın. Neden? Çünkü bedava
    ateş turnuvalarında para veya değerli hediyeler kazanabilirsiniz.
    Gerçekten değerli bir şey kazanmak istiyorsanız, önce turnuvaya
    katılmalı ve kazanmalısınız. Bunun için sıkı bir antrenman yapmalısınız.

    Bedava Free Fire Hesap

  27. Together with the free Freepik Premium Account that we provide Edza, you will be able to Use a far better and sleek expertise on Freepik.
    Platforms and purposes are an indispensable Section of our everyday life
    to make it easier, and with high quality accounts, the situation will get 10 occasions superior.
    Your expertise on Freepik are going to be greater while using the high quality free Freepick account we provide.

    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  28. Instagram Follower Kaufen
    Instagram-Follower kaufen: mehr Trust und Reichweite für Ihre Brand
    Das Ziel, die Reichweite auf Instagram zu erhöhen,
    ist für viele Unternehmen und Influencer häufig nur schwer
    zu erreichen. Follower zu kaufen ist eine bewährte Methode, um die Instagram-Präsenz aufzubessern und mehr Menschen und potenzielle Kunden im beliebten sozialen Netzwerk
    zu erreichen.
    Instagram Follower Kaufen

  29. As Edza, our greatest intent is just one factor: earning our visitors happy.
    For Lots of individuals, paying for a System or an app
    would seem inconvenient, However they typically do not desire
    to miss out on exactly what the System gives to them.

    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  30. Bedava Steam Kodları Ücretsiz Steam Keys 2021 | Yeni Free Wallet, Oyun Kodları ve Keyleri, yeni steam kodları veriyoruz.
    Ücretsiz ve en iyi buhar kodlarını arıyorsanız doğru
    sayfadasınız. Steam, dünyadaki en popüler uygulamalardan biridir.

    Bu uygulama aslında bir oyun pazarı gibi bir şey.

    Yani bu oyun pazarı dünyadaki en popüler oyun pazarıdır.
    Bir oyun arıyorsanız ve bulamıyorsanız, onu
    steam’de arayarak bulabilirsiniz. Aslında, google’da bir oyun aradığınızda, zaten steam’i göreceksiniz.
    Steam, yıllardır çok kaliteli ve popüler bir şirket.
    Bu firma hakkında daha fazla bilgi arıyorsanız, bu bilgiyi tekrar bulabilirsiniz.

    Veya sadece buhar kodları arıyorsanız, aşağıdaki listelerimizdeki onlarca koddan birini
    alabilirsiniz.

    Bedava Steam Kodları

  31. Become a confirmed manufacturer rep for Freepik and amplify your brand name’s voice on Knoji.

    Average material, reply to evaluations, and endorse gives.
    Knoji is usually a social discussion System which is 100% free to implement.

    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  32. Instagram Follower Kaufen
    Instagram-Follower kaufen: mehr Trust und Reichweite für Ihre Brand
    Das Ziel, die Reichweite auf Instagram zu erhöhen, ist
    für viele Unternehmen und Influencer häufig nur schwer zu erreichen. Follower zu kaufen ist eine bewährte Methode, um die Instagram-Präsenz
    aufzubessern und mehr Menschen und potenzielle Kunden im beliebten sozialen Netzwerk zu erreichen.
    Instagram Follower Kaufen

  33. If you download the same file more than once in the same
    day, it will count just as one download. So for example, if you
    download the same image 3 times today, you will still have
    99 downloads left for that day. Nevertheless, if you reach the 100 limit, you won’t be able to download any more files, even if you have downloaded the same files earlier in the day.

    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  34. Bedava lol Hesap 2021 | Ücretsiz League Of Legends Hesapları.
    LoL nedir? League of Legends, dünyanın en ünlü çevrimiçi oyunlarından biridir.

    Ayrıca birçok ülkede ligleri var ve bu
    liglerin kazananlarıyla bir dünya turnuvası düzenleniyor.
    E-sporun nabzı olan bu oyun, uzun yıllar popülerliğini koruyacak gibi görünüyor.
    Birçok genç tarafından sevilen ve oynanan oyun, Riot
    Games tarafından geliştirilmiştir. Bir MOBA oyunu
    olan League of Legends, 2009 yılında piyasaya sürüldü.
    Daha sonra uzun yıllar MOBA kategorisinin zirvesinde yer aldı.
    Birçok MOBA oyunu gibi, bazı klasik özelliklere sahiptir.

    Oyunda toplam 10 kişilik iki farklı takım bulunuyor.

    Bu takımlar mavi ve kırmızı olmak üzere ikiye ayrılır.
    Oyun genellikle standartlara göre bir atıcı, bir destekçi, bir ormancı, bir
    orta şerit ve bir üst koridor içerir.

    bedava lol hesap

  35. Bedava Roblox Hesap 2021 | Hesap ve Parolalar,
    roblox en popüler çevrimiçi oyundur. Bu oyunda dilediğiniz gibi mutlu olabilir ve eğlenebilirsiniz.
    Roblox ile kendi sanal oyun dünyanızı yaratabilir ve arkadaşlarınızla oynayabilirsiniz.
    Sanal dünyanız ne kadar güzel ve büyükse, o kadar güçlü olursunuz.
    Böylece arkadaşlarınız sözlerinizden çıkıp ne
    söylerseniz yapmazlar. Böyle bir şeyin olmasını istiyorsan çok çalışmalısın. Sonuç olarak çok güçlü olacaksınız ve
    arkadaşlarınız sizi alt etmek isteyebilir. Ancak roblox, savaşmaktan çok
    mutluluk, dostluk ve sosyallik getiren bir oyundur.
    Bu şekilde daha çok arkadaş edinebilir ve daha mutlu
    olabilirsiniz. Böylece Robux ile Ücretsiz bir Roblox Hesabı edinebilir
    ve oyuna hemen giriş yapabilirsiniz.

    bedava roblox hesap

  36. Apart from, demonstrating and getting guidance may be the primary motivation of artists and designers.

    So, tend not to be reluctant to tell anyone how wonderful their designs seems to be.
    Additionally, you will receive help while utilizing the social interactions of Freepik.
    Really like boosts though sharing!
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  37. bedava hesap sektörünün en başarılı, en sorunsuz hesap
    dağıtan sistemine sahip, insanları para olarak değil
    sadece ihtiyalarını bedava karşılamak için açılan bir web sitedir.
    BEDAVA HESAP – ÜCRETSİZ HESAP dağıtım merkezi her zaman sizin için karşılıksız çalışıyor ve çalışmaya devam edicek !…

    bedava hesap

  38. As we pointed out previously, we’re not like other
    Web sites, and if You’re not like other audience and completely read through this
    short article, you do have a win-acquire condition awaiting you!Freepik Free Account 2021
    | New Premium Username Password
    Freepik Free Account

  39. Envato Features features greater than 1 million graphic design and style aspects, like a huge assortment of vector art.
    The great thing about the platform is the fact that it offers you unlimited access
    to its entire selection for just a monthly membership and
    you obtain to down load as a lot of merchandise as you’d like.
    Pricing commences at just $16.50 per month.
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  40. Over the desktop are blue and light blue graphs and
    diagrams, a brown notebook as well as a sheet of paper with blue clips
    and free estimates text. check out from previously mentioned.

    small business strategy
    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

  41. Freepik, which was a huge Web site in ten years, is becoming a Heart wherever all graphic designers occur and
    go. There are A large number of free patterns offered on Freepik.
    Below you can certainly obtain the templates you require.
    Also, individuals that have to have more can obtain extra wonderful and more enjoyable
    designs by getting Premium membership. I’ll address Freepik Free Account pricing and Quality capabilities in additional depth beneath.

    Freepik Free Account 2021 | New Premium Username Password
    Freepik Free Account

Comments are closed.