Thursday, June 25, 2020

Longshot Stakes: Probability Or Edge

Longshot Stakes: Probability Or Edge


Notwithstanding the specifc advice outlined in Kelly's Multiple Personality Disorder and Kelly And Mutually-Exclusive Outcomes relating to AvK events, consider an idealized horse-racing scenario where you have identified two selections: High Expectations at 2/1 with a 40% win probability and In With A Chance at 20/1 and a 10% chance of winning. Assume further that you are planning to bet ¤50 (Bankroll: ¤500) on High Expectations. How much should you bet on In With A Chance?

Win Probability Stakes

Selection S/P Win% Edge Stake Profit
High Expectations 2/1 40% 0.20 ¤50.00 ¤100.00
In With A Chance 20/1 10% 1.10 ¤12.50 ¤250.00

Edge Stakes

Selection S/P Win% Edge Stake Profit
High Expectations 2/1 40% 0.20 ¤50.00 ¤100.00
In With A Chance 20/1 10% 1.10 ¤27.50 ¤550.00

If your answer is ¤12.50, then your handicapping is driven by win probability as High Expectations (40%) is four times more likely to win than In With A Chance (10%). Alternatively, if your answer is ¤27.50, then your handicapping is driven by edge as In With A Chance (1.10) has 5.5 times more edge than High Expectations (0.20).

The Kelly Criterion advises that you choose the stake so that the amount you win is proportional to your edge. Most punters choose stakes based on win probability and, as a result, they are not exploiting their advantage and are 'leaving money on the table'!

Saturday, May 23, 2020

Session Handicapping: Stop Or Continue?

Intellectually speaking, we are value handicappers and if a market offers at least one value bet then we are prepared to trade it. However, psychologically speaking, we are session handicappers and we want to maximize our winnings at each session to minimize feelings of regret. These feelings can result from either getting ahead early and then losing later in the session or, alternatively, feeling that we are leaving money on the table because we quit the session too soon.

Bruss (2006) provides us with an approximation to an optimal stopping algorithm in these circumstances. For example, let us assume that we are trading multiple, sequential, sports markets on any given Sunday. We have completed seven markets of an eleven-market session and have accumulated two wins. Should we continue to the next market or stop for the day?

The decision formula is, as follows:
If (N – K) < ((K + 1 - G) / G) Then "Stop" Else "Continue"
In our example, with [N = 11, K = 7, and G = 2]  the decision is to continue. But, if after the next market, we have not secured another win [N = 11, K = 8, and G = 2] then the decision is to stop!

Sunday, April 12, 2020

Kalman Filter Handicapping

Last Performance Or Median Performance

With respest to historical results, performance ratings and time ratings are routinely calculated, by various organizations, using proprietary formulae or algorithms that are unknown to the average handicapper. Given a track record of such past results, how should we evaluate a horse's latent ability:.
  • last performance, or
  • median performance.
Last performance captures current form but what if that last result was an unusually good or an unusually bad performance? In that context, we rely more heavily on median performance to better reflect latent ability!

As a guide to which is a better overall indicator (signal) of ability, we can adapt a Kalman Filter to track a dynamic model (changing ability of horse) using an error-prone, measurement process (time ratings: 67..115) to guide our intuitions. The filter predicts the next performance level (ratings: 90..116) beginning with an arbitrary starting-point (90), and proceeds through a series of predict-measure-update iterations using a Bayesian-like updating algorithm (predict=prior, measure=likelihood, update=posterior).
We are probably making unwarranted assumptions about the levels of process noise and measurement error in applying this filter to the current scenario. Plus, we are using a changing time interval between measurements that is non-standard. Nevertheless, we can see from the worked example that the last prediction (116) is a more accurate reflection of current ability than the median performance (108).
In order to experiment with the embedded worksheet, you may need to alter the parameters, as follows:
  • X0 = Initial estimated rating,
  • P = Average estimated rating error,
  • Q = Average rating change per race, and
  • R = Average calculated rating error.
