numerai-tools 0.5.0.dev8__tar.gz → 0.5.0.dev10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: numerai-tools
3
- Version: 0.5.0.dev8
3
+ Version: 0.5.0.dev10
4
4
  Summary: A collection of open-source tools to help interact with Numerai, model data, and automate submissions.
5
5
  License: MIT
6
6
  Author: Numerai Engineering
@@ -128,7 +128,7 @@ def calculate_max_churn_and_turnover(
128
128
  curr_neutralizer,
129
129
  curr_weight,
130
130
  center_and_normalize=True,
131
- )
131
+ )[curr_sub_vector.name]
132
132
  for datestamp in prev_week_subs:
133
133
  prev_sub = prev_week_subs[datestamp]
134
134
  prev_neutralizer = prev_neutralizers[datestamp]
@@ -161,19 +161,24 @@ def calculate_max_churn_and_turnover(
161
161
  )
162
162
  .set_index(curr_ticker_col)
163
163
  .filter(like="neutralizer_")
164
+ .dropna()
165
+ )
166
+ prev_weight = (
167
+ remap_ids(
168
+ prev_weight.reset_index(),
169
+ universe,
170
+ str(prev_weight.index.name),
171
+ curr_ticker_col,
172
+ )
173
+ .set_index(curr_ticker_col)[prev_weight.name]
174
+ .dropna()
164
175
  )
165
- prev_weight = remap_ids(
166
- prev_weight.reset_index(),
167
- universe,
168
- str(prev_weight.index.name),
169
- curr_ticker_col,
170
- ).set_index(curr_ticker_col)[prev_weight.name]
171
176
  prev_neutralized_weights = generate_neutralized_weights(
172
177
  filtered_prev_sub.to_frame(),
173
178
  prev_neutralizer,
174
179
  prev_weight,
175
180
  center_and_normalize=True,
176
- )
181
+ )[filtered_prev_sub.name]
177
182
  try:
178
183
  churn_val = abs(churn(curr_sub_vector, filtered_prev_sub))
179
184
  except AssertionError as e:
@@ -93,7 +93,7 @@ def validate_headers_signals(
93
93
  SIGNALS_ALLOWED_ID_COLS,
94
94
  SIGNALS_ALLOWED_PRED_COLS,
95
95
  )
96
- if date_col is not None:
96
+ if assert_date_col:
97
97
  submission[date_col_name] = date_col
98
98
  return ticker_col, signal_col, date_col_name
99
99
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "numerai-tools"
3
- version = "0.5.0.dev8"
3
+ version = "0.5.0.dev10"
4
4
  description = "A collection of open-source tools to help interact with Numerai, model data, and automate submissions."
5
5
  authors = [
6
6
  {name = "Numerai Engineering",email = "engineering@numer.ai"}