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. Good post. I learn something totally new and challenging on sites I stumbleupon everyday.
    It’s always helpful to read content from other authors and practice something from other sites.

    Free Account | New Free Accounts And Password List
    free accounts

  2. Hello there, I found your blog by the use of Google whilst looking for a similar subject,
    your web site got here up, it seems to be good. I’ve bookmarked it in my
    google bookmarks.
    Hi there, just become aware of your weblog via Google, and located that
    it’s really informative. I am going to watch out for brussels.
    I will be grateful if you proceed this {in future}.
    Numerous other people shall be benefited from your writing.
    Cheers!
    Free Account | New Free Accounts And Password List
    free accounts

  3. It’s really a great and useful piece of information. I’m
    glad that you simply shared this helpful info with us.
    Please keep us up to date like this. Thank you for sharing.

    Free Account | New Free Accounts And Password List
    free accounts

  4. Every weekend i used to pay a quick visit this web site, as i
    want enjoyment, for the reason that this this web site conations in fact pleasant funny data
    too.
    Free Account | New Free Accounts And Password List
    free accounts

  5. Greetings from Idaho! I’m bored at work so I decided to browse your site on my iphone during
    lunch break. I really like the info you provide here
    and can’t wait to take a look when I get home. I’m surprised at how fast your blog loaded on my mobile ..
    I’m not even using WIFI, just 3G .. Anyways, awesome blog!

    Free Account | New Free Accounts And Password List
    free accounts

  6. Howdy! Would you mind if I share your blog with my twitter group?
    There’s a lot of folks that I think would really
    enjoy your content. Please let me know. Many thanks
    Free Account | New Free Accounts And Password List
    free accounts

  7. My spouse and I stumbled over here from a different web address and thought
    I should check things out. I like what I see so now i am following you.
    Look forward to checking out your web page for
    a second time.
    Free Account | New Free Accounts And Password List
    free accounts

  8. Hi there! Someone in my Myspace group shared this website with us
    so I came to check it out. I’m definitely enjoying the information.
    I’m book-marking and will be tweeting this to my followers!
    Outstanding blog and excellent style and design.
    Free Account | New Free Accounts And Password List
    free accounts

  9. I know this if off topic but I’m looking into starting my own blog and was wondering what all is needed to get set up?
    I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet smart so I’m not 100% positive.
    Any recommendations or advice would be greatly appreciated.
    Thank you
    Free Account | New Free Accounts And Password List
    free accounts

  10. Hi there friends, how is the whole thing, and what you desire to say regarding this piece of writing, in my view its genuinely awesome in favor of
    me.
    Free Account | New Free Accounts And Password List
    free accounts

  11. I’m not sure where you’re getting your information, but great topic.
    I needs to spend some time learning more or understanding more.
    Thanks for excellent information I was looking for this information for my mission.
    Free Account | New Free Accounts And Password List
    free accounts

  12. Great beat ! I wish to apprentice whilst you amend your website, how can i subscribe for a
    weblog site? The account helped me a acceptable deal.
    I have been tiny bit acquainted of this your broadcast provided bright clear
    concept
    Free Account | New Free Accounts And Password List
    free accounts

  13. Wonderful blog! Do you have any tips for aspiring writers?

    I’m planning to start my own blog soon but I’m a little lost on everything.

    Would you propose starting with a free platform like WordPress or go for a paid option? There are so many choices out there that
    I’m totally overwhelmed .. Any ideas? Kudos!
    Free Account | New Free Accounts And Password List
    free accounts

  14. I’ve been surfing online more than 3 hours today,
    yet I never found any interesting article like yours.
    It is pretty worth enough for me. In my opinion, if all webmasters and
    bloggers made good content as you did, the internet will
    be a lot more useful than ever before.
    Free Account | New Free Accounts And Password List
    free accounts

  15. I have been surfing on-line greater than 3 hours these days,
    yet I by no means discovered any fascinating article like yours.
    It is lovely value enough for me. In my view, if all website owners
    and bloggers made good content material as you probably did,
    the net shall be a lot more useful than ever before.
    Free Account | New Free Accounts And Password List
    free accounts

  16. Greate post. Keep writing such kind of info on your site.
    Im really impressed by your blog.
    Hi there, You have performed a great job. I’ll definitely digg it and in my
    opinion suggest to my friends. I’m confident they will
    be benefited from this site.
    Free Account | New Free Accounts And Password List
    free accounts

  17. I am not sure where you’re getting your info, but great topic.

    I needs to spend some time learning more or understanding
    more. Thanks for magnificent info I was looking for this information for my mission.
    Free Account | New Free Accounts And Password List
    free accounts

  18. It is perfect time to make a few plans for the future and it is time
    to be happy. I’ve learn this publish and if I
    may just I want to recommend you few fascinating issues or suggestions.

    Perhaps you can write next articles relating to this article.
    I want to read even more things approximately it!

    Free Account | New Free Accounts And Password List
    free accounts

  19. Hello There. I found your blog using msn. This is an extremely well written article.
    I will be sure to bookmark it and come back to read
    more of your useful info. Thanks for the
    post. I will certainly comeback.
    Free Account | New Free Accounts And Password List
    free accounts

  20. I love your blog.. very nice colors & theme. Did you
    make this website yourself or did you hire someone to do
    it for you? Plz reply as I’m looking to construct my own blog
    and would like to find out where u got this from. thanks

  21. I was recommended this blog by my cousin. I’m not sure whether this post is written by him as nobody else know such
    detailed about my difficulty. You are incredible!
    Thanks!
    Free Account | New Free Accounts And Password List
    free accounts

  22. My developer is trying to persuade me to move to
    .net from PHP. I have always disliked the idea because of the costs.
    But he’s tryiong none the less. I’ve been using Movable-type on numerous websites for about a year and am worried about switching to another platform.
    I have heard great things about blogengine.net.
    Is there a way I can import all my wordpress content into it?
    Any kind of help would be greatly appreciated!
    Free Account | New Free Accounts And Password List
    free accounts

  23. Hmm is anyone else encountering problems with the pictures on this blog loading?
    I’m trying to determine if its a problem on my end or
    if it’s the blog. Any feed-back would be greatly appreciated.

    Free Account | New Free Accounts And Password List
    free accounts

  24. I do not even know how I ended up here, but I thought
    this post was good. I do not know who you are but certainly
    you are going to a famous blogger if you are not already
    😉 Cheers!
    Free Account | New Free Accounts And Password List
    free accounts

  25. Someone necessarily assist to make severely articles I might state.
    This is the first time I frequented your web page and to
    this point? I surprised with the research you made to create this actual submit incredible.
    Fantastic activity!
    Free Account | New Free Accounts And Password List
    free accounts

  26. Link exchange is nothing else however it is only placing the other person’s blog link
    on your page at suitable place and other person will also do same in favor
    of you.
    Free Account | New Free Accounts And Password List
    free accounts

  27. Yukarıdaki listede 0 Türkçe olarak ulaşabileceğiniz ve Sweet bonanza oynayabileceğiniz güvenilir siteler listelenmiştir. Bu siteler sektörde uzun yıllardır hizmet veren casino siteleridir ve içerisinde slot oyunları yer almaktadır. . Sweet Bonanza

  28. whoah this weblog is excellent i love studying your posts. Keep
    up the good work! You recognize, many persons are hunting round for this info, you can aid them greatly.

    Free Account | New Free Accounts And Password List
    free accounts

  29. I’m really loving the theme/design of your web site.

    Do you ever run into any web browser compatibility
    issues? A few of my blog readers have complained about my blog not working correctly in Explorer but looks great
    in Safari. Do you have any advice to help fix this issue?

    Free Account | New Free Accounts And Password List
    free accounts

  30. Fantastic beat ! I would like to apprentice while you amend your website, how can i subscribe for a blog web site?

    The account aided me a acceptable deal. I had been a little bit
    acquainted of this your broadcast provided bright clear idea
    Free Account | New Free Accounts And Password List
    free accounts

  31. We are a group of volunteers and opening a new scheme in our community.

    Your web site provided us with valuable information to
    work on. You’ve done a formidable job and our whole community will be grateful to you.

    Free Account | New Free Accounts And Password List
    free accounts

Comments are closed.