Tennis Automation Framework baf

Post Reply
sniffer66
Posts: 656
Joined: Thu May 02, 2019 8:37 am

Seeing as it's the US Open.....

This is an update to the BAF I posted here a while ago. I can't edit that post for some reason

viewtopic.php?f=51&t=21108

The original had a few bugs and improvements like History Lists weren't available at the time. I've ironed out all bugs I'm aware of and updated the rules to include History lists. I've also left a few Signal and SV's in place for your automation - SP, Stake, Set state signals, SP for Fave in Set 2 - should be self explanatory

Applied to a tennis market prior to going in play it will sort the favourite into position 1, re-grab the SP of the fave until the InPlay signal is received and calc the following SV's

SV's:

BPConverted - Number of BP's Converted by the fave
ServeBrokenCount - Number of games the fave lost on serve.
BPAgainstTotal - Number of BP's against the fave.
BPForTotal - Number of BP's earned by the fave.
BPSavedTotal - Number of BP's saved by the fave.

(Above at the end of each game)

PercentWonOnServe - Percentage of points won by fave when serving (1st and 2nd serve combined)
PercentReceivingOnServe - Percentage of points won by fave when receiving (1st and 2nd serve combined)

(Above after each point)

As each SV is written an entry will also be made into the relevant History List:

List 1 - BPConversionTotal%
List 2 - BPSavedTotal%
List 3 - BPForTotal
List 4 - BPAgainstTotal
List 5 - BPSavedTotal
List 6 - PercentWonOnServe
List 7 - PercentReceivingOnServe

As an example of History List use I've created a set of rules that take an average of the serve\receive % over 3 samples (0s, 60s, 120s ago) and compare to the average from previous (300s, 360s and 420s ago).
An SV value is then switched on or off depending on whether the serve is improving, static (less than 1% difference) or declining.


This results in the following set SV's for the fave:

ServeImproving
ServeStatic
ServeDeclining

ReceiveImproving
ReceiveStatic
ReceiveDeclining


eg: If the fave serve is improving then SV ServeImproving = 1, ServeStatic = 0, ServeDeclining = 0


Only one of the 3 SV's for serve % or receive % will ever be set to 1
Adjust timings as you see fit
Capture.JPG



I've intentionally left the strategy section blank as this is purely a framework to gather stats. Run as is it will just collect the SV's and write to the log - probably the best way to test out anyway.

Log example below: (temp values are collected per game and reset at the start of the next)