Obviously, you will also have to provide the calculated ratings for all past performances of interest!

Wednesday, March 18, 2020

Practical Dominance (PD)

In terms of our ongoing efforts to improve the handicapping process, we can strongly assert that it is easier to evaluate a four horse race than a nine horse race (all other things being equal). Keeping in mind our strong preference for eliminating alternatives over confirming selections, we can look to the Even Swaps Method (ESM) for a useful concept called practical dominance.
  • Select specific race using WCMI.
  • For each horse in race (using past performances):
    * Evaluate each contestant's form on at most five to seven attributes. See Tsai et al, 2008, Slovic,  1973 and Do You Really Need More Information from the CIA on the positive impact of additional information on confidence (Figure 5).
    * Convert the absolute ratings on each attribute into rankings across contestants.
    * Eliminate those contestants that are either completely dominated (unlikely) or practically dominated (likely) by another entrant.
    • In the sample race below, Alpha practically dominates Charlie as his rankings are superior on all attributes except A6.
    • Foxtrot, Golf, Hotel, and Juliet are similarly dominated.
  • Consider remaining contestants as potential trades using Kelly Criterion.

As ever, if we cannot find variables that account for sufficient variance in outcomes over and above that provided by market prices then we will not have an edge and we will lose our bankroll.

Saturday, December 22, 2018

Automatic Trading Using WCMI

Automatic Trading Using WCMI

Explore And Exploit

On which sports-trading events should we risk our capital? A good starting point is to ask the fundamental question of sports markets:

"Is the public market well-informed with respect to a specific event (Wisdom of Crowd)?"

Our proxy for identifying such events is to calculate the Wisdom of Crowd Market Index (WCMI) for all markets and to select only those events for which the market falls below a specific WCMI threshold (for example, 0.15). By focusing on these less well-informed markets, we are dramatically increasing the chances of identifying at least one overlay. In other words, the guiding principle is to explore all markets but only exploit those markets with low WCMIs. For UK Flat horse-racing markets, FlatStats is the logical starting point in this process.

Market Selection Using WCMI

The following Betfair simulation shows how an automated trading solution would first filter those markets with low WCMI and then, having identified at least one overlay, bet on one or more selections as calculated by the Single Event Multiple Selections variant of the Kelly Criterion:
  • Filter markets (e.g. identify 5f sprints);
  • Calculate WCMI for each filtered market;
  • Rank contenders in market on fundamental factors;
  • Create odds-line for contenders based on ratings;
  • Check market contains at least one overlay;
  • Make selections using Kelly Criterion; and
  • Submit bets.

Monday, November 26, 2018

Kelly's Multiple Personality Disorder

For the professional sports-trader, Kelly has three separate mathematical forms:
  1. Single Event, Single Selection;
  2. Single Event, Multiple Selections; and
  3. Multiple Events, Multiple Selections.

Single Event, Single Selection

This is the basic case as outlined in cursory descriptions of the Kelly Criterion. We identify a selection, which gives us an edge over the market and calculate the optimal stake to maximize that advantage. For this purpose, the Excel Add-In offers the KellySingleStake sports-trading function that accepts Decimal OddsWin Probability, and Multiplier parameters. The KellySingleStake function is the correct formula for AvB events such as moneyline markets in MLBNBA, and the NFL.

Decimal OddsWin ProbabilityStake
2.0053%6.00%

Single Event, Multiple Selections

In AvB events, the general advice to only bet the overlay is technically correct. However, in an AvK event, such as horse-racing and golf with a number of mutually-exclusive outcomes this advice is not strictly correct. Kelly betting is predicated on maximizing the logarithm of the handicapper's bankroll over the long-term. But, in the short-term, that goal is translated into not losing specific events when the price is right! The key role played by overlays in mutually-exclusive events is that there must be at least one such betting option available in any event on which we wish to bet. Beyond that, the specific choices will only be governed by maximizing the logarithm of our bankroll! The sports-trading function, KellyMutExStakes (array formula), with Decimal Odds Range and Win Probability Range inputs will identify the optimal selections and stakes.

