Lefora Free Forum
56 views

Idea for new bot...

Page 1
posts 1–10 of 10
rookie - member
4 posts

Hey there,

I have an idea for a bot but I have no idea how to program it and really don't have the time to spend to learn how to. What I am proposing is that I would provide the idea and someone programs the bot if they think it is a worthwhile project and we then share the bot to use at betfair.

I haven't looked very hard at the maths required that the bot will need to utilise and take advantage of but the idea deals with making a small profit on every race by making a bet and then depending on which way the market moves it does one of two things in order to search for that profit.

1) The bot backs Horse A and the price on that horse drops so the bot can make a lay for an easy profit on that race. This is standard and we all know about this.

2) But if the back bet of Horse A sees the price go up this is where I am wondering how a profit might be possible with a fast thinking bot at our disposal.

Lets say for ease there are 4 horses in a race.

A: 2.5 B: 3 C: 5 D: 10

Now, if we were to dutch all 4 selections for 100 units we would see a loss of 3.23 units. But is there a way we can lock into a back and then recalculate on the fly to get a profit through a dutch even if the market swings against us?

Let's say we back horse A at 2.5 but its price swings out to 2.75. If we were looking to lay that selection we are looking down the barrel of a loss on that trade.

What I am interested in looking into is the possibility of a dutching method that recognises this and tries to recover a small profit through price movements from this point in...

The prices will continue to move in and out so I wonder if the bot could take a snap shot of the odds at the start when the back was laid and then look for increases in prices to help secure an over round even if one does not exist at any set point in time.

so we have horse A at 2.5 backed... its price moves out to 2.75 and maybe horses B and C come in a little but horse D moves out somewhat. The bot then locks in that swing out and then waits for B and C to move back out so that a profit can be realised.

Basically the idea is to dutch all the horses so that a profit is seen but not in the traditional method of simply seeing an over-round (which never happens anymore on betfair thanks to bots) but instead the bot creates an over-round by taking prices it wants in order to make it that way.

So if we see those odds of 2.5, 3, 5, and 10, we know we can't make a dutch profit... but if we took 2.5, were able to then get at some point in the next period of time 3.25, 5.5, and 12... all of a sudden we have a profit from dutching.

I am not aware of anyone else doing this but I do realise the method would take some thought and getting the maths right will be tricky but I don't see why this sort of method wouldn't work... The aim would be for the bot to take the easy trades of course but if things went against it then it goes into the 2nd method to try and recover the trade.

Let me know what you think of this idea and if you think it has merit or is totally insane.

Regards, Dave

novice - member
44 posts

The maths shouldn't be too tricky, but you would need to record some price histories and then see if any opportunities do actually arise.

FWIW the overround doesn't exist on betfair any more due to the new matching algorithm rather than bot activity.

I think this will be difficult because the longer prices are likely to have a big spread, and very little trading activity - so if you take the best price on a longer selection you are paying the spread, and if you join a queue you may never get matched.

If you can concentrate your activity on a selection that has a tight spread, volatility, and trading activity, then it should be easier. If the price you ask for can be improved by matching across selections as you suggest, then the new matching algorithm will do this for you anyway.

rookie - member
4 posts

Yep, the idea would be to concentrate on UK horse racing 10 mins before the off where there is a lot of money flowing in and a fair bit of volitility.

Has anyone tried to do this sort of thing before? What success did they have? etc...

regular - member
134 posts

For each additional horse you can get in your book you will reduce your chance of losing but increase your exposure. And that exposure is probably going to be on horse B that has now steamed in to 2. Will you trade-out for a loss or hope it lengthens? Your original situation hasn't improved and may be worse. As peteb says I guess you'd need some data to see how many times that typically happens.

rookie - member
4 posts

The proposed idea is whether or not a reliable profit can be made from these situations given the extra runners that you can spread the load over. So in anormal situation you might have say 10 runners in the race... you back the favourite and if it falls in price then you simply lay out the trade for a profit.

If the market goes against us though and the favourite goes up in price then is it possible to get a reliable profit from dutching at different times to try and get the best prices? One price is already locked in at the price we backed the favourite at... So, the program would looking for prices that have gone up since that initial price was taken... So maybe the price on 4 of the 9 other horses is now higher than it was when the original back was made... so the bot quickly takes up these positions and locks in 5 of the 10 runners in a dutch aimed at small profit.

the bot then watches the market prices on the remaining 5 runners... as they swing in and out it takes them at appropriate prices to try and close out the dutch...

The big question is whether or not this would be profitable consistantly enough... A fair bit of experimenting with the aggression of the bot would be needed to sus out what settings would work best (how many points do you set the bot to go after when considering a back etc...)

novice - member
34 posts

Surely if you have a technique for turning a losing trade into a profitable one, you need to employ the same technique to increase the profits on a winning trade.

Losing trades are part of the game I'm afraid and most decent traders will know when to cut and run then either try and make separate trades to either reduce those losses or get the book back into profit.

rookie - member
4 posts

This is a discussion on whether it is possible to consistantly get a profitable situation after locking in a price and the market moving against you. Its an attempt at using a different idea to work around how to get a profit from a seemingly lost position.

I understand that losing trades is part of the game, but what if you could cut that out of the game? I am not sure if it is possible but I am trying to determine if what I have proposed is possible.

Imagine you did a dutch of the entire book at a set point in time... the book would be in a small loss position... but if you only randomly locked in 5 of the 10 positions and then watched the market for movements. Any movements in the positive direction (price goes up on selection) is locked in from that point.

Given a volitile market it is very possible that overround could be found this way regularly. Because the books are so competative to start with it would only take a couple of horse to move slightly out in order to secure a profit. It wouldn't matter so much what the prices you have locked in do.

