Adjust stake based on previous result

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
MattP
Posts: 31
Joined: Mon Feb 08, 2021 9:34 pm

I have a strategy that is working out on paper but I'm not sure if it can be automated in BA.

I have a rule for the core strategy, simple enough to enter into Guardian but need it to include a loss recovery staking plan based on previous results.

For simplicity let's say:

1 loss, next stake x 2
2 loss, next stake x 3
3 loss, revert to base stake until win

Can this be done in BA, without using a spreadsheet? Reason for not using the spreadsheet is high number of markets per day.

I haven't looked to be honest but does BA support other bespoke applications using the API, so my own software could be updating a file or database throughout the day.

Or should I just spend 299 on an API key and keep BA for manual trades.
MattP
Posts: 31
Joined: Mon Feb 08, 2021 9:34 pm

I've done some searching and it looks like this isn't supported, possibly even Gambling Commission guidelines forbidding it.

I'm certainly not looking to do Martingale. Will be doing more random testing and Monte Carlo type simulation so will keep testing if a certain level if loss recovery (2x, 3x, 5x stake then quit) is useful or not.
sniffer66
Posts: 1679
Joined: Thu May 02, 2019 8:37 am

MattP wrote:
Wed Mar 03, 2021 1:24 pm
I've done some searching and it looks like this isn't supported, possibly even Gambling Commission guidelines forbidding it.

I'm certainly not looking to do Martingale. Will be doing more random testing and Monte Carlo type simulation so will keep testing if a certain level if loss recovery (2x, 3x, 5x stake then quit) is useful or not.

Obviously I'd advise against recovery staking but the only way I could think to do it would be if you knew the P&L on selection(s) prior to market close. i.e greened up. You could save that to an SV then export to CSV on a timed cycle. Your code could then pick up the value from the exported CSV and you could pass back to another market as an SV using the CSV import setup. Then calc with it in the new market

Alternatively, scrape the previous market P&L from BF and pass the same way

Pretty clunky but the only way I can think to do it
Last edited by sniffer66 on Wed Mar 03, 2021 3:26 pm, edited 1 time in total.
User avatar
Derek27
Posts: 23632
Joined: Wed Aug 30, 2017 11:44 am
Location: UK

imageproxy.gif
You do not have the required permissions to view the files attached to this post.
Archery1969
Posts: 3216
Joined: Thu Oct 24, 2019 8:25 am
Location: Newport

Derek27 wrote:
Wed Mar 03, 2021 2:25 pm
imageproxy.gif
:lol: :lol: :lol: :lol: :lol: :lol: :lol:
sniffer66
Posts: 1679
Joined: Thu May 02, 2019 8:37 am

Derek27 wrote:
Wed Mar 03, 2021 2:25 pm
imageproxy.gif
Forgive me Father for I have sinned. :D :D
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

The maths of gambling has been known for over 250yrs and in that time hundreds of thousands of people have spent lifetimes studying it. If it was this simple than it would be common knowledge. Every week someone thinks they've found something nobody else has seen, and it's never the case.

Rather than asking yourself if the maths works why not ask yourself what you bring to the party all the PhDs and Nobel prize winners didn't bring when they looked at it.

It's not a personal criticism, just a reminder of the perils of the Dunning Kruger effect.
User avatar
Derek27
Posts: 23632
Joined: Wed Aug 30, 2017 11:44 am
Location: UK

I'm getting tired of explaining the flaws in loss recovery and found an appropriate picture instead, but well done to sniffer for calmly answering the question. :)
Last edited by Derek27 on Wed Mar 03, 2021 6:31 pm, edited 1 time in total.
sniffer66
Posts: 1679
Joined: Thu May 02, 2019 8:37 am

Derek27 wrote:
Wed Mar 03, 2021 6:27 pm
I'm getting tired of explaining the flaws in loss recovery and found an appropriate picture instead, but well do e to sniffer for calmly answering the question. :)
I did caveat my answer, it was more the technical challenge to achieve it that interested me ;)
MattP
Posts: 31
Joined: Mon Feb 08, 2021 9:34 pm

