Technical trading sports&automation

Month: March 2016

Time is scarce lately but I’m hoping to cover an important part of what I do. Sometimes I question why i post this stuff, i don’t have anything to sell but aim is to collaborate with other who do. Putting myself out there, heres what happened the other day.

To begin, I have loads of situations, bots, attempts some involving money, some which dont – that fail. Not massively, but it is a little chuck of my time that has disappeared into the ether. Reasearch, that untimately drives me on to find something different, keepos me going on this trail.

I started doing automation to trade a strategy overnight at the aussie open, so its apt that i found a strategy that performed at its optimum this week. The financial figure I made isn’t important, what drives me is the quest for efficiency and risk limitation.

Heres the game:

Pretty inocuous looking, its a shame the 6/1 spike kind of spoilt things in terms of seeing where the graph went.

The fact it went to a 3rd set, and there were no major movement over 3.0 was ideal for the bot i ran:

I ran a previous post comparing laying 1.61 the field in running during a horse race compared to automating an equivalent a few weeks back. I plan to revisit that, but thing move fast and I am here now.

I feel this bot has performed at it absolute optimum here, which excites me as it gives me sand in which to draw a line; it cannot perform better. I now have fixed odds data to compare it to. What price would i get for 3rd set going to a tie-break? Combination with overs markets, or 3 sets perhaps?

Another angle is analysing the graph, something i am a big fan of, to asses the bots performance as a % in this match alone. I think it did ok considering most stakes were about £30, there may have been a couple of manuals thrown in there as i did trade it live for a period.

A massive variable in its success will be how often this occurs, after all what’s the point in creating something for a one in a blue moon scenario?

Garcia played today, and lost 8-6 breaker in the 3rd, i wasn’t on….;-)

Being a software man, I’ve always been drawn to user interfaces, after all staring at an excel sheet is pretty dull. A fun project I got involved with last year was an un-released app with an easy to use interface. You assigned a market to the the app, waited until the correct conditions were met and a bet was placed and then traded out for a profit or loss.

Suitable for this time of year, the theme was a hen who over looked the market, when you pressed the hen she laid an egg and the egg rolled up hill if a successful trade and downhill as the market went against the poor bird.

It sounds a bit far fetched, but behind the cartoon was a legitimate bot. The conditions had to enable it to perform adequately in a range of markets, so clothe condition I chose was weight of money.

If weight of money exceeded 80% over a period of time, the selection was laid, and the hen laid her egg. Likewise if WOM <20% then back bet placed.

One requirement was a high strike rate so I used a small offset and when a trade was successful, I chose to delay the graphic so the egg hadn’t reached the top of the hill. Another requirement was to appeal to the fun bettor, and not the addict, so this I guessed might prevent from a user sitting on the app all day.

Looking at the cricket T20 markets today, I remember the poor hen and her slippery eggs. NZ were batting, it was a sticky wicket and it looked like Ross Taylor was about to go. WOM was above 80% and would have proved successful. The risk reward would have been 5/10 tick loss for the boy day and maybe 20/30 for the wicket.

WOM is a fun condition I often pair with others to stabilise a rule, here it can be used standing alone. A lot of the time it react to those watching the action live in the stadium or those with fast pictures.

Well, we are veering away from Tennis, but to keep the series linked I am carrying on looking at the lay the field automation.

To recap, having laid 1.61 and re-backed at 2.0 with our profit (£24 back bet), we are into the second cycle. To complete this we, green back at 1.61 for £5.82. Our two lays and single back have returned 50% of our stake. At no point has our liability exceeded £10 (the original stake).

Of course, I am presuming a) there is another horse in hot contention. A strong favourite with no competition in the race may not cause the odds to return to 2.0. This can in fact be an opportunity.

A horse trading around 1.6 suggests, in the right environment there may be a second favourite trading around even money. We can start the cycle backing at 2.0, laying 1.61 and then greening at 2.0. The 2 horses flip flop between the two prices and I can maximise my position, effectively doubling my return to £11.64.

The best thing about this method is the speed it happens can be lightening fast. The range can be expanded to suit certain circumstances, the cycles can be extended. In fact, this is something I actively pursue as it is compounding earned profit.

I’l compare this to the original lay the field strategy, laying multiple horses once:

Lay x3 horses at 1.61. The worst case scenario is a) 1 horse hits and goes on to win. We lose £6.10 for every £10 invested. If two hit (b), and one goes on to win, thats £3.90 profit.If three hit and one goes on to win, £13.90. If three hit (c)and none win, the maximum return £30.

For this strategy to surpass what i’ve already discussed will need 3 horses to hit 1.6. It is a simplfied and traditional method, in my opinion not too dis-similar to the outdated lay the draw strategy. We now make a value judgement on the strategies, so return to the real world with two scenarios which return similar amounts.

To tie up this section of the blog, I may look to the simple built in software in bet angel to construct something akin to high frequency trading albeit in the horse racing markets.

Thought id expand on the last blog to see where the 20 tick concept could be extended to. I’ve just seen a post from a popular social media punter hailing a lay the field success.

Horse racing is an absolute killer when it comes to automation; prices move so quickly in running that most computers have an edge over human input; speed.

I don’t know whether it will work, but am typing live and hopefully explain my thought process to bot creation. Firstly, i’ll always set out my aims – here it is to reduce liability.

So, lets look at the math behind the straight lay of 3 horses and the liability/profit.