01/09/2020 11:37:28: [G_Auto] : Store Value for Anna Bondar: BPForTotal = 3 + 1 = 4
01/09/2020 11:37:30: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.563 * 100 = 56.25
01/09/2020 11:37:33: [G_Auto] : Store Value for Anna Bondar: DogWonServeAfterBPAgainst = 1
01/09/2020 11:38:38: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.576 * 100 = 57.58
01/09/2020 11:39:41: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.571 * 100 = 57.14
01/09/2020 11:40:20: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.583 * 100 = 58.33
01/09/2020 11:41:01: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.568 * 100 = 56.76
01/09/2020 11:41:55: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.553 * 100 = 55.26
01/09/2020 11:42:36: [G_Auto] : Store Value for Anna Bondar: TempBPCountAgainst = 0 + 1 = 1
01/09/2020 11:42:38: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.538 * 100 = 53.85
01/09/2020 11:43:06: [G_Auto] : Store Value for Anna Bondar: FaveSavedBP = 1
01/09/2020 11:43:06: [G_Auto] : Store Value for Anna Bondar: TempBPSaved = 0 + 1 = 1
01/09/2020 11:43:08: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.55 * 100 = 55
01/09/2020 11:43:36: [G_Auto] : Store Value for Anna Bondar: TempBPCountAgainst = 1 + 1 = 2
01/09/2020 11:43:39: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.537 * 100 = 53.66
01/09/2020 11:44:24: [G_Auto] : Store Value for Anna Bondar: FaveSavedBP = 1
01/09/2020 11:44:24: [G_Auto] : Store Value for Anna Bondar: TempBPSaved = 1 + 1 = 2
01/09/2020 11:44:27: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.548 * 100 = 54.76
01/09/2020 11:45:47: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.545 * 100 = 54.55
01/09/2020 11:46:25: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.556 * 100 = 55.56
01/09/2020 11:46:49: [G_Auto] : Store Value for Anna Bondar: BPAgainstTotal = 3 + 2 = 5
01/09/2020 11:46:49: [G_Auto] : Store Value for Anna Bondar: BPSavedTotal = 2 + 2 = 4
01/09/2020 11:46:54: [G_Auto] : Store Value for Anna Bondar: FaveWonServeAfterBPAgainst = 1
01/09/2020 11:46:57: [G_Auto] : Store Value for Anna Bondar: BPSavedTotal% = 4 / 5 = 0.8
01/09/2020 11:46:57: [G_Auto] : Store Value for Anna Bondar: BPSavedTotal% = 0.8 * 100 = 80
01/09/2020 11:47:21: [G_Auto] : Store Value for Anna Bondar: PercentReceivingOnServe = 0.432 * 100 = 43.24
01/09/2020 11:48:24: [G_Auto] : Store Value for Anna Bondar: PercentReceivingOnServe = 0.436 * 100 = 43.59
01/09/2020 11:49:09: [G_Auto] : Store Value for Anna Bondar: TempBPCount = 2
01/09/2020 11:49:11: [G_Auto] : Store Value for Anna Bondar: PercentReceivingOnServe = 0.45 * 100 = 45
01/09/2020 11:49:55: [G_Auto] : Store Value for Anna Bondar: DogSavedBP = 1
01/09/2020 11:49:57: [G_Auto] : Store Value for Anna Bondar: PercentReceivingOnServe = 0.429 * 100 = 42.86
01/09/2020 11:50:36: [G_Auto] : Store Value for Anna Bondar: PercentReceivingOnServe = 0.419 * 100 = 41.86
01/09/2020 11:51:03: [G_Auto] : Store Value for Anna Bondar: BPForTotal = 4 + 2 = 6
01/09/2020 11:51:06: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.565 * 100 = 56.52
01/09/2020 11:51:08: [G_Auto] : Store Value for Anna Bondar: DogWonServeAfterBPAgainst = 1
01/09/2020 11:53:05: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.574 * 100 = 57.45
01/09/2020 11:53:38: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.563 * 100 = 56.25
01/09/2020 11:54:37: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.56 * 100 = 56
01/09/2020 11:55:15: [G_Auto] : Store Value for Anna Bondar: TempBPCountAgainst = 1
01/09/2020 11:55:17: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.549 * 100 = 54.9
01/09/2020 11:55:53: [G_Auto] : Store Value for Anna Bondar: BPAgainstTotal = 5 + 1 = 6
01/09/2020 11:55:53: [G_Auto] : Store Value for Anna Bondar: BPSavedTotal = 4 + 0
01/09/2020 11:55:53: [G_Auto] : Store Value for Anna Bondar: ServeBrokenCount = 1 + 1 = 2
01/09/2020 11:56:01: [G_Auto] : Store Value for Anna Bondar: BPSavedTotal% = 4 / 6 = 0.667
01/09/2020 11:56:01: [G_Auto] : Store Value for Anna Bondar: BPSavedTotal% = 0.667 * 100 = 66.667
01/09/2020 11:56:01: [G_Auto] : Greened up Marina Melnikova by Backing 6.88 at 1.17
01/09/2020 11:56:56: [G_Auto] : Store Value for Anna Bondar: PercentReceivingOnServe = 0.409 * 100 = 40.91
01/09/2020 11:57:31: [G_Auto] : Store Value for Anna Bondar: PercentReceivingOnServe = 0.422 * 100 = 42.22
01/09/2020 11:58:22: [G_Auto] : Store Value for Anna Bondar: PercentReceivingOnServe = 0.404 * 100 = 40.43
01/09/2020 11:58:57: [G_Auto] : Store Value for Anna Bondar: PercentReceivingOnServe = 0.417 * 100 = 41.67
01/09/2020 11:59:34: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.538 * 100 = 53.85
01/09/2020 12:01:28: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.528 * 100 = 52.83
01/09/2020 12:02:22: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.519 * 100 = 51.85
01/09/2020 12:03:08: [G_Auto] : Store Value for Anna Bondar: TempBPCountAgainst = 3
01/09/2020 12:03:10: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.509 * 100 = 50.91
01/09/2020 12:03:54: [G_Auto] : Store Value for Anna Bondar: TempBPSaved = 0 + 1 = 1
01/09/2020 12:03:56: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.518 * 100 = 51.79
01/09/2020 12:04:27: [G_Auto] : Store Value for Anna Bondar: TempBPSaved = 1 + 1 = 2
01/09/2020 12:04:29: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.526 * 100 = 52.63
01/09/2020 12:04:50: [G_Auto] : Store Value for Anna Bondar: TempBPSaved = 2 + 1 = 3
01/09/2020 12:04:50: [G_Auto] : Store Value for Anna Bondar: FaveSavedBP = 1
01/09/2020 12:05:14: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.542 * 100 = 54.24
01/09/2020 12:06:17: [G_Auto] : Store Value for Anna Bondar: TempBPCountAgainst = 3 + 1 = 4
01/09/2020 12:06:19: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.525 * 100 = 52.46
01/09/2020 12:06:56: [G_Auto] : Store Value for Anna Bondar: TempBPSaved = 3 + 1 = 4
01/09/2020 12:06:56: [G_Auto] : Store Value for Anna Bondar: FaveSavedBP = 1
01/09/2020 12:06:56: [G_Auto] : Store Value for Anna Bondar: TempBPSaved = 4 + 1 = 5
01/09/2020 12:06:58: [G_Auto] : Store Value for Anna Bondar: PercentWonOnServe = 0.532 * 100 = 53.23


