Trading What I see !?

Learn sports betting strategies and discuss key factors to consider when placing a bet.
Post Reply
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

ShaunWhite wrote:
Mon Apr 12, 2021 8:30 pm
Your data sample rate could be an issue. 1s is a lifetime and there could be 20 orders/fills/cancellations in that time even at prices above and below touch price. At peak times I'm getting a market change message about once every 17ms, 60 a second. That's the frequency of mains buzz !
So that should not affect once my order is accepted at price 5.5, at a point in time after the order acceptance the traded at 5.5 is £95 and the Waiting queue is £431. So once £526 is traded at 5.5 "at least" my £4 should be matched...? I don't care someone came in after my order, neither some of the £431 were cancelled, as that would have just made my £4 match earlier than £526...
However, if cross-matching throws in Lay bets on this runner from Back bets by other people on other runners, then that does mess things up.
This discrepancy doesn't occur too often, so I am suspecting it is cross matching.
User avatar
napshnap
Posts: 1189
Joined: Thu Jan 12, 2017 6:21 am

goat68 wrote:
Mon Apr 12, 2021 8:37 pm
ShaunWhite wrote:
Mon Apr 12, 2021 8:30 pm
Your data sample rate could be an issue. 1s is a lifetime and there could be 20 orders/fills/cancellations in that time even at prices above and below touch price. At peak times I'm getting a market change message about once every 17ms, 60 a second. That's the frequency of mains buzz !
So that should not affect once my order is accepted at price 5.5, at a point in time after the order acceptance the traded at 5.5 is £95 and the Waiting queue is £431. So once £526 is traded at 5.5 "at least" my £4 should be matched...? I don't care someone came in after my order, neither some of the £431 were cancelled, as that would have just made my £4 match earlier than £526...
However, if cross-matching throws in Lay bets on this runner from Back bets by other people on other runners, then that does mess things up.
This discrepancy doesn't occur too often, so I am suspecting it is cross matching.
Emmm, maybe stupid question, but do you know that bf counts "traded" for both sides, so you should divide the traded amount (which bf provides) by 2?
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

napshnap wrote:
Mon Apr 12, 2021 9:02 pm
goat68 wrote:
Mon Apr 12, 2021 8:37 pm
ShaunWhite wrote:
Mon Apr 12, 2021 8:30 pm
Your data sample rate could be an issue. 1s is a lifetime and there could be 20 orders/fills/cancellations in that time even at prices above and below touch price. At peak times I'm getting a market change message about once every 17ms, 60 a second. That's the frequency of mains buzz !
So that should not affect once my order is accepted at price 5.5, at a point in time after the order acceptance the traded at 5.5 is £95 and the Waiting queue is £431. So once £526 is traded at 5.5 "at least" my £4 should be matched...? I don't care someone came in after my order, neither some of the £431 were cancelled, as that would have just made my £4 match earlier than £526...
However, if cross-matching throws in Lay bets on this runner from Back bets by other people on other runners, then that does mess things up.
This discrepancy doesn't occur too often, so I am suspecting it is cross matching.
Emmm, maybe stupid question, but do you know that bf counts "traded" for both sides, so you should divide the traded amount (which bf provides) by 2?
I'm hoping this is a big DOH! moment on my half. So the "Volume traded at a given price" as returned in a stored value by Guardian, equates to the sum of back+lay at that price. So when it says £95 traded at 5.5, that means £47.5 of queued Lay bets were matched and £47.5 of market Back bets were matched against them?
G'damit I feel rather stupid if that's the case, doh!

So in my example I actually need to wait for a traded amount of £95+(2*£431)=£957, and you've just explained in one simple answer why it doesn't match after £750!!!

THANK YOU !
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

napshnap wrote:
Mon Apr 12, 2021 9:02 pm
goat68 wrote:
Mon Apr 12, 2021 8:37 pm
ShaunWhite wrote:
Mon Apr 12, 2021 8:30 pm
Your data sample rate could be an issue. 1s is a lifetime and there could be 20 orders/fills/cancellations in that time even at prices above and below touch price. At peak times I'm getting a market change message about once every 17ms, 60 a second. That's the frequency of mains buzz !
So that should not affect once my order is accepted at price 5.5, at a point in time after the order acceptance the traded at 5.5 is £95 and the Waiting queue is £431. So once £526 is traded at 5.5 "at least" my £4 should be matched...? I don't care someone came in after my order, neither some of the £431 were cancelled, as that would have just made my £4 match earlier than £526...
However, if cross-matching throws in Lay bets on this runner from Back bets by other people on other runners, then that does mess things up.
This discrepancy doesn't occur too often, so I am suspecting it is cross matching.
Emmm, maybe stupid question, but do you know that bf counts "traded" for both sides, so you should divide the traded amount (which bf provides) by 2?
Just updated backtest prog, re-run, now matches "live trading" exactly, you star! Sometimes it's the simplest things you overlook!
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

Interestingly, after fixing that embarrassing misstake in my backtest offer logic where it was basically matching on half the required fill, and running a full dataset run, showed very little change in result, only 6 less trades matched out of 308, phew!
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

goat68 wrote:
Mon Apr 12, 2021 11:22 pm
Interestingly, after fixing that embarrassing misstake in my backtest offer logic where it was basically matching on half the required fill, and running a full dataset run, showed very little change in result, only 6 less trades matched out of 308, phew!
Might be worth running those backtests with different sized stakes, a tenner is pretty much always going to be matched or not matched but when you're doing a few hundered there'll be more partial fills.
User avatar
napshnap
Posts: 1189
Joined: Thu Jan 12, 2017 6:21 am

