How to find an Automated Edge

To start your Automated Betting journey, you need to find an edge. Sounds simple but it requires a lot of testing and a lot of work to fine-tune it.

Stu is one of the top automated punters on Betfair with over a decade of experience successfully automating strategies on the Exchange. In this piece, he shares some of his learnings on how he has gone about finding a sustainable automated edge.

Covering everything from using BSP to make sure your bets get on to the psychology of dealing with variance, this article provides practical advice and valuable insights regardless of whether you’re new to the automation game or a seasoned pro yourself.

If you enjoy this, check out our Automation Github. We’re here to help you with your automation journey, and our Github is dedicated to sharing the tools and resources you need to succeed in this journey.


Introduction

As an automated punter, you are trying to find repeatable situations which provide an edge. You are likely to bet on many events, and thus accumulate lots of data for analysis.

You are realistically aiming for fairly low-profit margins after commission. The discussion below doesn’t apply so much to anyone who is automating the placement of just a few large bets (which is another perfect use of automation).


At some stage you need to place real bets

The usual first step is to trawl through data looking for some pattern or have an idea and backtest it. But that is only half the problem. You have to be able to get your money on! And this is harder than it may seem and becomes harder as you scale up.

Reasons include:

  • Other people are ahead of you in the queue
  • You are first in the queue but no-one will match all of your bet.
  • Your bets alter the market. Even a relatively small bet may alter someone else’s automated strategy looking at weight of money or what traded in the last second. The reaction may be silly, but the market alters nonetheless.
  • You are time-critical and someone else has faster internet/processing and beats you.

If your edge is in low liquidity markets eg some of the minor sports markets which are not near 100% then this is especially true. People might be backing their favourite teams for $5 to win by big margins regardless of odds, but you can’t get them to bet more.

The issue isn’t that you won’t get most of your bets matched, but you won’t get all. Your exposure per event is not predictable. And (see below), possibly your best cases are the ones you’ll get least on.


Start with the Betfair SP

The easiest historical data to access and analyse are the BSP prices for the racing codes. There is lots of it, and it matches well with people growing up trying to come up with punting systems. You can try to find edges based on traditional things such as barriers, or by looking at the BSP compared to earlier prices (ie pseudo-trading).

With rare exceptions, the BSP is quite stable and small bets won’t alter it much.

  • It is easier to get your money on – if your system involves definitely wanting to back/lay a runner then you don’t need the automation to keep chasing the odds.
  • You are less affected by delayed races and other weird circumstances. If you have a system that profits betting 90 seconds before the jump, and the race is delayed 10 minutes or half an hour, then you aren’t betting on what you think. If your analysis on SP prices then these situations are partly factored in.
  • If circumstances go against you then you get some compensation eg you back a dry track horse and a downpour occurs – you will get better odds. If you lay that runner you’ve sort of lost out – but you are laying at fair odds. After all your strategy is unlikely to be taking advantage of downpours.
  • If attempting to make a book or trade, you can close out your bets without needing to chase.
  • The convert to BSP option is great in many circumstances. eg if you suspect you can predict which way the odds will move on a runner, as a test, place a bet at the desired odds with a convert to BSP if unmatched. This gives you easy data to see how often your prediction (count of matched in market bets) was correct versus the opposite (count of BSP bets) and the size of the swings in the wrong direction. And which move is more profitable!
  • If you’ve modelled a system at BSP you can run your model against the same period you bet over – you should get the same results – but you’ll see the effect of not always being matched (though this occurs less at BSP)
  • If writing your own code, it is technically simpler placing BSP bets early than debugging things in the last few seconds.

Local Experts

No matter how good your brilliant insight into some aspect of markets in general, there are true experts in local situations who are much smarter.

You’ll bet on say the Shepparton dogs with some rules, and maybe something Shepparton specific, but you are up against people who have studied every race, done all the video form, know the course, the trainers, have watched the trials, can see the state of the track etc. You have to accept that they will take money from you – at least on some races.

The problem here is not that you’ll be wiped out by experts in every race – but that certainly in some races people will confidently take your money. And this relates to getting your money matched – you will always get all your money matched on the events where people know more than you.

The more you scale up, the more you are affected by the relative effect of being fully matched in only dis-advantageous events.


Psychology

This is the hardest part.  Automated punters tend to match patterns. And so the desire to explain away the bad days becomes compulsive.

Even after a winning week and month, a bad 24 (or even 3) hour stretch leads to a desire to know why the system which had been working has suddenly stopped.

Your balance isn’t what it was earlier in the day – you are unhappy. Conversely, after a winning day in a bad month, your balance is still well down – you aren’t happy.  And your balance can’t always be at its all-time high!

Watching the races/events is frustrating – you see yourself losing in unlucky situations. Not watching spares you that – but you don’t know why you’ve lost. Is it better to have knowledge and frustration, or be ignorant and puzzled/panicked about what is going wrong?