Lay x3 horses at 1.61. The worst case scenario is a) 1 horse hits and goes on to win. We lose £6.10 for every £10 invested. If two hit (b), and one goes on to win, thats £3.90 profit.If three hit and one goes on to win, £13.90. If three hit (c)and none win, the maximum return £30.

Lets check out how scenario B could unfold. The favourite hits 1.61 in running, at which point we could potentially time-map the price of the second favourite. This gives us our range in which to trade. I’ll call it 2.0, for arguments sake lets say a 40 tick range.

We know 20 ticks brings £2, so 40 will bring £4. If matched we can re-back at 2.0 for £14. That is our trading cycle for the horse. Each repetition increases ability to compound profits. How often do you see the price move and not be quick enough to act?

That’s something simple you can automate, next blog I’ll assess the pro’s of this vs a straight lay and give the number of cycles required to beat that method.

Some nice Sunny weather to absorb this week in Indian Wells. The courts have got plenty of bite in them and really benefit those who are prepared to grind it out in the sun.

I mentioned a while back about trading vs. straight betting in these match odds markets. A solid theory you can retain easily is the 20 tick margin. Lets have a look at the maths in a hypothetical situation.

Backing 2.0, laying 1.8 for the same stake returns 20% of stake on the favourite. It can be greened for 1% each side.

Looking at tonights match Haase vs. Schwartzman, the same 20 tick range might swing Schwartzman 15-30 down on serve. I’m not advocating this as an entry position, nor would you take a 20 tick range and try and shoe-horn that into a match scenario. My entry may be 15-30, exit end of game netting maybe 15 ticks.

Good mens servers often get themselves out of jail on fast courts, the smaller swings reflect their superior serving ability compared to worse servers. However, i may chose to back a good server behind when serving and over the course of 5 sets, x5 20 tick swings using £10 stakes will leave me with £20 on the favourite and -£10 on the opponent.

You can expand on this by reversing the trade, rather than waiting for the price to return to the original entry point. A conservative approach would be to simple green the trade.

I’m a bit advocate of turnover and making my profit work hard to generate more, or at least give myself the opportunity to win bigger, as they say. Translated to betting terms, had I stayed static in the market I would have place an even money bet, using the example above we have a 2/1 opportunity.

I’ll hopefully touch on this a little more, of course if anyone follows a similar approach or has any comments it would be great to hear.

Well just like the sporting calendar, i’ve had to adjust my attention slightly next couple of days as things hot up in the cricketing world. Two matches today, the first suitable for the T20 bot I ran, the second ran well but I got stopped out early.

It got me thinking about when to stop, or in other words, when to halt the bot – after all you can’t stay on the merry go round forever! The Scotland match had big swings, and several stops hit after I had hit my £75 green target. This in fact happened during the 1st match, but i decided to run an identical version that stopped once profit hit >£100. You’ll see the ranges are a lot tighter and the green hit relatively fast.

So back to the question, when and how to stop a bot. Several methods I’ve used, weight of money is effective but too fast to be effective, no. matched bets i have used but I’ll be concentrating on time and p/l. With most innings lasting around 90 minutes, i’ll be creating separate groups of rules to identify volatility, along with historical pricing and of course, profit/loss. I’d be happy to spend a little profit on something out of the ordinary, rather than cash i hadn’t won.

As for today, the markets were pretty mental, I’ll put that down to unknown teams, form, predicted run lines and general panic – oddly kind of good conditions for a mathematical program to operate in, perhaps.

It’s so close Ivan almost taste it! I have never been to the main meet, preferring the Paddy Power weekend in November – even then the crowds are massive and it’s tricky to move around. I’m not sure bigger crowds would be my cup of tea.

I digress, today starts the pick of a project I looked at 4 years ago and never really completed – in running back to lay trading.

For anyone unfamiliar with this concept, have a look on the web there are many who can explain the concept.

For those new to automation and bot creations, the holy grail is something you can leave and will make money in your sleep.

The issue here is not the method used but the logging of data and results over time. Coupled with that, you are questioning whether a big enough sample has bee taken or whether you have just struck a short term purple patch. The focus steers away from the bot construction and to the actual horse racing itself.

In all honesty, that should have been addressed before any bot manager software program was purchased!!

I used a data service for a while that tracked in running prices and was able to pin point horses which favour this approach.it likely I will re-invest in it for the summer months, where the variants (going, low grade racing, yard gambles, jockey performance) are smaller and true data shines through. It makes sense, a horses running style is often the big factor in making a price contract.

So this weekend I modified a basic set of rules, and created something to get the ball rolling. The road starts here, which is a simple back to lay bot backing horses SP less than 4.0, greater than 3.0 and laying off in running to return 60% of initial stake.

It’s likely to need tweaking to run properly but I’m hoping to post regular updates here in the lead up to the festival.

Apologies for no real updates recently, a side project offered up recently has taken up a lot of time, and there is the little matter of a growing daughter and family!

I have been trying to sharpen up a few bots this month in the tennis field. I have implemented some excellent data from Tennis ratings that gives me fewer, but stronger entry points.

The previous automation I wrote had an element of randomness which I modelled on a long term study of certain match situations.

The new data gives me a better start, on which I can implement the old bot to churn the green.

Another way I’ve used the bot is when taking a position, say on player A. They may move ahead which is when I have a free shot at the price returning back to the original one. It’s one of my favourite strategies, depending on the staking you can reduce you liability on the original bet, while not reducing the amount you can win.

It’s a fantastic way to build your position in a risk free manner and while increasing turnover to limit premium charge costs should that apply.