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. It is extra common than Autistic dysfunction, but kids with Asperger’s Disorder often aren’t acknowledged or referred for specialty care since their verbal capacity is a lot better. This part will think about procedures that have not been coated elsewhere in this handbook, and likewise cope with monitoring. Comprehensive assessments of the health efects of most forms of soil, heavy metals, and chemical pollution haven’t yet been printed (Landrigan et al erectile dysfunction young causes purchase viagra online pills.

  2. The goal of our research is to establish predictive elements of with egg, and one with each meals. They are characterised by vital impairment in psychological, social and occupational functioning as observed over a 12в€’month period. He additionally If left untreated, however, it could result in serious mercury poisoning, apart from seizures hiv bladder infection symptoms buy 200 mg movfor otc.

  3. Which of the following substance is more than likely to be elevated in 24-hour urinary dedication. Watson Health just lately introduced collaborations with Celgene, Siemens Healthineers, and the government of Finland to improve public health administration and security monitoring. Furthermore, if the child experiences traumatic disappointment in the admired father or mother, the idealised parent image may even survive in its unmodified shape menstruation twice in a month buy fluoxetine in united states online.

  4. Veins are called capacitance vessels as a result of they are distensible, and therefore have the capacity to carry a big proportion of the body’s blood. Neoplastic observations included an increase in bronchoalveolar adenomas in all treated groups in males (7, 18, 27, and 22%, for the management, low, mid and excessive dose teams, respectively) and females (5, 14, 10, and 17% for the control, low, mid and high dose groups, respectively), statistical significance was achieved in mid dose males. This implies that sure hospitals and other healthcare providers are Preferred suppliers gastritis daily diet buy 20 mg nexium fast delivery.

  5. Clinical practice guideline on the treatment of osteoarthritis of the knee (non-arthroplasty). Optimal patient outcomes are a practical, healthy free tissue transfer to restore the defect identified for reconstruction; restoration of perform and appearance to the extent possible with the tissue used and the defect corrected; and affected person and household satisfaction with regional and overall affected person operate, quality of life, and caregiver burden. Stevens-Johnson syndrome, dermatitis, morbilliform eruptions, allergic vasculitis, reversible neutropenia (on Mild itchy rashes are widespread with penicillins and extended high dose), epilepsy (in instances of renal failure) cephalosporins erectile dysfunction for young adults purchase tadacip overnight.

  6. Smallpox Smallpox was the first vaccine developed, practically 200 years in the past (Table three). The solicitor may also instruct a barrister (litigation legal professional) to characterize the applicant on the court docket listening to. The outcomes proven in Table 1 point out that the analyte concentration detected from the saliva standards is in good correspondence to that with requirements made up in deionized water what causes antibiotic resistance yahoo generic 100mg zithromax with mastercard.

  7. Improvements in microscopy are allowing the first-ever observations of B cells, T cells, and other cells as they work together within lymph nodes and different body tissues. The “Second Impact Syndrome,” is characterized by rapid demise due to a second concussion prior to a return to baseline functioning after an initial one. Current bronchial asthma therapies can efectively control signs and the continuing infammatory process however don’t afect the underlying dysregulated immune response (38) gastritis diet сонник order discount esomeprazole line.

  8. Cholangiocarcinomas that occur on the hepatic facet of the junction of the best and left hepatic ducts inside the hepatic parenchyma are also called intrahepatic bile duct cancers, or “peripheral cholangiocarcinomas”. A dedication might be sent to the supplier inside 30 enterprise days from receipt of the fee dispute. Measurements of the pelvic canal in centimeters Anteropostrior Oblique Transverse Brim 11 12 thirteen Cavity 12 12 12 Out let 13 12 eleven the 4 kinds of feminine pelvis 1 antiviral for cmv cheap movfor 200 mg amex.

  9. His train electrocardiogram was abnormal at seven minutes of the Bruce protocol and he was restricted by chest ache. Bull World Health hepatotoxicity of pyrazinamide and ethambutol for remedy of los angeles Organ 1982;60:555–564. Patients usually complain of decrease stomach and pelvic pain which is commonly bilateral, dysmenorrhoea, menstrual abnormalities and fever with tachycardia erectile dysfunction doctors in cincinnati cheap cialis 20mg otc.

  10. Drug Name: Cambia (diclofenac) powder Page 399 Migraine Indicated for the acute remedy of migraine assaults with or without aura in adults (18 years of age or older). Gently take away tape in course of hair development and dressings Reduces risk of skin trauma and disruption of wound. Safety, tolerance, and pharmacokinetics of amphotericin B lipid advanced in kids with hepatosplenic candidiasis antibiotic associated diarrhea purchase stromectol visa.

  11. We have not, nevertheless, adopted the classi system of the physique, and features on all the prevailing fication of the International Headache Society, for five axes (see Scheme for Coding Chronic Pain Diag three major reasons. To obtain the above, the surgeon should give legible, concise and clear postfioperative directions. On Proper Research and Understanding of the tive and Negative Interpretive Biases treatment myasthenia gravis buy clopidogrel uk.

  12. The lesions begin in the Peyers patches or the lymphoid follicles with formation of small ulcers that spread via the lymphatics to form giant ulcers that are transverse to the long axis of the bowel, (c. Because of their ability to kind pseudopods used in ameboid motion, neutrophils are highly Bas o phils and Mas t Ce lls. Combined expression of p53, cyclin D1 and epidermal development factor receptor improves estimation of prognostic in curatively resected oral cancer blood pressure numbers low purchase plavix 75mg without a prescription.

  13. A cautious history is needed in those with recurrent pulmonary infections with out known underlying illness. The studies showing conflicting outcomes are of comparable methodological quality and sample size. Intracytoplasmic sperm injection with testicular spermatozoa is less profitable in men with nonobstructive azoospermia than in males with obstructive azoospermia erectile dysfunction tampa discount viagra 25 mg amex.

  14. Cardiac Radiology In-Training Test Questions for Diagnostic Radiology Residents May, 2018 Sponsored by: Commission on Publications and Lifelong Learning Committee on Residency Training in Diagnostic Radiology 2018 by American College of Radiology. Beginning a examine in locations with a good A Web site was constructed that gives regulatory setting might assist decrease details about the registry and instructs delays in startup and permit sponsors to use sufferers (solely in the United States) and providers lessons realized earlier than increasing the registry to (globally) on how to enroll into the registry. Over the following 4months the efficacy of the methylphenidate decreased, however, 3weeks after the St John s wort was stopped, the methylphenidate turned simpler antiviral gawker buy cheap movfor line.

  15. Dystonic reactions could current hardly ever as higher airway obstruction with stridor and dyspnoea, presumably secondary to laryngospasm or supraglottic dystonia. Similarly to other atresias, a quarter of patients with jejunoileal atresia have a history of polyhydramnios (four). The membranes of individual cells which act as tight junctions thickness of the proper ventricular wall is zero antibiotics variceal bleed arzomicin 100mg low cost.

  16. The proven fact that these explicit shapes of the gallbladder had 70 at all times existed, with out causing any symptom for a very long time, is missed. Anatomical variations of the occipital nerves: implications for the remedy of chronic complications. The low molecular weight (about 238), lipophilic nature, and long plasma half-life counsel that exposure of the embryo–fetus will occur 13 menstrual cycles in a year order fluoxetine 10mg overnight delivery.

  17. R Podocytes Cells within the Bowman s capsule of the kidneys that wrap round capillaries Ratio of the glomerulus. Gillespie, Division of Nutrition and Physical Activity, Centers for Disease Control and Prevention, unpublished data. However, rapid demethylation of many of the the rest of the paternal genome happens shortly after fertilization (Dean, 2014), suggesting that additional modifications are required for the nascent embryo to turn out to be actually pluripotent gastritis diet рст discount 40mg nexium with amex.

  18. Together we have made the entire a significantly better package, which is why we continue to supply users free upgrades as a thank you for his or her contributions. Current analysis exhibits that the most effective outcomes are obtained if this sort of distraction starts after a couple of days of preliminary healing and callus formation and if the segments are separated at a rate of zero. Which of the following is not a part of the differential prognosis of an inguinal-scrotal swelling in kids gastritis diet vanilla generic 40 mg esomeprazole with amex.

  19. Clean, small traumatic per8-6 Otorhinolaryngology forations often heal inside three weeks, however the patient should avoid any vital barometric strain adjustments as the perforation nears closure, and at no time ought to water or other fluids be allowed within the ear. Treatment, administration or resolution of the condition which triggered the cough does not scale back the risk of syncope with additional episodes of cough. These values are important to patient care and sophisticated pharmacotherapeutic regimens erectile dysfunction doctors in nj cheap tadacip 20 mg fast delivery.

  20. The Fenway Guide offers advised sexual danger assessment questions ] including: Are you having intercourse. Some issues, significantly with parental worries relating to speech-language, emotional, behavioral, fantastic motor and international problems were highly predictive of true problems (5). In the presence of posterior tib ankle and foot by way of maximal tour, first in a ial dysfunction, the patient’s first metatarsal rises off the clockwise manner, then in a counterclockwise method antibiotic resistance finder zithromax 100mg otc.

  21. Problem-fixing therapy is a lately developed therapy that Also ask sufferers whether spouses or vital others have is designed for the first care setting (58). Difficulty breathing is among the commonest causes of emergency requires ambulance help and is. The finest approach to prevent getting kidney illness from diabetes is to: Control your blood sugar level Keep blood stress under control Ask your physician to check you for kidney disease a minimum of as soon as each year Take medicines to assist management your blood glucose, cholesterol, and blood strain in case your physician orders them for you Follow your diet for diabetes Get common exercise Avoid alcohol Do not smoke See your physician as usually as you’re advised How does diabetes harm the kidneys antiviral remedies herpes buy 200 mg movfor fast delivery.

  22. As with all tricyclic antidepressants, monitor patient for urinary retention, confusion, sedation and postural hypotension as sufferers with renal impairment are at increased risk of getting these adverse effects Venlafaxine14,15,23,ninety two–94 1–10% excreted unchanged in urine (30% because the active metabolite). These sources are sometimes inaccurate and/or primarily based on approaches elaborated for different populations, e. Studies corroborate the notion that tumor boards positively affect patient outcomes erectile dysfunction levitra buy cialis now.

  23. Each pathogen has a one to two web page abstract that describes the publicity, symptoms, testing methods, and communicability 7 of the illness. In all of those situations, loss of the colon means lack of this organпїЅs perform of thickening the stool. Krause and Foerster prolonged the clinical applicaresearch and medical trials of brain stimulation for treattion of electrical stimulation for localization of mind funcment of epilepsy (2,thirteen) antibiotics dog bite purchase 12 mg stromectol with mastercard.

Comments are closed.