EntryDecimal OddsWin ProbabilityTrader EdgeStake
Charlie5.5020.00%10.00%5.96%
Alpha2.62540.00%5.00%10.59%
Bravo3.2530.00%-2.50%6.25%
Delta6.008.00%-52.00%0.00%
Echo21.002.00%-58.00%0.00%

Multiple Events, Multiple Selections

For Nx(AvB) events, such as trading Ryder Cup golf singles matches or NFL games on Any Given Sunday, we need the sports-trading function, KellySimEvtStakes (array formula), with Decimal Odds Range and Win Probability Range parameters to identify the optimal stakes.

EntryDecimal OddsWin ProbabilityTrader EdgeStake
SvWH1.5075.00%12.50%9.10%
BHAvB1.4080.00%12.00%11.70%
DvAV1.6070.00%12.00%6.825%
LvCP1.3085.00%10.50%14.70%

Note that Example #2 in the Pinnacle Guest article - The real Kelly Criterion - calculates the wrong stakes as can easily be confirmed by entering the decimal odds and win probabilities into the SBR Kelly Calculator for four independent events.

Saturday, July 07, 2018

Betting Strategy Calculator (Itty.Bitty.Site)

Itty.Bitty.Site is a new URL-based microsite generator, created by Nicholas Jitkoff, that is sure to revolutionise the web in ways that we cannot yet imagine (hopefully, in positive ways).

To that end, we have created one of the first Itty.Bitty HTML5 apps (calculator) that runs a simple assessment of your  Betting Strategy. Enjoy!

Thursday, June 28, 2018

Speed-Stamina Course Profiles And Juvenile Races

In an earlier posting, Speed-Stamina Fingerprints, we outlined an approach to "hoof-printing" racecourses in terms of their speed-stamina profiles based on the best times for various distances using a power-law equation, approximately of the form: Time=Speed*DistanceStamina. This approach also allows us to effectively project performances by inexperienced 2yo and 3yo horses, as follows.

For example, supposing a 2yo colt turns in an eye-catching performance in a novice race and is entered in a graded stakes race 10 days later. Historical data tells us that the median winning time of this future event is
73.57s. The question we want to ask: Is the maiden winning colt likely to be competitive in the graded stakes event? One way of answering this question is to translate the maiden performance into an equivalent performance at the graded stakes course and distance. Using our hoof-printing technique produces a time of 73.40s telling us that this promising colt is likely to be an above average contender for the graded stakes event. Fast-forward to race day and our selection wins in a time of 73.51s (just 0.10s slower than projected). (Note that we were not restricted to choosing performances at the same distance as the future event).

Obviously, this technique has restrictions in terms of producing realistic projections. It works best with:
  • Maiden 2yo and 3yo races at sprint distances;
  • Races on “Good” or “Good-To-Firm” going; 
  • Recent “In-The-Money” races;
  • Projections from one graded stakes racecourse to another (e.g. Newmarket to York); and
  • Horses that race prominently and do not require "luck in running".

That said, it has potential for projecting future times based on performances at racecourses with vastly different configurations, a goal which cannot be achieved by speed figures!

Thursday, May 31, 2018

CsvPredictor: Turns Historical Record Into Mini Prediction System

CsvPredictor turns a historical record in CSV format into a mini prediction system. The program is completely agnostic with respect to the domain knowledge captured in the file (e.g. weather conditions, successful movies, past performances). 
Running CsvPredictor.exe with a valid csv file will result in a QnA session based on the salience of the features (columns), effectively, turning a standard flat file into a data mining classification tree
For example, whether or not to play ball given current weather conditions:
    C:\CsvPredictor>CsvPredictor.exe PlayBall.csv
    CsvPredictor v2.41
    Input File: "PlayBall.csv" (14 records and 4 features)
    Top Features (Salience)
    Outlook   0.46176
    Humidity  0.36618
    Wind      0.11693
    Q. Is Outlook  =  ["Overcast"; "Rainy"; "Sunny"]?  Sunny
    Q. Is Humidity =  ["High"; "Normal"]?  Normal
    A. Predict: PlayBall = True
    C:\CsvPredictor>