Consider the following market: All prices are 10 for ease of example
At the start we Back horse A for 10 units (dutching for 100 units total) indicated with a star *. The locked in price will be denoted this way and the current price will be displayed in brackets if a bet has been locked in on that selection. Each column will represent say 1 minute of time elapsing.

1min 2min 3min
BP=100% 101.3% 102.5% 102.4%
A 10* 10* (11) 10*(10.5) 10*(11)
B 10 10 10.5* 10.5*(9.5)
C 10 9 9 10*
D 10 9 8.5 9*
E 10 9.5 10 10.5*
F 10 11* 11*(10.5) 11*(9.5)
G 10 12* 12*(11.5) 12*(11)
H 10 10.5* 10.5*(10.5) 10.5*(9.5)
I 10 10 10.5* 10.5*(10.5)
J 10 8 7.5 8*

The above examples shos us taking selection A at a price of 10 from the start. After 1 min the market has moved significantly against us and the selection sits at 11... so we snap up selections F,G, and H. At 2 mins we grab B and I also. And at 3 mins we see a profit potential and take the remaining selections at the current market price.

IF*** We were to dutch those prices at the end we would see around 1% profit from this situation despite the fact that the A price rose from 10 to 11 while trying to attempt a traditional back/lay arb and the fact that the book was never in an overround situation.

We created an overround situation but the big questions that remain in my mind are

1) Is this situation realistic? I know that we won't see all starters starting at decimal odds of 10 but I mean the number movement... If we take a snapshot of the odds a few minutes out from the jump can we reasonably expect the odds to swing in and out and be able to take advantage of this volitility regularly and consistantly?

2) How do we structure the dutching maths? In hindsight it is easy to do... and that is what I did for the above example, but it is not accurate because in the end for the perfect dutch we had 10.09 units on selection A at a price of 10. This could remidied by placing a 0.09 back bet on selection at the price of 11 (for slighlty better results) but this would also work against us in some situations. How much of an effect this would make I don't know, I don't think it would be very big but would it be too much to overcome in some situations so that even if the numbers went your way you would still struggle to make a clean profit?

novice - member
44 posts

Try it and let us know! I think you will be better closing your trade on the original horse, and then starting a new trade when the opportunity arises. Otherwise you will be increasing your exposure and waiting for the other horses to line up as you need them, if they ever do, when you could be making money on the best horse for trading in the meantime!

Have a search on the gruss forum for recording prices, you will find some posts that have Excel code for copying results to somewhere else in a spreadsheet on each refresh. Record prices for a days races, and you can then work through them and see if the opportunity for your system ever arises.

(They also have a find-a-developer section - you might find someone who could help there)

novice - member
34 posts

This is a discussion on whether it is possible to consistantly get a profitable situation after locking in a price and the market moving against you. Its an attempt at using a different idea to work around how to get a profit from a seemingly lost position.I understand that losing trades is part of the game, but what if you could cut that out of the game? I am not sure if it is possible but I am trying to determine if what I have proposed is possible.

The simple answer is no you can't consistently turn a losing trade into a profitable one. All you're effectively doing is falling into the trap of chasing a losing trade. Obviously the natural ebb and flow of the markets allow you to grab profits and you should maybe concentrate on area rather than trying to come up with some recovery method once a trade has gone against you.

If your recovery method is making profits then use it all the time and not just kick in once things have gone wrong. What you're proposing is just trying to make a new book based on a duff starting position and there's no guarantee you'll get top price for the other runners and just as likely you'd end up having other runners going against you making the situation worse. Plus if you're trying to get a profit it'd have to be quite an agressive method which is always risky. You'll regulary see horses odds half in price only to eventually go back to their starting odds and there's nothing to say your original losing bet wont' come out again.

You'll be better off concentrating on the original method of picking your trades and then use the old adage of let your profits run and cut your losses short rather than some form of chasing a loss imo. If someone out there has the holy grail of turning a loss into a profit I'd be surprised if they'll share it on here.

Don't take this as some sort of criticism as we've all had ideas than never come off but I think you'd be better off getting a winning strategy that combined with any stops will realise a profit over time.

novice - member
50 posts

Right, I have been trying to logically prove if this will/wont work.
If you cant be bothered to sift throught my workings the short anwser is it will not. If you are interested as to why then please read on.

If you imagine a market with 2 horses, A and B and assume that the market is fair then you will get,

1) prob(A) + prob(B) = 100%
2) price(lay A) = Price(back B)

assume the market starts with horses trading with even odds i.e.

100% 99%
Back Lay
A 2.00 2.01
B 2.00 2.01

If you assume that you back A at 2 for £2 then the price moves out to 2.5 then you can safely assume the market to correct the price of B to about 1.67.

100% 99%
Back Lay
A 2.50 2.51
B 1.67 1.68

To lay your original back position with out using the outright lay of that horse you can only do this by backing all the other horses (in this case just B), since this is the only hedge that has the same probability of lay the original horse.

So you end up with two backs in a synthetic market that actually looks like this

110% 109%
Back Lay
A 2.00 2.01
B 1.67 1.68

This is not a happy place to be as you will have lost money. However only roughly as much as if you had simply layed it outright with the same horse (roughly ignoring spread) when the price went against you.

Your original proposal was to only back a subset of all horses so what you are really looking to do is a correlation trade as the Prob(bet) != Prob(hedge) to hedge your original bet. This as captain-sensible pointed out will only serve to chase the loss.

You should looks at maths behind spread trades and convexity as there are some interesting things to be learnt about these and other correlation trading strategies.

Page 1
posts 1–10 of 10

This Topic Is Locked To Guest Posts

It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member

join now