Streaming Data API

Post Reply
PeterLe
Posts: 3715
Joined: Wed Apr 15, 2009 3:19 pm

Hi James,
Just curious as to whether you drew any conclusions on ExBestOffersDisp v ExBestOffers ?
I have the ability to switch between the two..an extract of my code states ;-
if (cbVirtualPrices.Checked)
{
marketDataFilter.Fields = new List<MarketDataFilter.FieldsEnum?> {MarketDataFilter.FieldsEnum.ExBestOffersDisp, MarketDataFilter.FieldsEnum.ExMarketDef};
}
else
{
marketDataFilter.Fields = new List<MarketDataFilter.FieldsEnum?> {MarketDataFilter.FieldsEnum.ExBestOffers, MarketDataFilter.FieldsEnum.ExMarketDef};

Truth is, I have a bug in the code somewhere that when I select Virtual prices, the fill/kill doesnt seem to work and I tend to be in agreement with Liam in that I tend not to use virtual prices anyway. So Ive just left Virtual prices switched off and the code runs just fine.

Ive always had this nagging doubt in my mind as to what would happen if I were to run two of my accounts, same settings, but one on Virtual prices and the other not for a week or so just to compare..My gut feeling would think that I will fire in a lot less bets and the result would be worse with XM on
Just keen to know what conclusions, if any you drew in th end?
Thanks
regards
Peter
LinusP
Posts: 1871
Joined: Mon Jul 02, 2012 10:45 pm

Hi Peter, I think there is a delay in virtual prices, can't remember the exact latency but likely to impact strategies.

I have since spent a lot of time optimising my streaming code so will probably have another go at comparing market data parameters.
xitian
Posts: 457
Joined: Fri Jul 08, 2011 2:08 pm

Hi Peter,

I don't actually have a definitive answer for you I'm afraid. I recall doing some backtesting and found that for some of my strategies it performed better with virtual prices off, but some performed better with it on. You probably need to do what you suggested and run a proper live split test over a reasonably long period of time to see which performs better.

Which is better for you may depend on things like whether you take or offer prices. Take may be better with virtual prices on if that results in it seeing more opportunities. Offer could also potentially better if it means you're choosing a price which undercuts a virtual price because you'll be at the front of the queue which otherwise you may not have been if you ignored crossmatching (which would likely take priority if it arrived sooner). However, like LinusP says, if there's a small delay to virtual prices then that might overall be better.

It's hard to say, so you probably need to test specifically for your strategies to determine which is better. For me, I don't think there's a massive difference.
PeterLe
Posts: 3715
Joined: Wed Apr 15, 2009 3:19 pm

Thanks for the replies gents
Ill give it a go running a split test, although sometimes you can run the exact same program on two different accounts (same server) and still get varying results.
Ill see where it takes me anyway
Regards
Peter
xitian
Posts: 457
Joined: Fri Jul 08, 2011 2:08 pm

Yeah, I think because things can be so time sensitive (especially in-play) you'll always get some variation even under the exact same environment. That's why you'll probably need to run your split test over maybe a month of races to notice if there's any measurable difference to p&l at all.
LinusP
Posts: 1871
Joined: Mon Jul 02, 2012 10:45 pm

I assumed that if you had two streaming subscriptions with the same market and data filter you would get the same updates but I noticed the other day that sometimes the publish time would be different. Not sure if this would impact things as well or if it was a one off.
LinusP
Posts: 1871
Joined: Mon Jul 02, 2012 10:45 pm

Had another go at comparing the amount of data returned when comparing EX_ALL_OFFERS and EX_BEST_OFFERS, xitian looks as though you were correct in that when you go over about 5 ladder levels you receive a lot more data than just asking for all offers!

One horse racing market started about an hour before the start (about 10 runners, something which may impact this test):

screenshot 2.png
You do not have the required permissions to view the files attached to this post.
xitian
Posts: 457
Joined: Fri Jul 08, 2011 2:08 pm

Thanks for the results of that analysis!

Now if only Betfair were as thorough as you are. I really can't think of a good reason why they would bother making 10 levels the default (and in particular changing it from 6 to 10). Might be worth one of us sending them your analysis to find out?

The only reason I've just thought of is that most people want many levels, but want to see virtual prices (and therefore can't use EX_ALL_OFFERS). I'd have thought needing that many levels is pretty niche though, so why not default it to 3, and let the specialists set it to 10 manually...
Post Reply

Return to “Betfair Exchange API”