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:
Thu Apr 08, 2021 2:43 am
goat68 wrote:
Wed Apr 07, 2021 11:53 pm
I do have doubts though mainly because most of the profits come from this string of 8 days
2021/03/10 : Wed : 5.23
2021/03/11 : Thr : 5.24
2021/03/12 : Fri : -0.34
2021/03/13 : Sat : 6.78
2021/03/14 : Sun : -1.28
2021/03/17 : Wed : 1.05
2021/03/18 : Thr : 5.97
2021/03/19 : Fri : 4.92
Great news on the out of sample testing.
I wouldn't worry about things like that group of good days. Humans are programmed to look for patterns, and patterns occur in random data*, so unless you can think of a good reason why those days were different then it's just what it is.

Besides when you've got a large enough set of results the days will start to blur and you'll see that drawing a line through your results when the sun rises and sets is fairly arbitrary unless time of day matters to you.

* YouTube and Spotify 'random' playlists aren't random. When they were people complained it did things like played 4 tracks by the same artist in a row so they had use a pseudo-random that doesn't produce the patterns normal random makes. I haven't read this but I think a few people enjoyed it-> https://www.amazon.co.uk/Fooled-Randomn ... 0141031484
Thanks, yeah so the only causal reason I can think of is the proximity of Cheltenham to those days. So i've just ran a backtest with a regex excluding Chelt and it comes back with the following for those days, practically identical, so unless Cheltenham was having a causal effect on the other markets, which is possible, i'll put it down to variance at the moment:
2021/03/10 : Wed : 5.23
2021/03/11 : Thr : 5.24
2021/03/12 : Fri : -0.34
2021/03/13 : Sat : 6.78
2021/03/14 : Sun : -1.28
2021/03/17 : Wed : 0.87
2021/03/18 : Thr : 5.74
2021/03/19 : Fri : 4.83
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

Trader724 wrote:
Thu Apr 08, 2021 8:43 am
goat68 wrote:
Wed Apr 07, 2021 3:14 pm
Trader724 wrote:
Wed Apr 07, 2021 7:17 am


It looks pretty decent, keep it up.
Overall looks good doesn't it.. however since actually running it live 1stApril, it's not doing well... This seems to be a consistent trend, in that you find an algo that seems to show promise over the last month or so, it then performs pants going forward.. It's as-if algo creation is efficient, in that 1000s of algo creators are doing the same thing based on the last month, which thus makes forward trading -ve... So what I need to come up with is a strategy that is "not in the last month" ..yeah?
Don't worry about competition right now, try to solve one problem at a time and make sure you fit your model to market behavior, not to market data. When you go from backtesting to live, the psychological factor comes into play, you can start directly with a drawdown period. For us, only long-term results matter and we have to be patient.

If you think you've found an edge, try to explain why it
works, and if you can't find an explanation, you're trying to explain the inexplicable, which is lying to yourself.

You should not rule out that you have partially curve fitted your strategy (I did it when I started out) and consequently the real edge is much smaller, so be careful what stakes you use, you may suffer too much drawdown wich will make you believe it doesn't work at all.
So most of what the bot does I have causal reasoning, one or two maybe pushing the boundaries a bit, so as you said, I do expect some of what I have is fitted, but hopefully not too much.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

goat68 wrote:
Thu Apr 08, 2021 8:55 am
so unless Cheltenham was having a causal effect on the other markets..
A majority of punters are doing because they like the sport not just because of the betting opportunities, so when the good stuff is on that's where their eyes are and the rest of the day's action becomes a sideshow. A few days before and a few days after can be slightly different too because they might be keeping their powder dry for a bigger festival bet or waiting for payday to recover what they spent on it. Data without context can be misleading, markets are window onto the real world not a world in their own right.
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

Great capture of the 2min "car crash" today:
carcrash.jpg
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

So today was worst day again for bot.
Done a backtest starting after Cheltenham paints a very different picture, basically breakeven for the past 18days, I need another week like Cheltenham!:
2021/03/22 : Mon : -2.49
2021/03/23 : Tue : -0.20
2021/03/24 : Wed : 3.91
2021/03/25 : Thr : 0.56
2021/03/26 : Fri : -0.79
2021/03/27 : Sat : -1.80
2021/03/28 : Sun : -0.81
2021/03/29 : Mon : 6.41
2021/03/30 : Tue : 1.66
2021/03/31 : Wed : -0.21
2021/04/01 : Thr : 0.12
2021/04/02 : Fri : -0.08
2021/04/03 : Sat : 1.61
2021/04/04 : Sun : -0.50
2021/04/05 : Mon : -0.37
2021/04/06 : Tue : -2.53
2021/04/07 : Wed : -0.44
2021/04/08 : Thr : -2.97

