Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -380,10 +380,10 @@ def get_correlated_portfolio_for_sim(Total_Sample_Size):
|
|
| 380 |
|
| 381 |
if site_var1 == 'Draftkings':
|
| 382 |
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] <= 50000].reset_index(drop=True)
|
| 383 |
-
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] >= 49500 - (FieldStrength * 1000)].reset_index(drop=True)
|
| 384 |
elif site_var1 == 'Fanduel':
|
| 385 |
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] <= 60000].reset_index(drop=True)
|
| 386 |
-
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] >= 59500 - (FieldStrength * 1000)].reset_index(drop=True)
|
| 387 |
|
| 388 |
RandomPortfolio = RandomPortfolioDF.sort_values(by=Sim_function, ascending=False)
|
| 389 |
|
|
@@ -495,10 +495,10 @@ def get_uncorrelated_portfolio_for_sim(Total_Sample_Size):
|
|
| 495 |
|
| 496 |
if site_var1 == 'Draftkings':
|
| 497 |
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] <= 50000].reset_index(drop=True)
|
| 498 |
-
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] >= 49500 - (FieldStrength * 1000)].reset_index(drop=True)
|
| 499 |
elif site_var1 == 'Fanduel':
|
| 500 |
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] <= 60000].reset_index(drop=True)
|
| 501 |
-
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] >= 59500 - (FieldStrength * 1000)].reset_index(drop=True)
|
| 502 |
|
| 503 |
RandomPortfolio = RandomPortfolioDF.sort_values(by=Sim_function, ascending=False)
|
| 504 |
|
|
|
|
| 380 |
|
| 381 |
if site_var1 == 'Draftkings':
|
| 382 |
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] <= 50000].reset_index(drop=True)
|
| 383 |
+
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] >= (49500 - (5000 * (1 - (len(Teams_used) / 32)))) - (FieldStrength * 1000)].reset_index(drop=True)
|
| 384 |
elif site_var1 == 'Fanduel':
|
| 385 |
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] <= 60000].reset_index(drop=True)
|
| 386 |
+
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] >= (59500 - (5000 * (1 - (len(Teams_used) / 32)))) - (FieldStrength * 1000)].reset_index(drop=True)
|
| 387 |
|
| 388 |
RandomPortfolio = RandomPortfolioDF.sort_values(by=Sim_function, ascending=False)
|
| 389 |
|
|
|
|
| 495 |
|
| 496 |
if site_var1 == 'Draftkings':
|
| 497 |
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] <= 50000].reset_index(drop=True)
|
| 498 |
+
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] >= (49500 - (5000 * (1 - (len(Teams_used) / 32)))) - (FieldStrength * 1000)].reset_index(drop=True)
|
| 499 |
elif site_var1 == 'Fanduel':
|
| 500 |
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] <= 60000].reset_index(drop=True)
|
| 501 |
+
RandomPortfolioDF = RandomPortfolioDF[RandomPortfolioDF['Salary'] >= (59500 - (5000 * (1 - (len(Teams_used) / 32)))) - (FieldStrength * 1000)].reset_index(drop=True)
|
| 502 |
|
| 503 |
RandomPortfolio = RandomPortfolioDF.sort_values(by=Sim_function, ascending=False)
|
| 504 |
|