You can’t control what happens in the events. You ‘know’ that you need lots of data over long time periods to assess profitability, but still, it is difficult to not keep checking how it is going, and feeling constantly happy then sad than worried. Learning to not react is far from easy. Knowing that in any day you’ll have good wins and big losses doesn’t make you oblivious to them.

Finally, it is almost certain that your worst days are your unluckiest. Almost by definition – it is what makes them bad. You lose every photo finish, and in the events with the biggest loss/profit dependent upon the result. You finally get a big longshot winner and it loses in a frivolous protest by the odds on favourite so that punters on the track all go home happy. Your computer/ internet has a glitch and somehow bets don’t go on in one race and go on twice in another – and both go against you.

It is just bad luck – but the more you have the more it becomes your worst day. It should be comforting to know your worst day is just bad luck – but comfort isn’t the usual emotion in those circumstances.


Analysis of Results

The easiest way to increase profitability isn’t to come up with a new edge – it is to work out in which circumstances your edge is best, and in which it is worst, and adjust your betting accordingly.

But, it can be almost impossible to tell.

Common statistical techniques assume certain distributions of data, constant stakes, and repeated similar events; none of which applies to punting on perpetually different events, against an ever-changing array of other people trying new ideas.

  • If you split your results into any sort of groups, almost certainly some will have done better than others. If you split by Day of Week, and Tuesdays are good, but Mondays are bad, is this explicable? It might make sense – in whichever sport it may be that those days are associated with different grades of competition, or things such as FA cup matches between teams of different divisions.  But doing the stats is too hard.
  • An idea is when grouping results for analysis, also split it by random methods. eg Betfair BetID modulus 7, or first vowel in the Selection Name. Graph the results for each – do they visually look as up and down as the ‘meaningful’ criteria you have split by?  If so, then you are likely over-analyzing.
  • Similarly, although markets change over time, observation is more likely meaningful if it repeats each month of the past three, rather than looking at the whole three-month analysis and seeing a loss.

Huge Sample Sizes Needed

Imagine trying to make 1% on 100 greyhound races in a day. Assume you have reasons for backing and laying multiple per race – and end up with roughly 50% chance of winning/losing each race. Aim to win /lose $200 per race.

On an ideal average day, you would win 50 * $202, and lose 50 * $200.  All good  – a profit of $100.  But each race is a -$200 to +$200 eg $400 swing.  Your daily average profit is less than the resolution of one event, even with 100 races a day.

Extending the $100 per day to $700 per week, realistically (because you can’t always contrive similar outcomes per event) there will be a single photo finish in the week which had a-$350 to +$350 or similar swing.

I bet on nearly every Australian, UK and Irish horse and greyhound race, and many weeks the overall profit/loss is less than one just one big race result for the week. I might win 9 months out of 12, but I can lose two in a row, and many weeks in a row. It is really hard to be confident you are winning.


Understand each Market

Similar to the local expert topic. Can you explain your edge? If your mind can’t come up with a plausible reason then it probably doesn’t exist. Can you imagine who you are winning from?

It is easy to come up with ideas. Maybe some other automated bettors don’t realize some dog races are straight. You could exploit that.

Conversely, do you know all the details of what you are betting on? Do you know which tracks have been re-surfaced, introduced cut-away rails? Does your analysis of historic data know the history of this for every track or does it contain incongruent data? Are you going to be able to keep on top of this moving forward – for every track around the world?

If this is likely to affect you, then don’t bet too much on events which realistically you know nothing at all about.  Betting on too many disparate sports means you always have losing ones – which occupy your mind and distract you from the ones you are best at. It is worth trying many, but some expertise and focus are helpful.


Timing

You can only make sustainable money if someone offers the wrong odds – at any point during the betting process. Sounds easy – odds fluctuate- but they tend to get more accurate with time.

If you can find an edge, then so can someone else. If you put your bets on say 2 minutes before the jump, then someone can still find the same edge, say 3 minutes before- and place the same bets! Your edge has now gone…  but for them, it still exists. You can push back to four minutes before, and regain the edge. But possibly you can’t get as much matched at that earlier time.

Another way to view this is: if you have what seems a great insight, but it doesn’t work, maybe it will work at a different point in the market.

Trying to find a mechanism to protect your edge is a constant challenge.


Conclusion

If you have ideas – try them. In theory, you can bet at random and only lose commission. Try ideas out in low base rate markets, and see if something becomes apparent.

If your idea is so wrong (possibly because too many other people have had the same idea) then you can switch sides of the bet to make a profit! Noting however that getting your bets on from the other side may not be possible.

But that is the beauty of Betfair –  if you are prepared to admit mistakes you can equally as well profit from completely wrong initial notions as good ones.


Related Articles

API Bot

“BOT: definition…is a software application that runs automated tasks (scripts) over the Internet. Typically, bots perform tasks that are ...

The Actuary

Like most Australians, Roger’s first exposure to racing and betting came with a 50 cents win bet on a ...

The Programmer’s Betting Strategy