==> Worst day = -2.97
==> Best day = 6.41
==> Winning days = 6
==> Losing days = 12
Sun : -1.31
Mon : 3.55
Tue : -1.07
Wed : 3.26
Thr : -2.29
Fri : -0.87
Sat : -0.19

Profit = 1.09
Wins = 79
Avg Win = 0.43
Losses = 75
Avg Loss = -0.44
S/Rate = 51%
Total trades = 154 from 1138 analysed markets
% turnOv = 0.03%
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

goat68 wrote:
Thu Apr 08, 2021 11:23 pm
Profit = 1.09
You can tell many different stories with the same set of stats. From your numbers...

18 days on a + 0.3343 trend might say you're just suffering a bit of drawdown and should be on £6
Screenshot_10.png

Likewise after 18 days you start to get the first hint at the normal distribution of your daily PL and you can start to infer things from that...i just did it freehand and it obviously won't go negative like my red line did.
Screenshot_12.png

Then again, even with a random strategy that's 50-50 up/down per race, hitting 79 or better out of 154 is a 40.5% chance, ie very likey. 90 +ves out of 154 would be 2.18% and much more conclusive. Make it 100+/154 and that's a nailed on strategy because you'd only hit that 0.01% (actually 1 in 7,651) of the time if you only had something random. (all assuming avg win is approx avg loss, there are of course strategies that win 500 out of 510 races and lose money)

Just a reminder : if you're doing this day after day with tiny stakes and/or just staying connected for hours on end there's a good chance you'll end up with a restricted account. And fair enough too, some of us are trying to work and we don't want Betfair's servers overloaded with data harvesters all funded by our commission ;)
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

Data farmers are also part of the ecosystem since some of them will become commission payers. I'm convinced that betfair is aware of this and is quite understanding. In streaming mode the servers are not required as in API-NG, maybe that's why it was introduced?
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Trader724 wrote:
Fri Apr 09, 2021 11:25 am
Data farmers are also part of the ecosystem since some of them will become commission payers. I'm convinced that betfair is aware of this and is quite understanding. In streaming mode the servers are not required as in API-NG, maybe that's why it was introduced?
Now you mention it I don't think you see as many posts about restrictions as you once did.
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

ShaunWhite wrote:
Fri Apr 09, 2021 3:14 pm
Trader724 wrote:
Fri Apr 09, 2021 11:25 am
Data farmers are also part of the ecosystem since some of them will become commission payers. I'm convinced that betfair is aware of this and is quite understanding. In streaming mode the servers are not required as in API-NG, maybe that's why it was introduced?
Now you mention it I don't think you see as many posts about restrictions as you once did.
fyi, I am live trading as well, it gives validation my backtest produces nearly the same results as well. Although I am using minimal stakes=£18(Back&Lay Liability)==£2 @ 10.0, £[email protected], ...
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

So a bit of an upturn today "live" bot made +£2, interesting backtest on the same recorded data showed +£3, seems backtest got thrown by an extra spike trigger, that's the problem with backtesting of an "offer" price strategy using 1second data, but these variations roughly even out.

Anyway, even better news, I spent some time this evening analysing the bot triggers, and realised a couple that were a bit dubious, had a good careful think and re-wrote those bits with a more "reasoned" algo, and it made a significant difference, the after Cheltenham performance is now around 0.5% rather than 0.03%!:
2021/03/22 : Mon : 0.80
2021/03/23 : Tue : -0.20
2021/03/24 : Wed : 4.04
2021/03/25 : Thr : 1.14
2021/03/26 : Fri : 0.02
2021/03/27 : Sat : -0.26
2021/03/28 : Sun : -0.94
2021/03/29 : Mon : 2.62
2021/03/30 : Tue : 2.27
2021/03/31 : Wed : 1.09
2021/04/01 : Thr : 2.43
2021/04/02 : Fri : 0.34
2021/04/03 : Sat : 0.68
2021/04/04 : Sun : -0.50
2021/04/05 : Mon : 1.22
2021/04/06 : Tue : -0.27
2021/04/07 : Wed : -0.22
2021/04/08 : Thr : 1.00
2021/04/09 : Fri : 3.34

