coach icon indicating copy to clipboard operation
coach copied to clipboard

Max Exposure and # Linups

Open alittlefitness opened this issue 3 years ago • 0 comments

Hey, Been using this great package for the last week for NBA playing Draftkings and have come across an issue (for my use case at least).

I'm trying to limit the number of players that the optimizer can select from but when I limit them too much it won't run. I've found that to have max_exposure = 0.5 (actually after some testing the max_exposure constraint doesn't matter) and an L = 20, I need a pool of at least 80 players. Often I want to limit it more than that so I thought I could force it by adjusting the fpts_proj to negative for the players I don't want to pick and jack up their salary by $3000 but there's usually 2 or more selections that have negative fpts_proj. This is only an issue on days with short slates as if there's more than 80 players in the pool with positive fpts_proj, I can limit it well enough. I can manually remove the negative players and sub in positives to create 20 lineups, so creating lineups is possible but time consuming.

Do you know if this is just an issue with the solver in general, ie. there's nothing that can be done to fix it or if there's a setting that would allow this amount of limiting to the player pool?

I've attached an excel file with example data and the code I'm using for the model and optimization is below.

df_model <- model_dk_nba(df_data) optimize_generic(df_data, df_model, L = 20, max_exposure = 0.5)

Thanks again for making the package available. Test Data.xlsx

alittlefitness avatar Jan 03 '21 03:01 alittlefitness