Yes the info for the proc is just background data after I have done hours of work, checking leagues, last game results, sores, prices on Betfair for each outcome and using the "variable" options to move the score one way or another.
In Man City's case I would have probably added a minus score because they are playing in the European Cup this week v Dortmund. I didn't see the game and would have expected Leeds to have lost, but then that's why I want to take Human Bias out of the equation, as most people would have expected Man City to have won but I want to spread an "upset" result across the accas/groups as well so that there is more chance of getting winning accas.
By they way did Man City rest players because of this weeks European Championship game? As if I had seen the team sheet before the game then I would also be tweaking the variables to adjust the Team Scores which make up the MatchScores to account for missing key players, which would have provide more double chances, and pro Leeds outcomes.
I haven't had much time to do this, 2 hours it's taken and I have to go to the doctors but hopefully this is enough.
I have put 6 games into the FOOTBALL_MATCHES table with their scores and prices, using real prices from tonights games Everton v Brighton, Southampton v WBA etc.
However in reality there would be far more than 6 games in the table, more like 12-18, as the odds would be too low to make a decent return.
However as there are only 6 matches, I have put the Stake to 50p, and in the winning example it returns £8+
/****** Object: Table [dbo].[FOOTBALL_ACCAS] Script Date: 12/04/2021 13:01:59 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [dbo].[FOOTBALL_ACCAS](
[AccaID] [int] IDENTITY(1,1) NOT NULL,
[AccaNo] [int] NOT NULL,
[MatchID] [int] NOT NULL,
[Result] [char](1) NOT NULL,
[AccaReturn] [money] NOT NULL,
[Locked] [bit] NOT NULL,
CONSTRAINT [PK_FOOTBALL_ACCAS] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [dbo].[FOOTBALL_ACCAS] ADD CONSTRAINT [DF_FOOTBALL_ACCAS_AccaNo] DEFAULT ((1)) FOR [AccaNo]
ALTER TABLE [dbo].[FOOTBALL_ACCAS] ADD CONSTRAINT [DF_FOOTBALL_ACCAS_MatchID] DEFAULT ((0)) FOR [MatchID]
ALTER TABLE [dbo].[FOOTBALL_ACCAS] ADD CONSTRAINT [DF_FOOTBALL_ACCAS_Result] DEFAULT ('L') FOR [Result]
ALTER TABLE [dbo].[FOOTBALL_ACCAS] ADD CONSTRAINT [DF_FOOTBALL_ACCAS_Return] DEFAULT ((0)) FOR [AccaReturn]
ALTER TABLE [dbo].[FOOTBALL_ACCAS] ADD CONSTRAINT [DF_FOOTBALL_ACCAS_Fixed] DEFAULT ((0)) FOR [Locked]
/* create the 6 matches and 21 match outcomes to be spread across mini groups */
INSERT INTO FOOTBALL_MATCHES
(1,'Man City v Leeds','Man City Win', 1.40,92,76,810),
(1,'Man City v Leeds','Man City Win or Draw', 1.20,92,76,830),
(1,'Man City v Leeds','Man City Win or Leeds', 1.18,92,76,825),
(1,'Man City v Leeds','Leeds Win', 2.20,92,76,700),
(2,'Man UTD v Leicester','DRAW', 2.00,82,50,614),
(2,'Man UTD v Leicester','Man UTD WIN', 2.50,82,50,640),
(2,'Man UTD v Leicester','Man UTD WIN OR Leicester', 2.00,82,50,645),
(2,'Man UTD v Leicester','Leicester WIN', 2.25,82,50,643),
(3,'Brighton v Everton','Brighton WIN',2.30,60,70,600),
(3,'Brighton v Everton','Brighton WIN or Everton',1.30,60,70,630),
(3,'Brighton v Everton','DRAW',3.30,60,70,620),
(3,'Brighton v Everton','Everton WIN',3.30,60,70,620),
(4,'West Brom v Southampton','West Brom WIN', 3.50,35,42,540),
(4,'West Brom v Southampton','Southampton WIN', 2.20,35,42,570),
(4,'West Brom v Southampton','West Brom or Southampton', 1.30,35,42,590),
(5,'Liverpool v Aston Villa','Liverpool WIN', 1.40,83,68,770),
(5,'Liverpool v Aston Villa','Liverpool WIN or Draw', 1.20,83,68,790),
(5,'Liverpool v Aston Villa','Aston Villa', 1.20,83,68,750),
(6,'Chelesa v Spurs','Chelsea WIN',1.45,75,72,680),
(6,'Chelesa v Spurs','Spurs WIN',1.40,75,72,670),
(6,'Chelesa v Spurs','DRAW',1.30,75,72,660)
/* insert results into accas table */
INSERT INTO FOOTBALL_ACCAS
-- calculate profit of winning acca 2, by using a 50p stake across 6 winning outcomes = £8.17
SELECT 0.50 * 1.18 * 2.50 * 3.30 * 1.20 * 1.40
Ideally you want to make as much money from as little layout as possible, a min stake on Betfair is 10p, so £2 can make 20 accas.
If you can get the odds ALSO right for each acca which I don't know if you could do in a set based solution as you would want to ensure that the game outcomes you add into each group/acca would always add up to a profit higher than the TOTAL STAKE e.g £6 result > £2 total stake. £4 - £6 is about the average return on an acca from a 10p stake with 8-16 games in it. The max no of games you can have in an acca is 25 by the way.
So ideally you wouldn't stop filling up a sub group/acca until the prices (odds x odds x odds etc) = a ££ return more than the TOTAL STAKE you have used for all possible accas. So if you are using £2 for 20 accas, each acca would stop around double/treble the £2 amount, £4-£6 etc. So the acca groups would keep getting filled up until they would return a profit overral.
Hope this helps, sorry I have to rush to GPs now. Horrible Vaccine side effects = FLU for a week, blood clots in legs. Not nice.
Thanks for help