==> Worst day = -0.94
==> Best day = 4.04
==> Winning days = 13
==> Losing days = 6
Sun : -1.44
Mon : 4.63
Tue : 1.79
Wed : 4.90
Thr : 4.56
Fri : 3.71
Sat : 0.41

Profit = 18.58
Wins = 92
Avg Win = 0.47
Losses = 66
Avg Loss = -0.38
S/Rate = 58%
Total trades = 158 from 1174 analysed markets
% turnOv = 0.53%

Performance across the whole dataset is also roughly consistent from start to end and a good overall result:
==> Worst day = -2.85
==> Best day = 5.88
==> Winning days = 21
==> Losing days = 12
Sun : -4.30
Mon : 6.09
Tue : -1.06
Wed : 6.45
Thr : 14.88
Fri : 4.88
Sat : 5.83

Profit = 32.77
Wins = 164
Avg Win = 0.50
Losses = 123
Avg Loss = -0.40
S/Rate = 57%
Total trades = 287 from 1174 analysed markets
% turnOv = 0.52%

And 10x random 30% datasets show good result:
% turnOv = 0.79%
% turnOv = 0.51%
% turnOv = 0.62%
% turnOv = 0.40%
% turnOv = 0.59%
% turnOv = 0.45%
% turnOv = 0.38%
% turnOv = 0.74%
% turnOv = 0.50%
% turnOv = 0.97%

Anyway, i've been here before...as the saying goes.. but i'm confident it's an improvement. The real positive result would be to get a decent +ve week going forward this week.....
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

goat68 wrote:
Fri Apr 09, 2021 10:11 pm
that's the problem with backtesting of an "offer" price strategy using 1second data, but these variations roughly even out.
You can't test offers with that data to degree of usefullness. You're looking for an edge iro a couple of percent so your margin of error needs to be 1/10th of that. Eg £2 live vs £3 test, a 50% difference ! It's not one that will balance out either because your fill rate is a guess.

Any chance of a couple of pictures rather than all those numbers?
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

ShaunWhite wrote:
Fri Apr 09, 2021 10:42 pm
goat68 wrote:
Fri Apr 09, 2021 10:11 pm
that's the problem with backtesting of an "offer" price strategy using 1second data, but these variations roughly even out.
You can't test offers with that data to degree of usefullness. You're looking for an edge iro a couple of percent so your margin of error needs to be 1/10th of that. Eg £2 live vs £3 test, a 50% difference ! It's not one that will balance out either because your fill rate is a guess.

Any chance of a couple of pictures rather than all those numbers?
The £2 vs £3, was one trade, scenario was fav2 and 3 spiked opposing directions, live offered on 2 but didn't match, bt offered on 3 and matched and made £1...the other 8 trades today matched within a few pence.
Usually difference over whole day is about 20p, sometimes +ve sometimes -ve. Im not too worried about it, and ive made the backtest offer as best i can anyway,and i fully understand it's limitations..
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

ShaunWhite wrote:
Fri Apr 09, 2021 10:42 pm
goat68 wrote:
Fri Apr 09, 2021 10:11 pm
that's the problem with backtesting of an "offer" price strategy using 1second data, but these variations roughly even out.
You can't test offers with that data to degree of usefullness. You're looking for an edge iro a couple of percent so your margin of error needs to be 1/10th of that. Eg £2 live vs £3 test, a 50% difference ! It's not one that will balance out either because your fill rate is a guess.

Any chance of a couple of pictures rather than all those numbers?
Ill do some charts once ive forward tested the update for a few days
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

So updated bot ready for the new week. Had a trial run today, but had some issues with transform from backtest program strategy to Guardian baf rules, a couple of misstakes, hopefully all ironed out now, and fairly sure backtest to Guardian equivalence is pretty good.
Fingers crossed this week...
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

Backtest over my complete dataset (3rdMar->11thApr) for the latest bot, here's hoping forward is the same!!:
BackT1.png
Post Reply

Return to “Betfair trading strategies”