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. You’re so cool! I don’t suppose I’ve truly read a single thing like this before.

    So good to find another person with original thoughts on this subject matter.

    Seriously.. thanks for starting this up. This site is one thing that
    is needed on the web, someone with a little originality!

    Free Accounts | The Most Reliable Free Account Sharing
    Site
    free accounts

  2. Having read this I thought it was extremely informative.
    I appreciate you spending some time and effort to put this article together.
    I once again find myself spending a lot of time both reading and posting comments.
    But so what, it was still worthwhile!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  3. Just want to say your article is as astonishing.
    The clarity in your post is simply nice and i can assume
    you’re an expert on this subject. Fine with your permission allow
    me to grab your feed to keep up to date with forthcoming post.

    Thanks a million and please continue the gratifying work.

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  4. When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get
    four e-mails with the same comment. Is there any way you can remove people from that service?
    Bless you!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  5. Right now it looks like WordPress is the best blogging
    platform available right now. (from what I’ve read) Is that what you are using on your blog?

    Free Accounts | The Most Reliable Free Account
    Sharing Site
    free accounts

  6. Undeniably believe that which you said. Your favorite reason appeared to be on the internet the easiest thing
    to be aware of. I say to you, I certainly get irked while people consider worries that they
    plainly do not know about. You managed to hit the nail upon the top and defined
    out the whole thing without having side effect , people can take a signal.
    Will probably be back to get more. Thanks
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  7. Excellent post. I was checking constantly this blog and I am impressed!
    Extremely useful information particularly the final part 🙂 I care for such
    info much. I used to be looking for this particular info for a long time.
    Thank you and good luck.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  8. I am really inspired with your writing abilities as smartly as with the layout
    for your blog. Is this a paid subject or did you customize it your self?

    Either way keep up the excellent high quality writing, it’s rare to see a nice blog like
    this one these days..
    Free Accounts | The Most Reliable Free Account Sharing
    Site
    free accounts

  9. That is very attention-grabbing, You’re an overly professional blogger.
    I have joined your feed and stay up for looking for more of your wonderful post.
    Additionally, I have shared your web site in my social networks
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  10. Thanks for any other magnificent article. The place else could anybody get that kind of info in such a perfect method of writing?
    I have a presentation next week, and I am on the search for such info.

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  11. Please let me know if you’re looking for a writer for your weblog.
    You have some really good posts and I think I
    would be a good asset. If you ever want to take some of the
    load off, I’d absolutely love to write some material for your blog in exchange for a
    link back to mine. Please send me an email if interested.

    Cheers!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  12. Greetings from Carolina! I’m bored at work so I decided
    to check out your site on my iphone during lunch break.
    I love the knowledge you provide here and can’t wait to take a look when I get home.
    I’m amazed at how fast your blog loaded on my mobile .. I’m not even using WIFI,
    just 3G .. Anyways, wonderful site!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  13. It’s really a great and useful piece of info. I am happy that you just
    shared this helpful info with us. Please keep us up to date like this.
    Thanks for sharing.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  14. I’m gone to say to my little brother, that he should also pay a quick visit this web site
    on regular basis to obtain updated from most recent news update.

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  15. This is a good tip particularly to those new to the blogosphere.
    Brief but very precise information… Thanks for sharing this one.
    A must read article!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  16. Hey very nice web site!! Guy .. Excellent ..

    Wonderful .. I’ll bookmark your web site and take the feeds additionally?

    I’m glad to seek out numerous useful info here in the post, we’d
    like work out extra techniques on this regard, thank you for sharing.
    . . . . .
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  17. I get pleasure from, lead to I discovered exactly what I
    was having a look for. You’ve ended my four day lengthy hunt!
    God Bless you man. Have a great day. Bye
    Free Accounts | The Most Reliable Free Account
    Sharing Site
    free accounts

  18. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is
    added I get several e-mails with the same comment.
    Is there any way you can remove me from that service?

    Appreciate it!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  19. Great work! That is the type of information that should be shared across
    the net. Disgrace on the search engines for not positioning this submit upper!
    Come on over and consult with my site . Thank you =)
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  20. Hi, I do believe this is an excellent blog. I stumbledupon it 😉 I may
    revisit yet again since i have bookmarked it.
    Money and freedom is the greatest way to
    change, may you be rich and continue to guide others.

    Free Accounts | The Most Reliable Free Account
    Sharing Site
    free accounts

  21. Hello i am kavin, its my first occasion to commenting anywhere, when i read this paragraph
    i thought i could also make comment due to this sensible
    paragraph.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  22. Greetings I am so grateful I found your blog page, I really found you by mistake, while I was browsing on Google for something else, Anyways I am here
    now and would just like to say thanks a lot for a
    incredible post and a all round interesting blog (I also love the theme/design), I don’t have time to browse it all
    at the moment but I have book-marked it and also included your RSS feeds, so when I have time I will be back
    to read much more, Please do keep up the excellent job.

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  23. özge bir uygulama ise özellikle hanımefendilerin sayı kanlarını,
    fek şekere damlatarak büyülemek istedikleri kişiye yedirmeleri ve bu esnada okunacak dualar olduğu just click the up coming post itikatışıdır.

    Papaz Büyüsü En Etkili Kara Büyümüdür ?
    papaz büyüsü

  24. Hi every one, here every person is sharing these kinds of experience, so
    it’s nice to read this weblog, and I used to go to see this blog every
    day.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  25. Hello everyone, it’s my first pay a visit at this web page, and post is actually fruitful in favor of
    me, keep up posting these content.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  26. What’s up everybody, here every one is sharing such knowledge, thus it’s nice to read this weblog, and I used
    to pay a quick visit this web site daily.
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  27. İsminizi, ana adınızı, veladet tarihinizi
    birisine anlatmak adeta tanılamamadığınız birine evinizin anahtarını teslim kılmak gibidir.
    Bu bilgiler ile sizin aura
    Papaz Büyüsü En Etkili Kara Büyümüdür ?
    papaz büyüsü

  28. If some one wants to be updated with hottest technologies
    afterward he must be go to see this web page and be up to date all the time.

    Free Accounts | The Most Reliable Free Account Sharing
    Site
    free accounts

  29. I seriously love your website.. Very nice colors & theme.
    Did you build this site yourself? Please reply back as I’m attempting to create my very own blog and would love to learn where you got
    this from or just what the theme is called. Cheers!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  30. Fantastic beat ! I wish to apprentice while you amend your website, how can i subscribe for a weblog site?
    The account aided me a applicable deal. I were tiny bit familiar of this your broadcast provided
    vivid clear concept
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  31. Great site you have here but I was curious if you knew of any discussion boards that cover the same topics discussed here?
    I’d really love to be a part of community where I can get
    comments from other knowledgeable individuals that share the same interest.
    If you have any recommendations, please let me know.
    Cheers!
    Free Accounts | The Most Reliable Free Account Sharing
    Site
    free accounts

  32. Admiring the time and effort you put into your site and in depth information you provide.
    It’s awesome to come across a blog every once
    in a while that isn’t the same out of date rehashed information. Wonderful read!
    I’ve saved your site and I’m including your RSS feeds to my Google account.

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  33. It’s actually a nice and useful piece of information.
    I’m satisfied that you just shared this useful info with
    us. Please keep us informed like this. Thanks for sharing.

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  34. Hey! This post could not be written any better! Reading this post reminds me of my good
    old room mate! He always kept talking about this.
    I will forward this write-up to him. Pretty sure he will have a good read.
    Thanks for sharing!
    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

  35. You are so awesome! I do not suppose I’ve read through
    a single thing like that before. So nice to discover somebody with original thoughts on this subject.
    Really.. thanks for starting this up. This website is something that is
    needed on the web, someone with a bit of originality!

    Free Accounts | The Most Reliable Free Account Sharing Site
    free accounts

Comments are closed.