Football Betting Algorithm in Python Explained

Поділитися
Вставка
  • Опубліковано 30 вер 2024

КОМЕНТАРІ • 118

  • @Stl71
    @Stl71 8 місяців тому +4

    I've built my own model, but it failed. I mean, the data I used, gave no clear answer of what I should bet. Getting the right data is a serious work and the most important step to profit.

    • @marcoperez357
      @marcoperez357 2 місяці тому

      Any updates on this, man? I do agree with your comment above.

    • @LiamHartley
      @LiamHartley  4 дні тому

      We were in the same spot as you when I published this video two years ago. Since then, we've built backtesting engines and defined "Probability Thresholds" to allow our software to pick the bets from all the value bets identified.
      This project has expanded a lot now, and it's the foundation for my company, Systematic Sports, which I run with my business partner, Estephe.
      www.systematicsports.co.uk

  • @smtsoftwaresolutions1966
    @smtsoftwaresolutions1966 Рік тому +3

    UA-cam is to show how, not to show off. Now I can see why you have less than 1K SUBSCRIBERS. Good luck, I hope your algorithms work for you.

    • @LiamHartley
      @LiamHartley  Рік тому

      Here’s all my free software and how to videos: ua-cam.com/users/datadrivendecisions0

  • @OS690
    @OS690 3 місяці тому +1

    Is this updated mate? do you have any repo where I can find this?

    • @LiamHartley
      @LiamHartley  4 дні тому

      Yessir! I've been working on it ever since this video!
      I built it out into a company with my co-founder Estephe and you can find out more about what this project became on our website.
      www.systematicsports.co.uk

  • @jemalwiseman46
    @jemalwiseman46 Рік тому +2

    Great video!!! Could you explain what you mean by bookies “balancing there books” please?

    • @DJkillerFILMZ
      @DJkillerFILMZ Рік тому +1

      even if the odds are mathematically worse they need to provide better odds to the other team in order to cover the bets. Lets say statistically team A has 70% and team B has 30% chance of winning. If 90% of people bet team B you can't provide the 30% odds because even if that outcome is less likely you would lose too much money in that unlikely event, so they even up the odds depending on the volume of bets.

  • @caiolima7433
    @caiolima7433 Рік тому +3

    Great vid! Could you tell about the data used in the model? There is a source?

    • @LiamHartley
      @LiamHartley  4 дні тому

      The data is the secret sauce (source)! It's not something that I can share publicly unfortunately, but you can find out more about what this project evolved into on the Systematic Sports website:
      www.systematicsports.co.uk

  • @remotaurog
    @remotaurog 2 роки тому +4

    Its fun making models ,there use to be a brilliant website years ago some math professor posted his models for free ,excel related ,if you want to make money make it easier for yourself than footie.

    • @LiamHartley
      @LiamHartley  4 дні тому

      Yes, football is definitely a hard sport to get right!

  • @matteobianchi5176
    @matteobianchi5176 2 роки тому +3

    Can you please share your source code??? Please I need it. Good Job anyway! 😃

    • @etherealparadise7689
      @etherealparadise7689 2 роки тому +1

      agreed, no point in making this video to gloat, not cool

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      I didn't make this video to gloat. The entire output of this code that I've written is available on my website for everyone's benefit. There's even snippets of it on my Medium page

    • @mars2259
      @mars2259 2 роки тому

      @@LiamHartley Hi liam thanks for providing this! But I am unable to locate this on your site unless I am being blind. Reason I ask is I want to replicate this but for my own understanding and for me the best way is to learn through already written code. Many thanks

    • @LiamHartley
      @LiamHartley  2 роки тому

      @@mars2259 www.liamhartley.co.uk/football

  • @jacobjoseph8118
    @jacobjoseph8118 2 роки тому +12

    This is the best thing I have ever watched. Over the past few weeks I have flirted with attempting to make my own algorithm, not quite realising how much needs to be done even with my own limited knowledge of coding. I'll learn as I go I suppose. Great work.

    • @peterwhite9553
      @peterwhite9553 2 роки тому

      Can we gang up and share ideas?

    • @memegalore257
      @memegalore257 Рік тому

      @@peterwhite9553 you still up for it?

    • @pimfentsahm1605
      @pimfentsahm1605 Рік тому +2

      @@memegalore257 You guys still working on it? Would love to join the project!

  • @jfez1206
    @jfez1206 2 роки тому +2

    Have you twitter? Great work up 150%!

    • @jfez1206
      @jfez1206 2 роки тому

      I do not have Instagram/tiktok but would love to help out!

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      I do (@liamjhartley) but I don't really use it. @liamhartley.co.uk on Instagram is the best place to keep up with me and the bets. I've now bet £1,300 and down about 3% at the moment so it swings in roundabouts! All the bets I've made are on my website :)

  • @SneakyRussiann
    @SneakyRussiann 2 роки тому +8

    Found you on Tiktok and I think what you’ve done is absolutely class mate! loving the work!

  • @arisdavidpinogarcia7430
    @arisdavidpinogarcia7430 2 роки тому +2

    Buen vídeo, Saludos desde Colombia hermano🙌

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      Bienvenido tío! Mucho gusto

  • @conquerthabookz8541
    @conquerthabookz8541 2 роки тому +1

    have you considered to do algorithms on other sports like basketball

    • @LiamHartley
      @LiamHartley  2 роки тому

      Absolutely. I put a video out on my tiktok about this the other day. We’re in the middle of getting ready for the next football season right now!
      vm.tiktok.com/ZMNDQrUVv/?k=1

  • @92nollag
    @92nollag 2 роки тому +1

    There is no way on the earth you are going to beat betting markets with this.

  • @Feenos
    @Feenos 3 роки тому +1

    Will you be posting on your site this weekend...saved your site on the weekend before the break so was hoping u be posting first prem week back

    • @LiamHartley
      @LiamHartley  3 роки тому

      Yes! You can expect next days games to be up by 8pm. Follow my IG stories to see when they’re up @liamhartley.co.uk

    • @LiamHartley
      @LiamHartley  3 роки тому

      The bets usually become less profitable the longer they’re up so you wanna get on them ASAP

  • @ray2hit6
    @ray2hit6 3 місяці тому

    After 2 years , how about your result ?

    • @LiamHartley
      @LiamHartley  3 місяці тому +1

      Check out: www.systematicsports.co.uk
      Season 4 coming soon.

    • @marcoperez357
      @marcoperez357 2 місяці тому +1

      @@LiamHartley It would be a great idea to improve the current articles with more info. Including, if possible, further details (even if we have to pay for it, that would be great).

  • @k4v123
    @k4v123 2 роки тому +1

    where can we find your spreadsheet?

    • @LiamHartley
      @LiamHartley  2 роки тому

      The “personal betting log” button on this page www.liamhartley.co.uk/football

  • @dertomh
    @dertomh 3 місяці тому

    I am working on my own algorithm and want to try it on my own, so I don't watch the video yet. I will come back to it after successfully running a code or after giving up. 😂

    • @LiamHartley
      @LiamHartley  4 дні тому

      Good luck! Let me know how it goes :)

  • @brhnkh
    @brhnkh 4 місяці тому

    Very cool! Is this an implementation of Dixon and Coles (1997)?

    • @LiamHartley
      @LiamHartley  3 місяці тому

      No, but that's a great model too!

  • @amineharbaoui7415
    @amineharbaoui7415 2 роки тому

    really searching for a youtuber who can help me with programming and stuff and dang saw the yeezus cover there
    yes you are the one

  • @farayiguzha1005
    @farayiguzha1005 3 роки тому +1

    How do you decide how much to bet? Looks really good

    • @LiamHartley
      @LiamHartley  3 роки тому +1

      I'll do a full video explaining the theory a bit more but this is a good starting place: en.wikipedia.org/wiki/Kelly_criterion

  • @pitahson4513
    @pitahson4513 Рік тому +1

    Like to know more

    • @LiamHartley
      @LiamHartley  4 дні тому

      Check out our website to see how this project has evolved!
      www.systematicsports.co.uk

  • @davidpasini
    @davidpasini Рік тому

    What library and method would you use for machine learning?

  • @michstockholm1164
    @michstockholm1164 2 роки тому

    Nice project, but it seems a losing one! :(
    Sum the results on the spreadsheet.
    Big losing!

    • @LiamHartley
      @LiamHartley  2 роки тому

      Thank you! Yeah we are down at the moment but the sample size is still quite small so we're pushing on

  • @carlgodfrey4482
    @carlgodfrey4482 Рік тому +1

    I'm lost guy's I can't find anything and I'm sure he has a better version now and I just start learning python

    • @LiamHartley
      @LiamHartley  Рік тому +1

      All of the latest updates are on my website!
      We're still working on it don't worry. It gets more powerful every day.
      www.liamhartley.co.uk/football

    • @carlgodfrey4482
      @carlgodfrey4482 Рік тому

      @@LiamHartley you the man lol

  • @connalreilly
    @connalreilly 2 роки тому +1

    Would you have any resources on scraping the bookies odds and then importing the data with python? I know you wont give away the secret sauce of the processing but I'm just looking to get started by getting in the odds for horse racing, have limited java knowledge.

    • @LiamHartley
      @LiamHartley  2 роки тому +3

      Here’s an article I wrote about scraping lineups from an old data source, you should be able to apply the same principles to bookmakers
      python.plainenglish.io/how-to-scrape-predicted-lineups-from-fantasy-football-scout-with-python-b11e92ea57f2

    • @connalreilly
      @connalreilly 2 роки тому

      @@LiamHartley thanks for the reply, for the bookies I would have to scrape but betfair has an API, is that correct? Thanks again

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      @@connalreilly we use an api for this project but there are websites you can scrape. APIs are generally easier and more stable though

  • @Marcel_KAAAA
    @Marcel_KAAAA 2 роки тому

    Really happy i found. More content on tiktok?

    • @LiamHartley
      @LiamHartley  Рік тому

      Unfortunately I got removed from TikTok. So my website, Instagram, Medium and Telegram channels are the best way to stay up to date!

  • @toukka4
    @toukka4 Рік тому

    So have you made any money with this model?

    • @LiamHartley
      @LiamHartley  Рік тому

      We’ll be announcing our recent backtest results with our Season 3 release!
      www.systematicsports.co.uk/season-3

  • @Shillsy14
    @Shillsy14 2 роки тому

    what return have you made betting off your predictions sir?

    • @LiamHartley
      @LiamHartley  4 дні тому

      We made 23% last year! You can find our previous and future season performance reports on our new website for this project:
      www.systematicsports.co.uk

  • @k1n___
    @k1n___ Рік тому

    goood men!!

  • @-rvigo
    @-rvigo 2 роки тому

    Hello, I want the code link, is it available please?

    • @LiamHartley
      @LiamHartley  4 дні тому

      The code is not publicly available, but you can see how this project has evolved into Systematic Sports www.systematicsports.co.uk

  • @pedrolima9584
    @pedrolima9584 Рік тому +3

    Whoa man one of the gratest videos I have ever seen! I learning pyhton right now and this is the type of thing I want to do;
    Amazing job, you will doing a video explaining how u have done it in python or something?? or if it possible could you show the scrpit or something??
    Impressive job man Congrats!!!

    • @LiamHartley
      @LiamHartley  Рік тому +2

      You can find some more code snippets on my Medium page: medium.com/@liamjhartley
      I won't be showing all of my code but I will be explaining how you can learn to build your own in the future!

  • @petarhristov8200
    @petarhristov8200 Рік тому

    Great video.The only thing i dont understand is in your site in the category with suggestions for value bets how do i calculate how mutch i have to bet? Lest say my bank is 100$ and in the value bet the Kelly Criterion is 0.50. How do i calculate the amount i have to bet?

    • @michaeltesemma6788
      @michaeltesemma6788 Рік тому

      Kelly Criterion: F = BP - Q / B ,
      F = percentage of bankroll you should allocate
      B = payout in terms of odds
      P = probability of winning
      Q = probability of losing

    • @LiamHartley
      @LiamHartley  4 дні тому

      We do all of these calculations for you in our new project, Systematic Sports. We use the probability of the outcome that is calculated by our algorithm to generate the value for the Kelly Criterion.
      Happy to answer any other questions on bankroll management and you can learn more about how this project has evolved here: www.systematicsports.co.uk

  • @kylepratt7745
    @kylepratt7745 3 роки тому

    Are you running it again this weekend?

    • @LiamHartley
      @LiamHartley  3 роки тому

      Yeah. Will post on my IG story when they're up instagram.com/liamhartley.co.uk/

  • @JeffersonCanedo
    @JeffersonCanedo 2 роки тому

    Finally found you here

  • @Philgob
    @Philgob 2 роки тому

    nice, i was thinking a sport like basketball might have less variability because number of points is higher vs football where goals scored can be low and have high variability

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      Football is definitely one of the harder ones to make a mathematical model for and I'm keen to do other sports once I've really cracked this one!

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      New football season coming soon!

    • @godelneumann3932
      @godelneumann3932 2 роки тому

      @@LiamHartley what do you think about making a boxing one?

  • @yonisupersaiyanyoni3693
    @yonisupersaiyanyoni3693 11 місяців тому

    What the website?

    • @LiamHartley
      @LiamHartley  11 місяців тому

      The project has moved to www.systematicsports.co.uk/ !

  • @DanLaidlaw
    @DanLaidlaw 2 роки тому +1

    Hi mate what does the alpha % mean on your bets?

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      It’s the % difference between our calculations and the bookies odds. E.g. bookies offer 4.0 and we calculate 2.0 then 4/2 = 100% alpha. Higher alpha indicates more value in the opportunity but not that it’s more or less likely to happen

    • @DanLaidlaw
      @DanLaidlaw 2 роки тому +1

      @@LiamHartley appreciate the reply mate just discovered you tonight and really looking forward to following you and your progress :)

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      @@DanLaidlaw anytime and thank you! Check out my other socials on my website to keep up with the progress!

    • @DanLaidlaw
      @DanLaidlaw 2 роки тому

      @@LiamHartley I’ve dropped a follow everywhere bro, when will the other leagues betting be updated on your website?

    • @DanLaidlaw
      @DanLaidlaw 2 роки тому

      @@LiamHartley also I wondered if it would be possible for you to put the full game on the betting calculation on your site so that people know they’re looking at the right match and not data from a previous game

  • @cartierluke
    @cartierluke 3 місяці тому

    great work

  • @JeffersonCanedo
    @JeffersonCanedo 2 роки тому

    Alright Alright Alright!!!

  • @MrCashSmart
    @MrCashSmart 2 роки тому

    Love the idea of this mate. Smashing it, keep it up

  • @ReactCentral_Comps
    @ReactCentral_Comps 2 роки тому

    Really liked the vid! But just one thing, bookies don't balance their books, it's common for an outcome to result in a large loss. Most errors come from autotraders/model errors!

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      Really? I’m confident that bookies will balance their books on occasion to adjust their risk/reward as well as what you’ve mentioned

    • @ReactCentral_Comps
      @ReactCentral_Comps 2 роки тому

      @@LiamHartley yeah you're right I should have been a bit more explicit, I think most people believe bookies setup odds so that no matter the result of a game they come out with a profit

  • @DjZitify
    @DjZitify 2 роки тому

    How often does the output update on your website?

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      Before every league game over the five major European leagues

    • @DjZitify
      @DjZitify 2 роки тому

      @@LiamHartley Not at all complaining here, cause this tool has helped me confirm the value i find, but it doesnt seem to up update very often? Also, have you considered adding some calculations for CL?

    • @LiamHartley
      @LiamHartley  2 роки тому

      @@DjZitify it runs every hour on the half hour right now but you have to refresh the page. How often would you like it to update?

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      @@DjZitify we’d love to do other leagues and it’s something we’re considering for the future as well as other sports

    • @DjZitify
      @DjZitify 2 роки тому +1

      @@LiamHartley Yeah, im refreshing. But as you can see now on the bundesliga page, last odds update was on 02/09, with games played on the 3rd and 4th. Not too important, just thought i'd let u know. :)

  • @emmanueladdo3475
    @emmanueladdo3475 2 роки тому

    am here huuuuuuuray

  • @davidneil221
    @davidneil221 2 роки тому +1

    How much data do you use? A team can completely change between seasons, do you primarily use the current seasons data?

    • @LiamHartley
      @LiamHartley  2 роки тому +1

      We've got 3,200 players across multiple leagues and seasons to allow for weekly predictions and backtesting. We input new players every transfer window/season.
      We've also calculated 50,000 outcomes to test our model's accuracy which I'll do a full write up on this summer. There are also 285,000 rows of bookies data and 18,000 value bets identified across all leagues this season.

  • @dannygh
    @dannygh 2 роки тому +1

    Share the code fam

  • @Arj910
    @Arj910 3 роки тому +1

    Great video! Looking forward to seeing what's to come