Betfair cross-market arbitrage
In this post I will explain cross-market arbitrage on Betfair, including how to determine whether arbitrage opportunities exist, and how to exploit them by placing bets of the right size.
In general, arbitrage refers to the simultaneous buying and selling of something in different markets, exploiting small price differences to make a profit. On Betfair, it means buying positions that collectively cover all possible outcomes of an event, where the prices guarantee a small but certain profit (here I use price to refer to the decimal odds).
Soccer events sometimes have both Under/Over markets as well as Total Goals markets offered. Consider the following two selections:
ID | Market | Selection | Pays if score is |
---|---|---|---|
A | Over/Under 1.5 Goals | Under 1.5 Goals | 0 – 0, 0 – 1, 1 – 0 |
B | Total Goals | 2 Goals or More | Any other score |
If you buy a back bet on A, you are betting that the match will see less than 1.5 goals scored in total. If you back B, you are betting that at least 2 goals will be scored. It is easy to see that these two selections exhaust all possible outcomes for the event - if the final score is 0-0, 0-1, or 1-0 you will be paid buy the first bet, otherwise by the second.
Now imagine the current prices on the exchange are as follows:
ID | Market | Selection | Back | Lay |
---|---|---|---|---|
A | Over/Under 1.5 Goals | Under 1.5 Goals | 2 | 2.1 |
B | Total Goals | 2 Goals or More | 2.1 | 2.2 |
You choose to buy the following bets:
- Back A with a bet size of £5.12
- Back B with a bet size of £4.88
In total, you spend £10. If A wins, your total return (ignoring commission fees) is £10.24:
ID | Market | Selection | Outcome | Payoff |
---|---|---|---|---|
A | Over/Under 1.5 Goals | Under 1.5 Goals | Win | 2 × £5.12 = £10.24 |
B | Total Goals | 2 Goals or More | Lose | 0 |
On the other hand, if B wins your total return is £10.25:
ID | Market | Selection | Outcome | Payoff |
---|---|---|---|---|
A | Over/Under 1.5 Goals | Under 1.5 Goals | Lose | 0 |
B | Total Goals | 2 Goals or More | Win | 2.1 × £4.88 = £10.25 |
In either case, you get back more than the £10 you put in. Since you know that either bet A or B will win, by purchasing these two bets you are guaranteed a small profit (£0.24 if A wins, and £0.25 if B wins, excluding commission which I discuss below).
This is the basic premise behind Betfair arbitrage: find bets that collectively cover all outcomes, check whether the prices allow an arbitrage, and if so, buy the right amount of each to guarantee a profit for any outcome.
In general, arbitrages can include more than two bets, and can include both back and lay bets. Here is another example with three bets:
ID | Market | Selection | Back/Lay | Pays if score is |
---|---|---|---|---|
A | Correct Score | 0 – 0 | Back | 0 – 0 |
B | <Team 1> Win to Nil | No | Lay | {1, 2, 3, ...} – 0 |
C | <Team 2> Total Goals | 1 Goals or More | Back | {0, 1, 2, ...} – {1, 2, 3, ...} |
Finding groups of bets that cover all outcomes like this is relatively easy, but the selections must of course be priced in a way that allows arbitrage. I will now discuss how to determine this.
Let’s first clarify the liabilities and payoffs for each bet type. Let $p_i$ be the market price (decimal odds) of bet $i$ and $v_i$ be the bet size (the volume you submit to the exchange when making the bet, also referred to as “backer’s stake”).
Bet type | Liability (cost to play) | Return if bet wins | Profit if bet wins |
---|---|---|---|
Back | $ v_i $ | $ v_ip_i $ | $ v_i(p_i-1) $ |
Lay | $ v_i(p_i-1) $ | $ v_ip_i $ | $ v_i $ |
To place a back bet, you pay $v_i$ to the exchange to place the bet. If you win, you get back $v_ip_i$, which is $v_ip_i - v_i = v_i(p_i-1)$ in profit. If you lose, you get back nothing (and lose your initial $v_i$).
To place a lay bet, you must cover the backer’s possible profit of $v_i(p_i-1)$. If you win, you get this back, plus the backer’s stake:
$$ v_i(p_i-1) + v_i = v_ip_i $$
Your profit in this case is $v_ip_i - v_i(p_i-1) = v_i$ (the backer’s stake). If you lose, you lose the initial $v_i(p_i-1)$ you spent.
Suppose we have an arbitrage consisting of $N$ bets (both back and lay), and we know that exactly one of these bets will win and all others will lose. We define the book percentage as the total cost to buy all of these bets in order to guarantee exactly £1 return no matter the outcome. Since the return for both back and lay bets is $v_ip_i$,
$$ v_ip_i = 1 \implies v_i = \frac{1}{p_i} \quad\textrm{for all bets $i$}. $$
Let us denote the set of back bets in the arbitrage as $\textrm{BACK}$ and the set of lay bets as $\textrm{LAY}$. Then the cost to buy all of the back bets is
$$ \sum_{i\in\textrm{BACK}}v_i = \sum_{i\in\textrm{BACK}}\frac{1}{p_i} $$
and the cost to buy all of the lay bets is
$$ \sum_{i\in\textrm{LAY}}v_i(p_i - 1) = \sum_{i\in\textrm{LAY}}\frac{p_i-1}{p_i} $$
So the total cost to buy all bets in the arbitrage is
$$ b := \textrm{book percentage} = \sum_{i\in\textrm{BACK}}\frac{1}{p_i} + \sum_{i\in\textrm{LAY}}\frac{p_i-1}{p_i} \tag*{$(1)$} $$
If $b<1$ then there is an arbitrage opportunity, otherwise there isn’t.
Suppose we have computed the book percentage $b$, and it is less than one. How do we determine the size of each bet to buy?
In practice, this will usually be limited by the volume available on the exchange. For simplicity, however, let us assume that there is infinite volume available and we instead have a limited budget of £$t$ to spend in total across all bets.
By definition of $b$, to guarantee a win of £1 we must spend £$b$. The return of both back and lay bets scales linearly with liability – if we risk twice as much, we win twice as much. Therefore, if we spend a total of £$t$, our guaranteed return scales to become $t/b$ and
$$ v_i = \frac{t}{p_ib}. \tag*{$(2)$} $$
This gives the volume we must buy of each bet to guarantee a return of $t/b$ on any outcome. The guaranteed profit is then
$$ \frac{t}{b} - t = t \cdot \frac{1-b}{b} $$
This is positive iff $b < 1$, and gets larger as $b$ gets smaller, as expected.
To find and exploit arbitrage opportunities:
- Find a group of bets that collectively cover all outcomes of the event.
- Compute the book percentage $b$ of the group: For each bet, add $1 / p_i$ if it’s a back, and $(p_i - 1) / p_i$ if it’s a lay.
- If $b < 1$, arbitrage is possible. Otherwise it isn’t.
- If arbitrage is possible, buy $v_i = t/(p_ib)$ for each bet $i$.
Here is an example of how to compute the book percentage and bet sizes for the three-way arbitrage above. Suppose the market prices were:
ID | Market | Selection | Back/Lay | Back | Lay |
---|---|---|---|---|---|
A | Correct Score | 0 – 0 | Back | 18 | 18.5 |
B | <Team 1> Win to Nil | No | Lay | 1.2 | 1.21 |
C | <Team 2> Total Goals | 1 Goals or More | Back | 1.32 | 1.33 |
The book percentage for this group is
$$ b = \frac{1}{18} + \frac{0.21}{1.21} + \frac{1}{1.32} \approx 0.987 $$
Since $b<1$, there is an arbitrage opportunity. If we have $t=£100$ to spend, then
- For bet A, we should back for $v_A = 100 / (18 \times b) \approx £5.63$ at $18.0$
- For bet B, we should lay for $v_B = 100 / (1.21 \times b) \approx £83.76$ at $1.21$
- For bet C, we should back for $v_C = 100 / (1.32 \times b) \approx £76.78$ at $1.32$.
Here are our possible outcomes:
ID | Market | Selection | Back/Lay | Price | Size | Liability | Return if win |
---|---|---|---|---|---|---|---|
A | Correct Score | 0 – 0 | Back | 18 | 5.63 | 5.63 | 101.34 |
B | <Team 1> Win to Nil | No | Lay | 1.21 | 83.76 | 17.59 | 101.35 |
C | <Team 2> Total Goals | 1 Goals or More | Back | 1.32 | 76.78 | 76.78 | 101.35 |
Our total liability (cost to buy all bets) is £100, and we get back approximately £101.35 no matter the outcome of the event, for a profit of £1.35.
The above analysis ignores Betfair commission, which can make or break arbitrages when the book percentage is very close to one. Commission is charged by Betfair as a percentage of your net profit on each market. The rate varies according to a few factors but is usually around 5%. Importantly, commission is charged per market, so that your losses in other legs of the arbitrage do not reduce the commission paid on the winning bet. Commission charges can therefore kill an arbitrage that is otherwise viable.
The easiest way to deal with commission is to adjust prices to take it into account, and then simply use these new prices in the computations above.
Let us define the after-commission price $p'_i$ as the adjusted price of a bet that takes into account commission. The after-commission price will always be worse than the original price (lower for backs, higher for lays). Assume our commission rate is $c$, and that all bets in the arbitrage group are from different markets (almost always the case).
For back bets,
$$
\begin{align}
\textrm{return after commission} &= \underbrace{v_ip_i}_\textrm{original return} - \underbrace{\overbrace{v_i(p_i-1)}^\textrm{profit} \cdot c}_\textrm{commission} \\
&= v_i\left[ p_i(1-c) + c \right].
\end{align}
$$
The after-commission price is then simply the new multiplier of $v_i$, that is
$$ p'_i = p_i(1-c) + c. $$
In other words, buying a back bet of size $v_i$ at price $p_i$ with commission rate of $c$ is exactly equivalent to buying a back bet of size $v_i$ at price $p'_i$ with no commission.
Computing the after-commission price for lay bets is slightly more tricky since our liability depends on the price as well as the bet size. The original lay bet has liability $v_i(p_i-1)$ and win return of $v_ip_i - v_ic = v_i(p_i - c)$ after subtracting commission. We want to find an adjusted price $p'_i$ and adjusted volume $v'_i$ with the same liability and return, i.e.
$$
\begin{align}
v_i(p_i - 1) &= v'_i(p'_i - 1) \quad & \textrm{(matching liability)} \\
v_i(p_i - c) &= v'_ip'_i \quad & \textrm{(matching return)}
\end{align}
$$
We have two equations with two unknowns, $v'_i$ and $p'_i$. Subtracting the second equation from the first and rearranging we get
$$
\begin{align}
v'_i &= v_i(1-c) \\
p'_i &= \frac{p-c}{1-c}
\end{align}
$$
In other words, buying a lay bet of size $v_i$ at price $p_i$ with commission rate of $c$ is exactly equivalent to buying a lay bet of size $v'_i$ at price $p'_i$ with no commission.
How do we compute book percentage and bet sizes taking into account commission?
To compute book percentage, we simply use $p'_i$ in place of $p_i$ in equation 1 , for both back and lay bets. If the book percentage using the $p'_i$ is less than one, then we proceed to compute the bet sizes by equation 2 using the $p'_i$. We need to be careful with lay bets though, since equation 2 will give us $v'_i$ instead of $v_i$. To get the actual lay size to buy on the exchange, we need to rearrange for $v_i$:
$$ v_i = \frac{v'_i}{(1-c)}. $$
Continuing the example above, assume our commission rate is $c=0.05$. The after-commission prices are:
ID | Market | Selection | Back/Lay | $p$ | $p'$ |
---|---|---|---|---|---|
A | Correct Score | 0 – 0 | Back | 18 | 17.15 |
B | <Team 1> Win to Nil | No | Lay | 1.21 | 1.22 |
C | <Team 2> Total Goals | 1 Goals or More | Back | 1.32 | 1.30 |
Computing the book percentage gives
$$ b = \frac{1}{17.15} + \frac{0.22}{1.22} + \frac{1}{1.3} \approx 1.01 $$
and we can see that with a commission rate of $c=0.05$, the arbitrage is no longer viable.
Suppose instead our commission rate was $c=0.02$:
ID | Market | Selection | Back/Lay | $p$ | $p'$ |
---|---|---|---|---|---|
A | Correct Score | 0 – 0 | Back | 18 | 17.67 |
B | <Team 1> Win to Nil | No | Lay | 1.21 | 1.21 |
C | <Team 2> Total Goals | 1 Goals or More | Back | 1.32 | 1.31 |
Now our book percentage is $b\approx 0.99$, and there is an arbitrage opportunity. If we want to bet a total of $t=£100$, then using equation 2 with the after-commission prices gives:
ID | Back/Lay | $p$ | $p'$ | $v'$ | Size to buy | Liability | Return | Profit | Commission | Net return |
---|---|---|---|---|---|---|---|---|---|---|
A | Back | 18 | 17.67 | 5.69 | 5.69 | 5.69 | 102.42 | 96.73 | 1.93 | 100.49 |
B | Lay | 1.21 | 1.21 | 82.82 | 84.51 | 17.75 | 102.26 | 84.51 | 1.69 | 100.57 |
C | Back | 1.32 | 1.31 | 76.56 | 76.56 | 76.56 | 101.06 | 24.5 | 0.49 | 100.57 |
Size to buy is equal to $v'_i$ in the case of back bets, and $v'_i/(1-c)$ for lay bets. The remaining columns are calculated assuming we buy a bet of this size at price $p$, the actual price available on the exchange.
As we can see, with a commission rate of $c = 0.02$ we can lock in a profit of about 50p.
There are a few more complicating factors that you will have to take into account in practice, including rounding issues, minimum bet sizes , cross-matching and of course actually executing the orders quickly, since arbitrage opportunities are usually competed over. I will write more about these in a future post.
I would love to hear your feedback on this post! Email me at andrew@wrigley.io . You can also subscribe .