Trading What I see !?

Learn sports betting strategies and discuss key factors to consider when placing a bet.
Post Reply
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

goat68 wrote:
Wed Apr 07, 2021 7:25 pm
ShaunWhite wrote:
Wed Apr 07, 2021 6:43 pm
You said it's all backtest, but you're only showing one set of results. Where's the multiple backtest results.
I've still not got enough data to fully dice, but i'll do some basic ones on what i've got, thanks for the idea
I did mention it quite a while ago but you're forgiven because a lot of info came in fast and you didn't know who to listen to. ;) Gotta be honest here, without in and out of sample testing you're wasting your time. Using all your data and excluding the losers makes finding something a self fulfilling prophecy rather than proving anything. The future is unknown, so your test sample has to be unknown having done your analysis elsewhere.
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

ShaunWhite wrote:
Wed Apr 07, 2021 6:43 pm
You said it's all backtest, but you're only showing one set of results. Where's the multiple backtest results from random subsets of your data? At the risk of being repetitive finding an edge in one set of data is fairly easy but not many hold up to more rigorous analysis which you'll need to give you some assurance about what future data might show.
So that didn't take long! i've just updated my backtest program to produce a random backtest on 30% of the data taken at random, here are 10 random samples:
% turnOv = 0.34%
% turnOv = 0.72%
% turnOv = 0.75%
% turnOv = 0.63%
% turnOv = 0.65%
% turnOv = 0.88%
% turnOv = 0.40%
% turnOv = 0.38%
% turnOv = 0.74%
% turnOv = 0.20%

So roughly: average=0.57%, each random bucket=~75 trades
Quite happy with that result even if i've not really got enough data to truly rely on, but gives me more confidence there maybe something there and to ignore any current weakness...
Thanks Shaun, grand idea!
User avatar
goat68
Posts: 2019
Joined: Tue Jun 30, 2020 3:53 pm
Location: Hampshire, UK

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
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 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
User avatar
Trader724
Posts: 562
Joined: Fri Dec 27, 2019 11:22 pm

goat68 wrote:
Wed Apr 07, 2021 3:14 pm
Trader724 wrote:
Wed Apr 07, 2021 7:17 am
goat68 wrote:
Tue Apr 06, 2021 9:11 pm
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.
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: 562
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.....
Post Reply

Return to “Betfair trading strategies”