NBA-Machine-Learning-Sports-Betting icon indicating copy to clipboard operation
NBA-Machine-Learning-Sports-Betting copied to clipboard

Overall Improvement and Updates

Open kyleskom opened this issue 4 years ago • 4 comments

There are many updates and improvements still in the pipeline. As the NBA season comes to a close, there won't be any time to test these changes. Expect many updates and improvements for the 2021-2022 season!

I am looking for feedback and suggestions. Please leave an issue below for improvements and features that you would like to see!

kyleskom avatar Jun 08 '21 02:06 kyleskom

Suggestion:

It would be great to incorporate getting odds and U/O info using API, rather than having the user type it in. Then the output could include expected value, as well as probability.

There are various services online, mostly non-free, that offer live data, in JSON, from various bookies. I've found one that has a free option allowing up to 500 requests per month. It requires email registration, which could be explained in the README. Very straightforward. Link below:

https://the-odds-api.com/

Another application of odds info would be to compute the Kelly criterion for each bet. This is a formula that indicates what percentage of your bank to bet, to maximise long-term earnings. It's calculated using odds and probability. It can be seen as the next step beyond expected value, as it gives more or less weight to bets, rather than just a yes/no indication. Here's a paper about it:

https://www.stat.sfu.ca/content/dam/sfu/stat/alumnitheses/2012/FabianMoyaFinalVersion.pdf

ximomen250 avatar Jun 17 '21 08:06 ximomen250

Measuring past performance:

Would it be possible for to the user to input a date in the past and have the program run as it would have done on that day, outputting:

-fixtures
-probabilities
-odds
-expected values
-results

Better still, the user sets start and end dates, and the program runs day by day through that period; outputting to a file.

This data could be used to measure performance over different periods; also to see if it works better at certain times of the year etc.; and to test strategies: e.g. What if I had made every bet in this period? What if I had made every bet of at least X expected value in this period?

It would be important that the models use only data that were available on the given date. So, for April 7 2018, only data up to and including season 2016/17, I guess.

ximomen250 avatar Jun 18 '21 12:06 ximomen250

Measuring past performance:

Would it be possible for to the user to input a date in the past and have the program run as it would have done on that day, outputting:

-fixtures
-probabilities
-odds
-expected values
-results

Better still, the user sets start and end dates, and the program runs day by day through that period; outputting to a file.

This data could be used to measure performance over different periods; also to see if it works better at certain times of the year etc.; and to test strategies: e.g. What if I had made every bet in this period? What if I had made every bet of at least X expected value in this period?

It would be important that the models use only data that were available on the given date. So, for April 7 2018, only data up to and including season 2016/17, I guess.

For only using a model trained up until a certain point that would be very hard. We would need to be able to train models on the fly up till that date. Since I train thousands of models to get the best one this would be very time consuming and take long to run. Everything else though I think can be added.

kyleskom avatar Jun 18 '21 16:06 kyleskom

Adjust the base formula to only bet if the odds are great then the juice.

I.E. Making a bet for 55% confidence is not worth it as the house naturally takes about a 10% juice. If the best is 61% then take the bet, if lower than that consider it not an effective EV bet and thus consider it a push. You can still collect the data, but I bet your performance graph would dramatically go up due to this slight change.

STRATZ-Ken avatar May 07 '22 23:05 STRATZ-Ken

Suggestion:

It would be great to incorporate getting odds and U/O info using API, rather than having the user type it in. Then the output could include expected value, as well as probability.

There are various services online, mostly non-free, that offer live data, in JSON, from various bookies. I've found one that has a free option allowing up to 500 requests per month. It requires email registration, which could be explained in the README. Very straightforward. Link below:

https://the-odds-api.com/

Another application of odds info would be to compute the Kelly criterion for each bet. This is a formula that indicates what percentage of your bank to bet, to maximise long-term earnings. It's calculated using odds and probability. It can be seen as the next step beyond expected value, as it gives more or less weight to bets, rather than just a yes/no indication. Here's a paper about it:

https://www.stat.sfu.ca/content/dam/sfu/stat/alumnitheses/2012/FabianMoyaFinalVersion.pdf

I would like to implement the Kelly criterion feature if this is still desired. Has this been attempted before? @kyleskom

timseymour42 avatar Apr 25 '23 21:04 timseymour42

I have no tried but im welcome to having you add it in!

kyleskom avatar Apr 25 '23 21:04 kyleskom

Good afternoon! Great work and support, I would like to know how I can modify this script to use it in football matches. Thank you

Sausalitos avatar May 04 '23 17:05 Sausalitos

I second @Sausalitos. I would love to help contribute on features like NFL, NCAA, MLB... @kyleskom how easy would that be?

Jaytee06 avatar Aug 04 '23 04:08 Jaytee06