dfs-with-r / coach

Lineup optimization for daily fantasy sports
https://dfs-with-r.github.io/coach/
GNU General Public License v3.0
47 stars 13 forks source link

Nascar Implementation #5

Closed bghughes closed 5 years ago

bghughes commented 5 years ago

Could you implement optimization for nascar? Or do you have any guidance for optimization in nascar? Perhaps add functionality to customize constraints to generate a lineup for any potential rule set. Thanks!

zamorarr commented 5 years ago

Hi @bghughes. I have added the nascar optimization for fanduel and draftkings. You'll need to re-install the package using devtools::install_github("dfs-withr-r/coach"). Then you can use the new model_dk_nascar() and model_fd_nascar() functions.

While this is not documented, it's not too hard to implement your own rulesets using the model_generic() function. If you look at the source code for the new nascar functions you'll see the new code is pretty minimal.

Things are little more complicated if you have position constraints, but you can look at the nba model for an example.

In any case, if you want any more implementations let me know or submit a pull-request. Thanks!

zamorarr commented 5 years ago

I'm going to close this since I didn't receive any feedback and to me it seems that everything is working.