Track Topic
: rss

Topic: 1+1=3

posts 1–9 of 9
Page 1
member
50 posts

Ok so this is another funky thing that ive seen with rounding.

I take it you do the summation over the order book to find net exposure by looking at each bet with full precision (double) and then round the returned value to the nearest penny.

I get the feeling that the algo in bf does the rounding per trade and summates them. I only noticed it when doing a large size via a shed load of small trades. I noticed at the end of the race our books did not match by a few pence event though all my calcs seem ok (well you get the point).

Has anyone else noticed this.

member
62 posts

I remember looking into this before and convincing myself BF do rounding on the total, not per trade.

I was thinking about it because I was trying to understand a scam I've read about on the internet.  Apparently people put lots of 1p lay bets on events with odds of say 1.49, and can't lose money.  They either win 1p or lose 0p.

If BF rounded on a per trade basis, people could do this scam any number of times on a single market.  If they round on the total, they're limited to 1p profit per market.  (This isn't a scam I'd want to do myself you understand - I was just curious.)  Anyway, I came to the conclusion at the time that BF were rounded on the totals. not per trade.

Will look at it again though and see if I can post some evidence of what they actually do.

member
1 posts

Afraid I can't answer the original question, but I think this might be the story that jpl is thinking of:

http://www.dawjee.com/content/single-mother-makes-100-pounds-day-betfair-pricing-anomoly

Apparently the rounding has changed so that the method doesn't work any more. Good! Seeing someone munching 1p-free-lunches out of my orders would drive me crackers...

member
31 posts

You need to remember that you aren't matching your bet against betfair, but against other customers, and that this matching may be done in chunks against customers betting in different currencies.
So the rounding is done at the transaction level, not the bet level, and not across all bets (though the on-screen p&l display is done by summing without rounding, and then rounding the totals - hence the difference between your own calculations at betfair's)
In general, if you dump your account statement to excel, and calculate your expected p&l per bet, then it will usually be p&l = round(stake * (odds - 1), 2). But you will find bets where this isn't the case - usually a penny out here and there. This is confirmed all over the betfair forum. In the last month I am up 1p and down 2p from this effect. Also, I had a match the other day for 0p, and others on the betfair forum have also seen this.

As for the scam, this thread may be related:
http://site.forum.betfair.com/jive3/betex/ThreadsFrameset.jsp?forumID=114&threadID=1623948

member
62 posts

Thanks peteb - what you say makes sense.  I think when I investigated this last time I was looking at the P&L figures displayed on the website, not the actual settled figures - I didn't take into account that they might be different.  Doh!

If the rounding is done at the transaction level, I guess the rational thing for a bot to do would be to tweak its bet sizes by a penny or two each time to make sure the rounding goes its way.  Otherwise (assuming £100 bets) it could be throwing away as much as 0.005% on every transaction!  Wink

 

member
62 posts

Thinking about it a tad more, perhaps I shouldn't be dismissing these rounding issues so flippantly.

One of my bots quite regularly lays bets for quite low odds.  For example, let's suppose it wants to lay £100 @ 1.04.  If it places a single bet it risks £4.

But now suppose it places 46 bets at £2.12 (plus a bet of £2.48 to make up the difference).  The payout on each of these £2.12 bets is 8.48p.  So if they're being rounded to the nearest penny individually, that's a saving of 22p.  Not that exciting I know, but it's a 5% reduction that could add up over time. And it seems perfectly legitimate - not in breach of BF's t&cs.

Might test that out tonight, and code it into my bet execution logic if it works.  Would have to watch out for transaction charges though.

member
62 posts

Ok, I've now tried it out, and I can confirm that peteb was right.  The P&L shown on the website is calculated by rounding totals, but the actual P&L when the market is settled is based on rounding each individual transaction.

Perhaps I'm a bit sad, but I think this is quite interesting.  The effect of slicing a SINGLE bet into £2 fragments to maximise the rounding benefit is only going to be a few percent at most, but on a trade, where your profit might come from scalping a small difference in prices, the effect of slicing up each halfof the trade in the optimum way could easily add 20% to your profit.  I can feel some coding coming on

member
30 posts

Make sure you take transaction charges into account, jpl.

member
62 posts

Thanks nadat - good point.  Still, my current bots don't ever get anywhere near the 1000 transactions per hour limit.  Let's suppose they only ever use 200, leaving me 800 free transactions that I can use for slicing up bets into chunks of just over £2 (the precise sum being chosen to maximise the rounding benefit).  Assuming I reserve the technique for bets that I expect to be matched (rather than speculative offers), and I can save 0.4p on each of the 800 slices, that's an extra £3.20 profit per hour just from rounding effects.  If I can manage to do that for 2000 hours each year that's £6k extra profit a year, just from making sure all the odd pennies blackmagic noticed on his statement start accrueing in the right direction.  Sounds well worthwhile coding up the necessary change to my bet execution routine.  Thanks for the tip blackmagic!

Of course to get that £6k extra I'd have to be turning over £1600 per hour in 2000 hours a year, which I'm not.  So probably it's my small turnover that's the limiting factor, not the transaction charges, at least for now.

posts 1–9 of 9
Page 1

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