numerai-tools 0.3.1__tar.gz → 0.4.0.dev0__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.1
2
2
  Name: numerai_tools
3
- Version: 0.3.1
3
+ Version: 0.4.0.dev0
4
4
  Summary: A collection of open-source tools to help interact with Numerai, model data, and automate submissions.
5
5
  Home-page: https://github.com/numerai/numerai-tools
6
6
  Maintainer: Numerai
@@ -570,9 +570,7 @@ def alpha(
570
570
  s_prime, neutralizers, sample_weights
571
571
  )
572
572
  )
573
- weights = weight_normalize(center(weights))
574
- np.testing.assert_allclose(weights.abs().sum(), 1)
575
- alpha_scores = weights.apply(lambda w: w @ targets)
573
+ alpha_scores = weights.apply(lambda w: w @ targets) / len(targets)
576
574
  return alpha_scores
577
575
 
578
576
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: numerai-tools
3
- Version: 0.3.1
3
+ Version: 0.4.0.dev0
4
4
  Summary: A collection of open-source tools to help interact with Numerai, model data, and automate submissions.
5
5
  Home-page: https://github.com/numerai/numerai-tools
6
6
  Maintainer: Numerai
@@ -1,5 +1,5 @@
1
- pandas>=1.3.1
2
- numpy<2.0.0,>=1.26.4
1
+ pandas>=2.2.2
2
+ numpy>=2.0.0
3
3
  scipy>=1.11.4
4
4
  scikit-learn>=1.3.0
5
5
  torch
@@ -1,7 +1,7 @@
1
1
  from setuptools import setup
2
2
  from setuptools import find_packages
3
3
 
4
- VERSION = "0.3.1"
4
+ VERSION = "0.4.0.dev0"
5
5
 
6
6
 
7
7
  def load(path):
@@ -38,8 +38,8 @@ if __name__ == "__main__":
38
38
  },
39
39
  packages=find_packages(exclude=["tests"]),
40
40
  install_requires=[
41
- "pandas>=1.3.1",
42
- "numpy>=1.26.4,<2.0.0",
41
+ "pandas>=2.2.2",
42
+ "numpy>=2.0.0",
43
43
  "scipy>=1.11.4",
44
44
  "scikit-learn>=1.3.0",
45
45
  "torch",
@@ -321,7 +321,7 @@ class TestScoring(unittest.TestCase):
321
321
  v = pd.Series([3, 2, 1, 2, 3]).T
322
322
  t = pd.Series([1, 2, 3, 2, 1]).T
323
323
  score = alpha(s, N, v, t)
324
- np.testing.assert_allclose(score, 0.0, atol=1e-15, rtol=1e-15)
324
+ np.testing.assert_allclose(score, 0.0, atol=1e-14, rtol=1e-14)
325
325
 
326
326
  def test_meta_portfolio_contribution(self):
327
327
  s = pd.DataFrame([[1, 2, 3, 4, 5], [1, 2, 1, 2, 1]]).T