goat68 wrote:
Mon Apr 12, 2021 9:17 pm
napshnap wrote:
Mon Apr 12, 2021 9:02 pm
goat68 wrote:
Mon Apr 12, 2021 8:37 pm


So that should not affect once my order is accepted at price 5.5, at a point in time after the order acceptance the traded at 5.5 is £95 and the Waiting queue is £431. So once £526 is traded at 5.5 "at least" my £4 should be matched...? I don't care someone came in after my order, neither some of the £431 were cancelled, as that would have just made my £4 match earlier than £526...
However, if cross-matching throws in Lay bets on this runner from Back bets by other people on other runners, then that does mess things up.
This discrepancy doesn't occur too often, so I am suspecting it is cross matching.
Emmm, maybe stupid question, but do you know that bf counts "traded" for both sides, so you should divide the traded amount (which bf provides) by 2?
I'm hoping this is a big DOH! moment on my half. So the "Volume traded at a given price" as returned in a stored value by Guardian, equates to the sum of back+lay at that price. So when it says £95 traded at 5.5, that means £47.5 of queued Lay bets were matched and £47.5 of market Back bets were matched against them?
G'damit I feel rather stupid if that's the case, doh!

So in my example I actually need to wait for a traded amount of £95+(2*£431)=£957, and you've just explained in one simple answer why it doesn't match after £750!!!

THANK YOU !
I can't say for Guardian, but raw bf data counts this way.
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

ShaunWhite wrote:
Tue Apr 13, 2021 12:58 am
goat68 wrote:
Mon Apr 12, 2021 11:22 pm
Interestingly, after fixing that embarrassing misstake in my backtest offer logic where it was basically matching on half the required fill, and running a full dataset run, showed very little change in result, only 6 less trades matched out of 308, phew!
Might be worth running those backtests with different sized stakes, a tenner is pretty much always going to be matched or not matched but when you're doing a few hundered there'll be more partial fills.
Scaling bet size requires more thought, and is not easy to backtest as when bet size becomes significant compared to queued bets you're potentially influencing the market significantly which you can't predict. My assumption in scaling will be to only scale to a size I estimate is small compared to the liquidity, this should then still roughly hold true with the backtest figures.
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

Quite pleased with BackTest to Live correlation so far this week with the latest bot and backtest program.
Here's a chart rather than numbers Shaun!
Just the 3 days so far this week, but I like the correlation of backtest run on the recorded data vs the actual live trading of the bot, gives me more confidence:
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

I like the confidence of your Y-axis label. Most say PL.

If you're looking at the correlation between those two lines then maybe chart the difference between them expressed as a percentage of the backtest figure?
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

ShaunWhite wrote:
Thu Apr 15, 2021 2:16 am
I like the confidence of your Y-axis label. Most say PL.

If you're looking at the correlation between those two lines then maybe chart the difference between them expressed as a percentage of the backtest figure?
For me that's good enough. Percentage difference won't tell me much more. You might not be able to tell from the chart, but backtest has 23 trades, live 25, that's because 2 Fills matched in live, but not in my backtest estimated Fill, that's just a fact of what will happen that I cannot emulate other than guessing a order cancel rate. At the moment the backtest makes a guess at how much of the queue ahead may get cancelled... So they will will never be the same, and as you can see there are moments when the difference is worse or better... For me what's more important is the trend, so doing a spline fit and comparing those would work better as a comparison, and over a longer period of trades.
I can see looking visually at the lines a spline fit would be very close to each other, that's good enough for me!
User avatar
wearthefoxhat
Posts: 3206
Joined: Sun Feb 18, 2018 9:55 am

Always worth remembering;

compounding.png
You do not have the required permissions to view the files attached to this post.
User avatar
Trader724
Posts: 559
Joined: Fri Dec 27, 2019 11:22 pm

wearthefoxhat wrote:
Thu Apr 15, 2021 10:52 am
Always worth remembering;
compounding.png
If you double one penny every day for 30 days you have 31 pennies. If you start with a penny and you double all the pennies you have every day for 30 days you'd have 1,073,741,824 pennies.
You do not have the required permissions to view the files attached to this post.
dt888
Posts: 393
Joined: Wed Apr 27, 2011 9:25 pm

Trader724 wrote:
Thu Apr 15, 2021 11:17 am
wearthefoxhat wrote:
Thu Apr 15, 2021 10:52 am
Always worth remembering;
compounding.png

If you double one penny every day for 30 days you have 31 pennies
Depends if it’s the same one penny you double everyday or a different one 😉. You might be lucky and end up with 60 pennies if it’s the latter!
User avatar
Trader724
Posts: 559
Joined: Fri Dec 27, 2019 11:22 pm

dt888 wrote:
Thu Apr 15, 2021 11:50 am
Trader724 wrote:
Thu Apr 15, 2021 11:17 am
wearthefoxhat wrote:
Thu Apr 15, 2021 10:52 am
Always worth remembering;
compounding.png

If you double one penny every day for 30 days you have 31 pennies
Depends if it’s the same one penny you double everyday or a different one 😉. You might be lucky and end up with 60 pennies if it’s the latter!
No matter which penny you double, you earn only one extra penny a day.
Post Reply

Return to “Betfair trading strategies”