James McCool
commited on
Commit
·
fbbb0e8
1
Parent(s):
6fbfae9
Adjust lineup target calculations in hedging_preset.py to divide by double the list size, improving accuracy in lineup generation. This change enhances the filtering process for both removed and locked lineups.
Browse files
global_func/hedging_preset.py
CHANGED
@@ -33,8 +33,8 @@ def hedging_preset(portfolio: pd.DataFrame, lineup_target: int, projections_file
|
|
33 |
locked_df = working_df[lock_mask]
|
34 |
print(locked_df.head(10))
|
35 |
|
36 |
-
removed_lineups = small_field_preset(removed_df, math.ceil(lineup_target / list_size), excluded_cols)
|
37 |
-
locked_lineups = large_field_preset(locked_df, math.ceil(lineup_target / list_size), excluded_cols)
|
38 |
|
39 |
concat_portfolio = pd.concat([concat_portfolio, removed_lineups, locked_lineups])
|
40 |
|
|
|
33 |
locked_df = working_df[lock_mask]
|
34 |
print(locked_df.head(10))
|
35 |
|
36 |
+
removed_lineups = small_field_preset(removed_df, math.ceil(lineup_target / (list_size * 2)), excluded_cols)
|
37 |
+
locked_lineups = large_field_preset(locked_df, math.ceil(lineup_target / (list_size * 2)), excluded_cols)
|
38 |
|
39 |
concat_portfolio = pd.concat([concat_portfolio, removed_lineups, locked_lineups])
|
40 |
|