The Journey Ahead
When you set out for Ithaca, ask that your way be long, full of adventure, full of instruction - C.P. Cavafy
The Advent of Alpha posts were a (mostly), fun way to kick things off here, but life got in the way of me doing all the deeper work I wanted, and as a result the quality of the writing isn’t quite where I’d hoped it to be when I started out.
The idea for that series was dreamed up over a few pints in a North London pub with a successful algorithmic trader (his LinkedIn profile insists he is only a “Statistician”). We had been discussing the caginess of most people to discuss any ideas at all in the context of trading sports, especially through code.
It was November, it was dark, the warm glow of several pints of Guinness made me lose my mind, and I somehow ended up dreaming up the concept of 25 posts, each with an idea on how to make money on the sports exchanges, despite myself not having a particularly successful trading strategy in production myself, yet.
I almost didn’t do it. And then on the 1st December, I woke up, thought “sod it”, registered a domain, set up a static site generator config, and here we are.
And now, I really want to begin something a bit better.
My background is software engineering (I did a degree where my 2nd year project was to build an operating system), and internet infrastructure (think ISPs, BGP routing, that sort of thing).
After the Dotcom crash, still early in my career, I took on a coding contract for a company based in Eccles (I’m from the High Peak/Manchester area originally), that wanted to create a competitor to this new betting exchange they told me about called Betfair.
I had always thought since the earliest days of learning to code (when I was about 11), that writing software that in itself just made money, was about one of the coolest things anyone could ever do, and with an interest in horse racing and a software engineering degree behind me, this felt like my perfect opportunity.
Back then, there was no Betfair API. I signed up to the beta of the old Betfair API (SOAP, WSDL, ugh), but didn’t make much progress with it. I was doing things by hand, and not well: the “Glorious Goodwood” of 2002 swung me into a red mist that meant I was burned out of ~£5k and any interest in horse racing for more than a decade.
When I returned, the API had improved a lot (streaming had arrived, but even the non-streaming API was better). There was a tooling ecosystem in modern languages I knew like Python. It held more interest for me.
By then though, my free time was very short and I become very aware of my biggest blind spot: the maths. If you’re turning up to a stats and probability fight with nothing more than a bit of python and a hunch, you might find it hard going to win.
I had some success in a few areas, lost in a few others. I tried lots of different things, read as many books and papers as I could stomach (but A-Level maths only gets you so far with a PhD or post-doc paper), and so I bounced ideas around on my own.
And for a long time I thought it was all just beyond me, impossible, perhaps something I could not do. For a long while I thought nobody could consistently make a profit, that it was no different to trying to pick winners on course or in a betting shop.
Three things kept going through my mind though:
- We know there are people like Bill Benter who has made a lot of money in pool betting in Hong Kong where the over-round is much higher than that on Betfair.
- The Premium Charge (recently changed to the “Expert Fee”), suggests that at least some people are consistently making profits.
- I eventually met some of them on the betcode Slack, and then in real life. And they didn’t seem to be full of crap. And eventually they started to tell me the kinds of things they were doing. And I understood it, and realised I could do it, I just needed to figure out my version of it.
This blog is to try and help others figure out some of those pieces too, so they can believe it too. And also, I find by finding ways to explain things to other people, I find it clarifies my own thinking, forces me to go and learn corners I thought I knew, but perhaps didn’t really, and to structure my thinking more.
Really then, all of this is here for me. You’re just along for the ride if you want to be.
Over the course of the next few months, I am going to attempt to detail building a laboratory for algorithmic trading bot strategy development and testing, using flumine and other tools.
It’ll start with gathering and analysing data, then looking at how to identify profitable strategy candidates (separating out order execution as its own exercise), back-testing and iteration, and then pushing it into production. While I may not be explicit about every parameter, I intend to try and put together over the next year at least one or two price action and fundamental strategies as openly as possible. If you want to eat my lunch before I get to it, that’s your prerogative - the main value I’ll be getting is the methodology and thinking in documenting it here.
I won’t pretend I have all the answers. Some of this I’ll be learning (or re-learning), as I go.
Two points I’d like to make clear:
- There are no comments on these posts for you to contribute with. That might change, but for now if you want to discuss anything with me, find me on the betcode slack.
- My opinions are my own, and not of my employer or any other entity I am associated with professionally or personally.
Some questions I expect to be raised early on by sceptical readers:
Why not just do this all manually? Why write code to trade, which seems a lot harder?
Coding up trading strategies - algorithmic trading - is superior to manual trading because it guarantees consistent behaviour, free of emotion. It is testable and quantifiable. Strategies can be iteratively developed and moved to production, without risk of any red mists changing parameters and causing chaos to the betting bank. They can also execute on markets I do not have time or inclination to trade manually (such as Australian events which happen in the middle of my night).
If you like manually trading, and you get ideas from this blog, great. May we be excellent counterparties to each other, Godspeed!
Why should anyone listen to someone who is not a long-term successful algorithmic trader on the exchanges?
I’m not forcing you to read any of it. I’m writing this mostly for myself and to see if I can find and encourage others who are willing to talk more openly.
I do think I know more about this field than the complete newbie, and I might have different ideas on certain aspects to experienced traders who don’t seem to talk very openly amongst themselves. I’m also coming at this from a software background, not a statistics background, so my thinking might be different in useful ways (or not).
I’m not selling any courses, I’ve not got advertisers, I am not (yet), writing a book that I am trying to convince you to buy, and while I have some commercial software plans, they’re a long, long way away. I am not particularly interested in “personal branding”, and am not trying to convince you - or myself - that I am something special. I just want to write stuff. It’s up to you if you read it or not.
If you build something profitable, why would you want to give any part of it away? Surely it’s zero sum and increasing competition eats away profit margin?
I don’t buy into this argument at all. If it were true that all sports trading was zero sum, Bill Benter would have nobody to bet against any more.
I believe multiple, successful counterparties can coexist in a market if they have good, uncorrelated, and evolving strategies. The money they are siphoning off is from people with correlated strategies that are not executed well, or uncorrelated bad strategies, or stale strategies.
I am also not trying to get people into “gambling” in the sense the term has come to be used in recent years in the UK. I think online slots and casino games should be illegal - they kill people.
I believe that as a society we should teach more people about the concepts of value, arbitrage and risk management in the field of sports betting, because done properly it would yield a healthy ecosystem.
I have some “anec-data” for this hypothesis: the financial trading centres of the World (London, New York, Tokyo), are full of counterparties making money in a huge variety of ways, trading against each other, mostly by leveraging value, arbitrage and risk management opportunities. The result is a group of thriving cities with healthy economies. I think the more people we can bring to trading sports using similar principles, the better it is for everyone (including me).
This is the exact opposite of playing online slots, having insider information or having “a system” that is “guaranteed” to “find winners”.
I am also mostly writing this for me. Not for you. For every strategy I describe here, there are likely 3-4 others I’m not sharing. The value I get in sharing something here is clarifying my thoughts, not profit on the exchange - that thought clarification should help me elsewhere.
So, with that out of the way, now we begin. I plan for the journey ahead to be long, full of adventure, and full of instruction. I hope you’ll join me - who knows where it’ll all end up?