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. Hi all, here every one is sharing these kinds of know-how, thus it’s nice to read this website,
    and I used to visit this weblog daily.

  2. you’re actually a good webmaster. The web site loading
    pace is amazing. It sort of feels that you are doing any unique trick.
    Also, The contents are masterwork. you’ve performed a magnificent process in this subject!

    Free Account | New Free Accounts And Password List
    free accounts

  3. Just want to say your article is as astounding. The clearness
    in your post is simply spectacular and i can assume you are
    an expert on this subject. Well with your permission allow me to grab your feed to keep
    updated with forthcoming post. Thanks a million and
    please continue the enjoyable work.
    Free Account | New Free Accounts And Password List
    free accounts

  4. Hi there! This is my 1st comment here so I just wanted to give a quick shout out and say I
    truly enjoy reading through your articles. Can you recommend any other blogs/websites/forums that deal with
    the same topics? Thanks for your time!
    Free Account | New Free Accounts And Password
    List
    free accounts

  5. I got this web site from my pal who told me about
    this web site and now this time I am browsing this web site and reading
    very informative content at this place.
    Free Account | New Free Accounts And Password List
    free accounts

  6. May I simply say what a relief to discover someone that truly knows what they’re talking about over
    the internet. You definitely know how to bring
    an issue to light and make it important. More people should look at this and understand this side of your story.

    It’s surprising you aren’t more popular given that you definitely have the gift.

    Free Account | New Free Accounts And Password List
    free accounts

  7. 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 three e-mails with the same comment.
    Is there any way you can remove people from that service?
    Cheers!
    Free Account | New Free Accounts And Password List
    free accounts

  8. Sweet blog! I found it while browsing on Yahoo News.
    Do you have any tips on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Thanks
    Free Account | New Free Accounts And Password List
    free accounts

  9. 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 three e-mails with the same comment.

    Is there any way you can remove me from that service? Cheers!

    Free Account | New Free Accounts And Password List
    free accounts

  10. Hi there I am so delighted I found your weblog, I really found you
    by accident, while I was looking on Digg for something else, Regardless I am here now and would just like
    to say thank you for a tremendous post and a all
    round exciting blog (I also love the theme/design), I don’t have time to
    browse it all at the minute but I have book-marked it and
    also included your RSS feeds, so when I have time I will be back to read a
    great deal more, Please do keep up the superb jo.
    Free Account | New Free Accounts And Password List
    free accounts

  11. Hi just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading correctly.
    I’m not sure why but I think its a linking issue.
    I’ve tried it in two different browsers and both show the same outcome.

    Free Account | New Free Accounts And Password List
    free accounts

  12. With havin so much content do you ever run into any issues of plagorism or copyright infringement?
    My site has a lot of exclusive content I’ve either written myself or outsourced but it seems a lot of it is popping
    it up all over the internet without my permission. Do
    you know any techniques to help prevent content from being stolen? I’d
    certainly appreciate it.
    Free Account | New Free Accounts And Password List
    free accounts

  13. Every weekend i used to pay a visit this web page,
    for the reason that i wish for enjoyment, for the reason that this this site conations in fact
    pleasant funny stuff too.
    Free Account | New Free Accounts And Password List
    free accounts

  14. I don’t know whether it’s just me or if everybody else experiencing
    issues with your website. It appears like some of the written text
    in your posts are running off the screen. Can someone else please
    comment and let me know if this is happening to them too?
    This may be a issue with my browser because I’ve had this
    happen before. Thank you
    Free Account | New Free Accounts And Password List
    free accounts

  15. Write more, thats all I have to say. Literally, it seems as though you
    relied on the video to make your point. You clearly know what youre talking about,
    why waste your intelligence on just posting videos to your weblog when you could be giving us something informative to read?

    Free Account | New Free Accounts And Password List
    free accounts

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

  17. Excellent pieces. Keep writing such kind of info on your page.
    Im really impressed by it.
    Hello there, You have performed an incredible job.
    I’ll definitely digg it and personally recommend to my friends.
    I am sure they’ll be benefited from this site.
    Free Account | New Free Accounts And Password List
    free accounts

  18. May I just say what a comfort to uncover somebody who genuinely understands
    what they are talking about on the internet. You certainly understand
    how to bring an issue to light and make it important. More people must check this out and understand this side of the
    story. I can’t believe you aren’t more popular since you certainly have the gift.

    Free Account | New Free Accounts And Password List
    free accounts

  19. After looking over a number of the blog articles on your site, I really like your way of blogging.

    I book marked it to my bookmark webpage list and will be checking back
    in the near future. Take a look at my website as well and tell
    me how you feel.
    Free Account | New Free Accounts And Password List
    free accounts

  20. Hey, I think your site might be having browser compatibility issues.
    When I look at your blog in Ie, it looks fine but when opening in Internet Explorer, it has
    some overlapping. I just wanted to give you a quick heads up!
    Other then that, wonderful blog!
    Free Account | New Free Accounts And Password List
    free accounts

  21. Hello! I just want to give you a big thumbs up for your excellent information you have here on this post.
    I will be returning to your web site for more soon.
    Free Account | New Free Accounts And Password List
    free accounts

  22. Hi there every one, here every one is sharing
    such experience, thus it’s good to read this weblog, and I used to pay a visit this
    webpage everyday.
    Free Account | New Free Accounts And Password List
    free accounts

  23. Ahaa, its good conversation concerning this piece of writing at this place at this webpage, I have read all that, so now me also commenting at this place.

    Free Account | New Free Accounts And Password List
    free accounts

  24. whoah this weblog is fantastic i love studying your posts.

    Keep up the good work! You know, many persons are looking around
    for this info, you could aid them greatly.
    Free Account | New Free Accounts And Password List
    free accounts

  25. Helpful information. Lucky me I found your website by chance, and I
    am shocked why this twist of fate didn’t happened in advance!
    I bookmarked it.
    Free Account | New Free Accounts And Password
    List
    free accounts

  26. hi!,I really like your writing very a lot! share we be in contact extra
    approximately your article on AOL? I require a specialist in this
    house to solve my problem. Maybe that is you! Taking a look
    ahead to peer you.
    Free Account | New Free Accounts And Password List
    free accounts

  27. I don’t even know how I ended up here, but I thought this post was great.
    I don’t 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

  28. Hi there all, here every one is sharing these kinds
    of experience, therefore it’s pleasant to read this webpage, and I used to pay a visit this blog
    daily.
    Free Account | New Free Accounts And Password List
    free accounts

  29. I was curious if you ever considered changing the page layout of your website?
    Its very well written; I love what youve got to say. But maybe you could a little more
    in the way of content so people could connect with it better.

    Youve got an awful lot of text for only having 1 or two images.
    Maybe you could space it out better?
    Free Account | New Free Accounts And Password List
    free accounts

  30. Hey There. I found your blog using msn. This is an extremely well written article.
    I’ll be sure to bookmark it and come back to read more
    of your useful information. Thanks for the post.
    I’ll definitely comeback.
    Free Account | New Free Accounts And Password List
    free accounts

  31. Great goods from you, man. I’ve keep in mind
    your stuff prior to and you are just extremely magnificent.
    I really like what you have bought right here, certainly like what
    you are saying and the way in which during which you
    are saying it. You make it entertaining and you still take care of to stay it smart.
    I cant wait to read much more from you. That is really
    a great website.
    Free Account | New Free Accounts And Password List
    free accounts

  32. Hello there, just became aware of your blog through Google, and found that
    it’s really informative. I am gonna watch out for brussels.
    I will appreciate if you continue this {in future}.

    Numerous people will be benefited from your
    writing. Cheers!
    Free Account | New Free Accounts And Password List
    free accounts

  33. I’m not that much of a internet reader to be honest
    but your sites really nice, keep it up! I’ll go
    ahead and bookmark your website to come back later.

    All the best
    Free Account | New Free Accounts And Password List
    free accounts

  34. Just desire to say your article is as amazing. The clarity in your post is simply
    spectacular and i could assume you’re an expert on this subject.
    Fine with your permission let me to grab your
    feed to keep up to date with forthcoming post. Thanks
    a million and please continue the enjoyable work.

    Free Account | New Free Accounts And Password
    List
    free accounts

  35. Good day! Do you know if they make any plugins to help with Search
    Engine Optimization? I’m trying to get my blog to rank for
    some targeted keywords but I’m not seeing very good gains.
    If you know of any please share. Appreciate it!

    Free Account | New Free Accounts And Password List
    free accounts

  36. Hey there, I think your website might be having browser compatibility issues.
    When I look at your website in Safari, it looks fine
    but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that, great blog!

    Free Account | New Free Accounts And Password List
    free accounts

Comments are closed.