or checking the likelihood of a new movie being a blockbuster!
    C:\CsvPredictor>CsvPredictor.exe Movies.csv
    CsvPredictor v2.41
    Input File: "Movies.csv" (2690 records and 5 features)
    Top Features (Salience)
    Budget              0.34871
    Genre               0.26719
    Production Country  0.24084
    Runtime             0.11430
    Q. Is Budget =  ["<=15000000.00"; "<=44263333.33"; "<=380000000.00"]? 
                    <=15000000.00
    Q. Is Genre =  ["Action"; "Adventure"; "Animation"; "Comedy"; "Crime"; 
                    "Documentary"; "Drama"; "Family"; "Fantasy"; "Foreign"; 
                    "History"; "Horror"; "Music"; "Mystery"; "Romance"; 
                    "Science Fiction"; "Thriller"; "War"; "Western"]?  
                    Action
    Q. Is Production Country =  ["Australia"; "Canada"; "Hong Kong"; 
                                 "Ireland"; "United Kingdom";
                                 "United States of America"]?  
                                 United States of America
    Q. Is Runtime =  ["<=99.47"; "<=115.00"; "<=248.00"]?  <=115.00
    Q. Is Release Month =  ["<=5.00"; "<=9.00"; "<=12.00"]?  <=12.00
    A. Predict: Success = True
    C:\CsvPredictor>
Note, it is very important to state that this program is only intended to provide an easy entry-point to data analytics for handicappers and is, in no way, intended to replace the advice and expertise of professional data analysts and statisticians!

Sunday, May 06, 2018

ExMachina Handicapping Rules (Excel Add-In)

Many of us spend countless hours trawling through historical records in a vain attempt to gain new insights into the key fundamental factors that will enhance our sports handicapping. Unfortunately, our innate cognitive biases (e.g. anchoring, availability, confirmation) continually invade all attempts at a quasi-scientific approach to data mining. Ideally, we would like a quick-fix solution to this dilemma – no new learning required and automatically works with available tools!

To that end, enter the ExMachina Excel Add-In (32-bit and 64-bit), which takes as input a CSV file of historical data and outputs a set of decision rules. In brief, the goal is to identify the most salient attributes in the data file and to create a set of rules based on that specific subset. Note, it is very important to state that this Excel Add-In is only intended to provide an easy entry-point to data analytics for handicappers and is, in no way, intended to replace the advice and expertise of professional data analysts and statisticians.

If you are interested in reviewing how the Excel Add-In works, then download the following MP4 file – ExMachina Handicapping Rules.

Monday, March 12, 2018

Cheltenham 2018: Supreme Novices Hurdle Handicapping

It is time once again for our annual attempt to find live longshots to finish in the money in the Supreme Novices Hurdle (G1) at Cheltenham 2018.

As ever, our approach is based on the following premises:
1. Supreme Novices Hurdle is similar to Kentucky Derby - young horses, many 
attempting graded stakes, championship race for first-time with little form in book.
2. Eliminate non-contenders and whatever remains, no matter how improbable, are our selections. 
Horses are only eliminated under one heading even though they may qualify for elimination under 
multiple headings:
    a. Pedigree mismatch to former winners [Sharjah].
    b. Small fields [Slate House].
    c. Poor "Late-Speed" [First Flow, Shoal Bay].
    d. Poor Cheltenham Form [Golden Jeffrey].
    e. Not suited by Going [Saxo Jack, Trainwreck].
    f. Not suited by L-H track [Getabird].
    g. Poor FPR [Khudha, Lostintranslation, Mengli Khan].
    h. Over-exposed form [Claimantakinforgan, Dame Rose, Western Ryder].
    i. Weak "Strength-Of-Schedule" [Simply The Betts].
