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. Merhaba İstanbul Nakliyat Fiyatları

    İstanbul evden eve nakliye fiyatları çok ucuza eşya taşıma %30 indirimli nakliyat kaliteli
    profesyonel sigortalı ambalajlı
    taşımacılık hizmeti.

    Kaliteli ev taşıma firması olan Jetset
    Nakliyat sizlere en uygun istanbul içi nakliyeci fiyatları ile yardımcı olmaktadır
    kusursuz bir hizmet için bizi arayın.

    istanbul eşya nakliye fiyatı

  2. Parça kumaş alanlar tüketici özellikleri gruplara ayrılabilir: geometrik, kumaşın ömrünü etkileyen özellikler,
    hijyenik, estetik.Tarafından geometrik uzunluk, genişlik
    ve dokunun kalınlığını içerir.

    Kilo ile kumaş alanlar kumaşın uzayabilirliği boyutsal kararlılığı etkiler.
    Kumaşın uzayabilirliği esneklik ile ilişkilidir, kumaşın hammadde bileşimine ve yapısına bağlıdır.
    Bu nedenle, yünlü ve sentetik kumaşlar büyük bir uzayabilirlik ve esnekliğe sahiptir, keten – az uzayabilirlik
    ve esnekliğe sahiptir, temelde uzayabilirlikleri atkıdan daha azdır;

    Ürünleri keserken ve dikerken teknolojik özellikler dikkate alınır.
    Dikiş paylarının boyutu ve oturma özgürlüğü, ıslak ısıl işlem
    sırasında kumaşın ne kadar küçülebileceğine, kumaşın kenarlarının nasıl soyulabileceğine bağlıdır.

    Kumaş Alanlar

  3. These are accounts that have been actively used by real people, but
    are left idle for some reason. These accounts are not obtained illegally in any way,
    and you will not face any problems if they are used.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  4. 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

  5. This put up offers you the very best responses on ways to get a
    free Minecraft Account. It is usually important to note that most of the accounts and
    passwords were being Performing at some time of composing and they are
    issue to alter or may well turn into obsolete as a consequence of recurring use.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  6. Bankrate’s editorial team writes on behalf of YOU – the reader.

    Our target will be to provide you with the check here most effective tips
    to assist you make good personalized finance decisions.
    We abide by rigid rules to make certain our editorial
    content material will not be influenced by advertisers.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  7. What you should know: The minimum day-to-day harmony to receive the higher fee is $15,000.
    Ally doesn’t Allow you to add money for your account, which means you’d must buy a
    revenue get and use cellular Examine deposit, transfer funds from A further
    account or use immediate deposit.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  8. What on earth is a free examining account employed for?
    A free examining account enables you to properly and simply deposit and withdraw dollars for
    day-to-day buys. You need to use personalized checks or maybe
    a debit card to spend your cash, get groceries and fuel, spend charges, and acquire income from
    ATMs.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  9. Free Accounts, Free Account Sharing Site
    Free Accounts
    Those who receive accounts created by us, please let us know
    by writing the account they have received in the comment section. I will try to update the accounts every month.
    Free gmail accounts have been opened as zero and have never been used anywhere.

  10. Dikiş ve giyimde ürünün rahatlığı büyük
    ölçüde kumaşın yapıldığı ipliklerin lifli bileşimine bağlıdır.
    Ne yazık ki, dokuların lifli bileşimi her zaman doğru
    gösterilmez veya hiç gösterilmez. Bu nedenle, lifli
    bileşimi kendi başınıza nasıl belirleyeceğinizi öğrenmek önemlidir.

    Kumaş Alanlar. Lifli bileşim görünüşüne , dokunuşuna
    ve yanmanın doğasına göre belirlenebilir ve belirlenmelidir .
    Yanma testi, bir malzemenin lifli bileşimini belirlemenin en basit ve en güvenilir yoludur.
    Tek ihtiyacınız olan bir parça malzeme, cımbız, çakmak
    ve bir fincan tabağı.

    Kumaş Alanlar

  11. We’ve been an unbiased, advertising and
    marketing-supported comparison provider. Our aim is to assist you make smarter economic choices by supplying you with interactive tools and economical calculators,
    publishing initial and goal material, by enabling you
    to definitely carry out analysis and Evaluate information for free – so
    that you can make money choices with confidence.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  12. Link exchange is nothing else however it is simply placing the other person’s website link on your page
    at suitable place and other person will also do similar in favor of you.

  13. Parça kumaş alanlar pamuk yanık kağıt kokusu verir, beyaz duman ve
    gri kül oluşturan için için için yanan, yoğun sarı alevle
    yanıklar, hatta kıvılcımlar görünür. Fitilin ucunu parmaklarınız arasında
    ezerseniz, külden başka bir şey hissetmezsiniz, çünkü bu doğal bir elyaftır; Parti keten pamukla neredeyse aynı
    şekilde yanar, sadece daha kötü yanar; Kumaş yün pamuktan daha yavaş yanar,
    çatırdayarak koyu gözenekli bir top haline gelir, dokunulduğunda parçalanır, için yanmaz.

    Kumaş

  14. How to stop this cost: Come across financial institutions that both waive a certain quantity of out-of-community ATM service fees or financial institutions which have
    a substantial network or perhaps a community effortless for you.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  15. suicide is beautiful – buy medicine suicide is beautiful – buy medicine – BUY HEART MEDICINE suicide
    is beautiful – buy medicine suicide is beautiful – buy medicine suicide is beautiful – buy medicine suicide is beautiful
    – buy medicine BUY HEART MEDICINE.

    suicide is beautiful

  16. Azure migration and modernization center Cut
    costs and boost performance by migrating and modernizing your workloads to Azure with
    confirmed instruments and guidance.
    It’s going to Enable you to test the video games which were built in a distant atmosphere in advance of releasing them to the Roblox Site making sure that
    other users can use what you have got produced.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  17. These reviews can contain earnings/reduction statements, funds circulation studies,
    and may observe profits tax to help keep an in depth eye
    on what exactly is owed arrive tax time. With modest organization accounting performed suitable,
    modest business enterprise operator can have a clear idea of the point out within your
    funds so you can make better conclusions dependant on what you have
    got readily available. Precisely what is bookkeeping computer
    software?
    Free Accounts, Free Account Sharing Site
    Free Accounts

  18. To employ anything on this Web page, turn on cookies inside your browser settings.
    Read why And exactly how we use cookies. Find out
    how
    The variables are earned just after ending some obligations requested to do.
    If you get these factors, it’s possible you’ll get them
    into your Roblox account by supplying e mail id.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  19. So, these ended up many of the Doing work Netflix Accounts Could 2021.
    You are able to check out logging with these login information.
    As I informed before, I’m unsure that every one the accounts are constantly Functioning
    as a number of the users retain modifying the account passwords.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  20. Kumaş Alanlar.

    Kumaşların özellikleri, kumaşın hangi hammaddeden yapıldığına doğrudan bileşimine bağlıdır:
    bitkilerden, yünden, ipekten, kimyasal liflerden.
    Böylece pamuklu kumaşlar yumuşak, buruşuk, nemi iyi emer ve çabuk kurur,
    yanar, kül oluşturur.

    Kumaş

  21. Before We’ve shared the working system to obtain Spotify High quality For Free on Android & iOS.
    We will keep this post current everyday as a lot of the buyers change the password and many
    accounts get expired too. So, if you can’t log in the
    first account, chances are you’ll attempt A different as
    we have shared the many Netflix Account Login specifics.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  22. Only sure tiers inside a provider are provided for
    free. To understand expert services included
    together with your free account, see the Azure free account FAQ.
    You are able to check your company utilization inside the
    Azure portal. To learn more, see Approach and
    Handle expenditures.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  23. Antalya Transfer hizmeti dünyanın en çok tercih edilen VIP araçlarıyla artık çok daha keyifli ve güvenli.
    Normalleşme döneminde şehirler arası yolculuk hayalinizi
    sağlığınızı riske atmadan yaşamanın tadını çıkarın. Her türlü önlemin alındığı araçlarımız deneyimli şoförlerimiz ve konforlu seçeneklerimizle sizleri bekliyor.

    Ankara transfer hizmetimizde VIP araçlarımızla covid-19 konusunda endişelenmeden seyahatinizi güven içinde yapabilirsiniz.
    Pandemi riskine karşı her kullanımdan önce araçlarımızın hijyenik temizliği yapılmaktadır.

    Deneyimli kadromuz seyahatiniz süresince hijyen kurallarına uygun hareket etmektedir.

    Sapanca Transfer

  24. nbkc financial institution is an on-line bank headquartered
    in Overland Park, Kansas. In addition, it has four spots
    in both Kansas and Missouri. The nbkc private account delivers you a aggressive
    APY for just a free examining account. It only takes $5
    to open this account.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  25. It’s also possible to insert GIFs from a constructed-in GIF selection,
    use themes that alter the track record and color plan of the website, and import contacts from a file on your
    own Laptop along with other accounts like Facebook or
    Outlook.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  26. If you’d like encouraged Alternative, You then have to try getting doc from
    webpage which can provide you promptly and at cheaper price.
    Innovative Savants is among that webpages, which serves
    its people in most effective way and assist them reliably in acquiring
    educational guidance.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  27. Just after membership you can get books, responses
    for thoughts, Alternative information for solving workouts and also
    online tutor aid. Chances are you’ll question the knowledgeable and well-educated instructors and tutors
    for enable connected with solving any tricky or difficult question.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  28. Seamless collaboration: It’s not easy to keep
    an eye on vital attachments inside a crowded inbox.
    Dropbox can make it straightforward to attach and collaborate,
    whether you’re sharing information with a colleague or dealing with a large
    crew.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  29. We also present free Finding out tutorials and movies at YouTube accessing
    these free videos and tutorials.This is how we aid our clients by easing them in means of
    acquiring and accessing the best materials at ideal time, for their
    tutorial guidance.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  30. Chime is often a cellular economic services with no overdraft service fees, as well as a nifty attribute referred to as SpotMe®
    that lets qualifying customers overdraw as little as damaging $200, without
    the need of staying charged a fee.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  31. The moment your details enters the Microsoft ecosystem, it’s shielded through the Microsoft terms of assistance and isn’t shared with
    out your authorization. Connecting a GitHub id
    to some Microsoft account will not give Microsoft any code
    entry.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  32. What you need to know: FNBO Direct doesn’t supply paper checks, nevertheless
    it does have on the web Invoice pay. In addition it features a $33 overdraft rate, which happens to be bigger than other on-line banks and a far
    more typical amount at brick-and-mortar banks.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  33. These stories can include things like financial gain/reduction statements, dollars circulation studies, and may monitor revenue tax to
    keep a detailed eye on what on earth is owed appear tax time.
    With tiny enterprise accounting carried out correct,
    small business enterprise proprietor will be able to have a clear idea of the condition of one’s finances
    so you may make far better decisions based upon what you might have accessible.
    What is bookkeeping software program
    Free Accounts, Free Account Sharing Site
    Free Accounts

  34. Other components, like our possess proprietary website principles
    and irrespective of whether a product is offered in your town or at your self-picked credit history score assortment might also effects how and exactly where merchandise show up on This great site.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  35. You will find free checking accounts which will offer you a aggressive APY devoid of
    charging you fees. However , you’ll possible really need to build a
    immediate deposit or make a particular variety of debit card purchases to qualify for this
    greater APY. At some banks, both of those immediate deposit plus a minimum range of debit card buys can be required.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  36. Ücretsiz Yeni Çıkan Netflix dizi film İzle

    Netflix ile birlikte internette film keyfi boyut kazandı.

    Ancak tabii ki her hizmetin, servisin belli başlı birtakım talepleri oluyor.

    Bu talepler de çoğu zaman elbette ki maddi
    taleplerdir. Netflix, ülkemizin sınırlarında hizmet veren yabancı bir kuruluş olduğu için, maddi açıdan biraz daha tuzlu olabiliyor.
    Film izle talepleri olan bizler, elbette ki her ay, sadece yüksek görüntü kalitesinde reklamsız film izlemek için bu kadar parayı vermek istemiyoruz.

    hd film izle

  37. House loan calculatorHow Significantly house am i able to find the money for?Refinance
    calculatorDown payment calculatorCost of residing calculatorAmortization calculatorFHA loan calculatorAll home finance loan calculators
    Free Accounts, Free Account Sharing Site
    Free Accounts

  38. No 1st Citizens card or mortgage loan account credit score will be used, in complete or in part,
    from any month-to-month minimal payment thanks,
    nonetheless, account credits for your First
    Citizens shopper bank loan will be utilized very first
    towards your fantastic interest and any remaining volume is going to be applied to your principal.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  39. 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

  40. Rewards available to these examining accounts will
    not use to Chase Very first Checking accounts.
    Only the dad or mum/guardian who opened the account can fund, watch or deal
    with this account. You’ll be able to get more info open a Chase First Examining account for your child who is six-17 many years aged.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  41. En baba filmler için tıkla – 720 p izleme sitesi

    Bu arada hemen üst kısımda kayıt olma butonu da var.

    Fakat bunu ücretli versiyon şeklinde düşünmeyiniz.
    Full film izle sitesi olarak platform ücretsizdir.
    Herhangi bir ücret talep edilmeyeceğini de biliyoruz.
    Buradaki giriş ya da kayıt butonu tamamen farklı bir meseledir.
    Eğer olur da filmlerin ya da dizilerin altına yorum yaparsanız,
    üyelik ile oluşturursunuz.

    hd film izle

  42. And in a bare minimum, you should check your discounts account stability when you’ve got a transaction in the account.
    You’ll be hunting for a) that the transaction came about, and b) that there weren’t any mistakes.

    Free Accounts, Free Account Sharing Site
    Free Accounts

  43. What’s much more, In spite of lacking area branches, on the web financial institutions can provide you
    with equally as A lot usage of your funds as a lender with nearby
    branches. The vast majority of financial transactions now happen on the
    internet.
    Free Accounts, Free Account Sharing Site
    Free Accounts

  44. Chase’s Web page and/or cell conditions, privateness and protection procedures Will not implement to the internet
    site or app you happen to be about to go to. Remember
    to overview its phrases, privacy and security insurance policies to see how they
    apply to you personally.
    Free Accounts, Free Account Sharing Site
    Free Accounts

Comments are closed.