ShaunWhite wrote:
Wed Mar 03, 2021 3:36 pm
The maths of gambling has been known for over 250yrs and in that time hundreds of thousands of people have spent lifetimes studying it. If it was this simple than it would be common knowledge. Every week someone thinks they've found something nobody else has seen, and it's never the case.

Rather than asking yourself if the maths works why not ask yourself what you bring to the party all the PhDs and Nobel prize winners didn't bring when they looked at it.

It's not a personal criticism, just a reminder of the perils of the Dunning Kruger effect.
Completely understand and I'm certainly not thinking I've found a mathematical anomaly or something new.

I suppose if the strategy is good then set level stake (or % bank) and let it grow itself.

At the moment I've been testing over a fixed data set of around 5000 races. I am about to start multiple runs over varying random samples so that may well show the variance in a more realistic manner.
User avatar
Derek27
Posts: 23632
Joined: Wed Aug 30, 2017 11:44 am
Location: UK

I must admit, the "3 loss, revert to base stake until win" is an interesting variant of the Martingale. Level stakes until you back a winner! :)
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

MattP wrote:
Wed Mar 03, 2021 8:31 pm
ShaunWhite wrote:
Wed Mar 03, 2021 3:36 pm
The maths of gambling has been known for over 250yrs ...
Completely understand and I'm certainly not thinking I've found a mathematical anomaly or something new.

I suppose if the strategy is good then set level stake (or % bank) and let it grow itself.

At the moment I've been testing over a fixed data set of around 5000 races. I am about to start multiple runs over varying random samples so that may well show the variance in a more realistic manner.
No harm in looking Matt and you can have interesting finds when you're looking for something else anyway, and sorry the reply sounded harsh but we see a lot of this fella here http://martingale.ie/ :)

The only reputable staking plan I know of is Kelly as that doesn't rely on previous results, it sticks purely to the mantra that every event is unconnected.
MattP
Posts: 31
Joined: Mon Feb 08, 2021 9:34 pm

I have completed some further testing, for anyone interested in graphs! I have seen others using this type of recovery staking, small increase in stakes for 3-4 attempts before reverting to base.

This data is based on a staking plan of 1x (after 1st loss, no change), 3x (after 2 consecutive losses), 3x (again after 3rd consecutive loss), 5x (after 4th consecutive loss) then stay at 1x. Reset after next win.

The initial test was all qualifying races to date in the past circa couple of months, in order.

Image

At that stage it looked the idea had some merit on my selections.

I then decided that as each race is of course independent to shuffle my dataset (c. 5000 races) but this doesn't change the outcome so I also randomly used 1 in 3 results. Basically a crude If random number between 1-3 = 2 process race otherwise skip.

You need to ignore the ends of each graph, that isn't a big drawdown, just I'm reusing the same arrays but the random selection means different numbers of races so some old data gets tagged on the end.

Image
Image

This was less conclusive but in these tests all the datasets were different so doesn't really allow much comparison.

Finally I decided to test both approaches on the same datasets. Outcome was virtually no difference. Out of the 6 images I had I appear to have selected the 4 where the no recovery finished slightly higher, there were others where it finished slightly lower.

Image

Overall I'm not sure what to conclude. There is no definite edge in my selections as it is still quite crude. I was going to run some similar tests on my 'weighted dice' model to see if the results are much different if you know your selection has a genuine edge against the odds offered. Still seems to be playing mostly with variance though
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

I think you're finding that all that happens is you're having 1x 2x or 3x stake at random and the selections just win at their expected rate.
And you'll conclude that if you have a winning method, you might as well just go 3x on all of them. Try that, 3x on them all, I think it'll make more than it does varying the stake from 1x to 3x.
Post Reply

Return to “Bet Angel - Automation”