8. Minimum price 10/1 [Kalashnikov, Summerville Boy].
This leaves Paloma Blue 13/1Us And Them 33/1, and Debuchet 40/1 as our selections with Kalashnikov 4/1 and Summerville Boy 8/1 only eliminated on price!

Note: Given the limited exposure of all the runners, we are not saying that those we have eliminated are not going to win - simply that they did not meet our criteria for live longshots to run in the money. The key takeaway, as always, is using a process of elimination not selection for identifying contenders.

Thursday, March 08, 2018

Kelly And Mutually-Exclusive Outcomes (AvK)

In AvB events, such as baseball, basketball, or football, the general advice to only bet the overlay is technically correct. However, in an AvK event, such as horse-racing, with a number of mutually-exclusive outcomes this advice is not strictly correct. For example, in the following racecard (sorted in decreasing e.v order), even though the handicapper has rated Bravo's win probability (Ï€) at 29%, it is an underlay and not included in the list of bet selections:

hpπe.vΣ(π)a.kb.k%
Echo21.007.00%1.4700.0700.0480.9772.49%
Charlie5.5020.00%1.1000.2700.2290.9472.78%
Bravo3.2529.00%0.9430.5600.5370.9510.00%
Delta6.0013.00%0.7800.6900.7041.0470.00%
Alpha2.5031.00%0.7751.0001.1040.0000.00%

But, if Bravo's price was to drift to 3.35, then this underlay is now added to the list!

hpπe.vΣ(π)a.kb.k%
Echo21.007.00%1.4700.0700.0480.9772.56%
Charlie5.5020.00%1.1000.2700.2290.9473.05%
Bravo3.3529.00%0.9720.5600.5280.9321.18%
Delta6.0013.00%0.7800.6900.6951.0150.00%
Alpha2.5031.00%0.7751.0001.0950.0000.00%

Kelly betting is predicated on maximising the logarithm of the handicapper's bankroll over the long-term. But, in the short-term, that goal is translated into not losing specific events when the price is right! The key role played by overlays in mutually-exclusive events is that there must be at least one such betting option available in any event on which we wish to bet. Beyond that, the specific choices will only be governed by maximising the logarithm of our bankroll!



Note
: Blindly backing high probability combinations such as Alpha, Bravo, and Charlie (total win probability = 80%) will eventually lead to ruin. In order to calculate the correct stakes, make sure table is sorted by column 'e.v.' in descending order!

Tuesday, December 12, 2017

Vendire-Ludorum Excel Add-In