Using all\some of the above it's reasonably straightforward to build stats based logic into tennis automation on top of the data we can get from Guardian

i.e Lay the Dog in the 2nd set (having won the first) IF fave serve % > 50, fave receive % > 40, fave earned 1+ BP's in first set, fave serve or receive was improving in last x mins of Set 1, Fave broke Dog serve > 0 in Set 1, Fave BP's against < 3 etc etc

Hope it's useful. I'm using it with my own strats at the US Open :)







Tennis Automation Framework (Stats &amp; History Lists).baf
You do not have the required permissions to view the files attached to this post.
sniffer66
Posts: 656
Joined: Thu May 02, 2019 8:37 am

I'd recommend using restricted refresh in Guardian if you apply to a few matches running at the same time. It can get a little busy in the log.
User avatar
jimibt
Posts: 3005
Joined: Mon Nov 30, 2015 6:42 pm

nice one - has the look and feel of my own automations, so is pretty easy to grok what the SV's/HL's are doing.

now just need to figure out an obscure tennis trat that is under used ;)

cheers!! ;)
sniffer66
Posts: 656
Joined: Thu May 02, 2019 8:37 am

jimibt wrote:
Tue Sep 01, 2020 1:13 pm
nice one - has the look and feel of my own automations, so is pretty easy to grok what the SV's/HL's are doing.

now just need to figure out an obscure tennis trat that is under used ;)

cheers!! ;)

No worries. Enjoy :)
User avatar
Euler
Posts: 20632
Joined: Wed Nov 10, 2010 1:39 pm
Location: Bet Angel HQ
Contact:

Good stuff!
User avatar
Dallas
Posts: 16306
Joined: Sun Aug 09, 2015 10:57 pm
Contact:

Looking forward to giving this a try

It looks a work of art from the description, kudos


Image
sniffer66
Posts: 656
Joined: Thu May 02, 2019 8:37 am

Dallas wrote:
Tue Sep 01, 2020 3:20 pm
Looking forward to giving this a try

It looks a work of art from the description, kudos


Image
Thanks Dallas. Took a little thinking through and some trial and error.
If you have any suggestions to improve on it I'll happily take them :)

The real shame is that I can't split out 1st and 2nd serve %'s. I did debate using small price fluctuations if the 1st serve failed but they happen regardless so it would purely be finger in the air...
Last edited by sniffer66 on Tue Sep 01, 2020 3:38 pm, edited 1 time in total.
henbet22
Posts: 60
Joined: Tue Apr 25, 2017 4:28 pm

Amazingly generous. :) :mrgreen:
sniffer66
Posts: 656
Joined: Thu May 02, 2019 8:37 am

henbet22 wrote:
Tue Sep 01, 2020 3:37 pm
Amazingly generous. :) :mrgreen:
I've taken a fair bit in the last year or so from generous people on the forum so only fair to give some back.

And you'll still need to add your own strats in ;)
captainbang
Posts: 68
Joined: Tue May 01, 2018 1:33 pm

This is just amazing! Thank you
Post Reply

Return to “Bet Angel Automation - Tennis”