Treat yourself to an Excel Add-In (32-bit and 64-bit [Windows] that includes some of the standard functions on which we have come to rely in our daily sports trading. Among the functions available are the following:
  • Edge,
  • Expected Value,
  • Time Value,
  • Kelly Single Stake,
  • Kelly Mutually-Exclusive Stakes,
  • Kelly Simultaneous Independent Events (5),
  • Mark-To-Market,
  • Risk-Of-Ruin, and
  • Wisdom-Of-Crowd Market Index (WCMI).
In addition, there is a sample spreadsheet highlighting the various functions through worked examples from Haigh, Paulos, and Yao.

Sunday, November 26, 2017

Mark-To-Market And Hedging

Following careful analysis of the next race, your assessment of the odds is 4/1(5.00) - a 20% edge on the market price of 5/1 (6.00) - with respect to your selection. Flushed with confidence, you place a $250 (4%) win bet on InTheMoney at 5/1 (6.00). Time to sit back and wait for the profit to roll in? Maybe!
Consider for a moment -  what is the current market value of your investment?. When you place the initial trade, its market value is $250=[($250*6.00)*(1/6.00)]. Roll tape and the market turns in-play as InTheMoney sets the early pace with measured fractions. Turning into the stretch it looks an even-money chance at worst to win. Freeze frame and consider once again - what is the current market value of your investment?. Assuming the market is now efficient with respect to InTheMoney’s win probability, the updated market value is $750=[(($250*6.00)*(1/2.00)]. In other words, at this point in the race, you have already won $500=[$750-$250]. Fast forward to the finish-line and InTheMoney is beaten by a late closer, JustInTime. Now, the really interesting question is - how much have you lost? If you had no choice but to only back your selection before the race, then you have lost $250. But, if you also had the option in-play to hedge the win bet at even-money, then you lost $750! (see Weighing the Odds in Sports Betting (Ch.4)).
In summary, no trade is complete without both a back and a lay bet or, in other terminology, an opening and a closing position.

Using our knowledge of time averages, we can select a lay price and calculate a hedging stake to maximize our median bankroll over time.

Thursday, August 31, 2017

Horse-Racing Overlays

Sports traders sometimes conflate AvB events with AvK (K = N-1) events (N = number of entrants). The prototypical AvB game is a football match and the equivalent AvK example is horse-racing. Some experts encourage traders to identify a single overlay in both events and bet accordingly. Whereas this advice is generally correct for AvB events, it is not correct for AvK events.
In horse-racing, you should only select those races with at least one overlay for further examination. But, as Ravi Phatarfod points out in his excellent 1996 paper Betting Strategies In Horse Races, a gambler is more likely to correctly assess that the winner will be one of three horses than being able to correctly assign win probabilities to each individual horse. And, as John Haigh illustrates in Taking Chances, Kelly betting on horse races also encourages us to spread our risk across multiple entrants including, on occasion, those from all three categories of bets, favorable (positive expected value), fair (zero expected value), and unfavorable (negative expected value) bets. This approach guarantees over time that you will minimize your risk of ruin (total loss of capital).

Note: You must enter horse details in descending e.v. order only.


Sunday, July 16, 2017

Engineer, Physicist, And Statistician

Engineer,_Physicist,_And_Statistician.md

Many years ago, as a young postgraduate student, two colleagues (an engineer (E) and a physicist (P)) and I would meet every Saturday for an early lunch to discuss the week’s events in our respective disciplines and to give our differing perspectives on world events. It was an innocent and idealistic exercise driven by youthful enthusiasm and naivete. Naturally, our discussions ranged from the sublime to the ridiculous and everything in between.

Time passed and as our careers evolved we drifted apart and lost contact. Then a few years ago, I unexpectedly ran into E at Royal Ascot. After we engaged in some good-natured banter about the humbling nature of the aging process and introduced our respective wives, our attention turned to the Group 2, 6f, Coventry Stakes (2yo). I asked E what he liked in the race and how he made his selections. He turned to me in disbelief and said, “For 2yo races, I use the method you recommended to me back in the day to identify a select band of unexposed horses to exploit throughout the season.” Completely bewildered I said, “Remind me”. He then proceeded to outline an adaptation of the Bayesian Bandit (Thompson Sampling) “explore-exploit” strategy as used in the multi-armed bandit problem. To which, I blurted out, “You mean, it works!”. I quickly pointed out that I must have thought at the time it was a strategy worth exploring but that all the kudos should go to him for exploiting it so successfully. Engineers rule by defeasible reasoning.

Later that evening, my wife teased me by asking if I had given mathematical advice to everyone I had ever met and when I looked surprised by the question she added wickedly, “My hero, so brave, so strong!”

Thursday, June 29, 2017

True Talent Levels

It is easy to conflate Which team is number one? with Which team wins today? The former is decided over the course of a regular season and is primarily driven by skill (talent) but the latter changes on a daily basis and when there are two roughly equal opponents it is principally governed by luck!
With respect to being number one, the definitive review of the field is provided by Langville and Meyer (2012) in Who's #1?: The Science of Rating and Ranking. And, in terms of estimating true talent levels, 
Adam Dorhauer delivers two excellent articles worthy of publication, Elo vs. Regression to the Mean: A Theoretical Comparison and Regression with Changing Talent Levels: The Effects of Variance.