py-alpha-lib 0.2.2__tar.gz → 0.2.3__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.
Files changed (77) hide show
  1. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/CHANGELOG.md +6 -0
  2. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/Cargo.lock +1 -1
  3. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/Cargo.toml +1 -1
  4. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/PKG-INFO +1 -1
  5. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/context.py +43 -0
  6. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/.agent/skills/add_algo/SKILL.md +0 -0
  7. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/.github/workflows/CI.yml +0 -0
  8. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/.gitignore +0 -0
  9. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/.nwa-config.yaml +0 -0
  10. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/LICENSE +0 -0
  11. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/README.md +0 -0
  12. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/articles/001.md +0 -0
  13. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/articles/COMPARISON.md +0 -0
  14. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/benchmarks/benchmark_alpha101.py +0 -0
  15. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/benchmarks/benchmark_pandas.py +0 -0
  16. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/benchmarks/benchmark_polars_ta.py +0 -0
  17. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/build.rs +0 -0
  18. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/gtja191/al/__init__.py +0 -0
  19. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/gtja191/al/alpha191.py +0 -0
  20. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/gtja191/al/alpha191_context.py +0 -0
  21. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/gtja191/alpha191.txt +0 -0
  22. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/gtja191/main.py +0 -0
  23. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/al/__init__.py +0 -0
  24. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/al/alpha101.py +0 -0
  25. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/al/alpha101_context.py +0 -0
  26. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/alpha101.txt +0 -0
  27. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/main.py +0 -0
  28. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/pd_/__init__.py +0 -0
  29. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/pd_/alpha101_adjusted.py +0 -0
  30. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/pl_/__init__.py +0 -0
  31. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/pl_/alpha101_adjusted.py +0 -0
  32. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/examples/wq101/result.md +0 -0
  33. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/pyproject.toml +0 -0
  34. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/__init__.py +0 -0
  35. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/algo/__init__.py +0 -0
  36. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/algo/algo.py +0 -0
  37. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/algo/algo_gen.py +0 -0
  38. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/algo.md +0 -0
  39. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/lang/__init__.py +0 -0
  40. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/lang/__main__.py +0 -0
  41. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/lang/alpha.lark +0 -0
  42. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/lang/parser.py +0 -0
  43. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/alpha/lang/to_python.py +0 -0
  44. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/conftest.py +0 -0
  45. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/tests/test_grammar.py +0 -0
  46. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/tests/test_rank.py +0 -0
  47. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/tests/test_talib.py +0 -0
  48. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/python/tests/test_to_python.py +0 -0
  49. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/rustfmt.toml +0 -0
  50. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/backfill.rs +0 -0
  51. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/context.rs +0 -0
  52. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/cross.rs +0 -0
  53. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/ema.rs +0 -0
  54. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/entropy.rs +0 -0
  55. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/error.rs +0 -0
  56. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/extremum.rs +0 -0
  57. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/group.rs +0 -0
  58. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/ma.rs +0 -0
  59. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/misc.rs +0 -0
  60. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/mod.rs +0 -0
  61. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/moments.rs +0 -0
  62. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/neutralize.rs +0 -0
  63. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/quantile.rs +0 -0
  64. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/rank.rs +0 -0
  65. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/returns.rs +0 -0
  66. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/scan.rs +0 -0
  67. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/series.rs +0 -0
  68. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/skip_nan_window.rs +0 -0
  69. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/slope.rs +0 -0
  70. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/stats.rs +0 -0
  71. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/stddev.rs +0 -0
  72. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/sum.rs +0 -0
  73. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/algo/zscore.rs +0 -0
  74. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/src/lib.rs +0 -0
  75. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/tests/rank.py +0 -0
  76. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/tests/usage.py +0 -0
  77. {py_alpha_lib-0.2.2 → py_alpha_lib-0.2.3}/tests/verify_sumif.py +0 -0
@@ -1,5 +1,11 @@
1
1
  # ChangeLog
2
2
 
3
+ ## [0.2.3] - 2026-04-13
4
+
5
+ ### Added
6
+
7
+ - ExecContext: TS_QUANTILE, SLOPE, INTERCEPT, DMA, SUMBARS, BARSLAST, BARSSINCE, BINS, FRET, RCROSS, RLONGCROSS
8
+
3
9
  ## [0.2.2] - 2026-04-11
4
10
 
5
11
  ### Added
@@ -4,7 +4,7 @@ version = 4
4
4
 
5
5
  [[package]]
6
6
  name = "alpha"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  dependencies = [
9
9
  "anyhow",
10
10
  "log",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "alpha"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  edition = "2024"
5
5
  authors = ["ElseJJ"]
6
6
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-alpha-lib
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -249,6 +249,9 @@ class ExecContext:
249
249
  else:
250
250
  return alpha.SMA(a, int(args[0]), int(args[1]))
251
251
 
252
+ def DMA(self, a: np.ndarray, weight: float) -> np.ndarray:
253
+ return alpha.DMA(a, float(weight))
254
+
252
255
  # ── TS: Std Dev / Variance ─────────────────────────────────────────
253
256
  # BRAIN: ts_std_dev GTJA: STD wq101: STDDEV
254
257
 
@@ -315,6 +318,11 @@ class ExecContext:
315
318
 
316
319
  TSRANK = TS_RANK # gtja191
317
320
 
321
+ # ── TS: Quantile ────────────────────────────────────────────────────
322
+
323
+ def TS_QUANTILE(self, a: np.ndarray, w: int, q: float) -> np.ndarray:
324
+ return alpha.QUANTILE(a, int(w), q)
325
+
318
326
  # ── TS: Delay / Delta ──────────────────────────────────────────────
319
327
  # BRAIN: ts_delay, ts_delta
320
328
  # wq101: DELAY, DELTA
@@ -364,6 +372,14 @@ class ExecContext:
364
372
 
365
373
  REGRESI = TS_REGRESI # gtja191
366
374
 
375
+ # ── TS: Slope / Intercept ───────────────────────────────────────
376
+
377
+ def SLOPE(self, a: np.ndarray, w: int) -> np.ndarray:
378
+ return alpha.SLOPE(a, int(w))
379
+
380
+ def INTERCEPT(self, a: np.ndarray, w: int) -> np.ndarray:
381
+ return alpha.INTERCEPT(a, int(w))
382
+
367
383
  # ── TS: Counting / Conditional ─────────────────────────────────────
368
384
  # GTJA: COUNT, SUMIF
369
385
 
@@ -379,6 +395,17 @@ class ExecContext:
379
395
 
380
396
  SUMIF = TS_SUMIF # gtja191
381
397
 
398
+ def SUMBARS(self, a: np.ndarray, amount: float) -> np.ndarray:
399
+ return alpha.SUMBARS(a, amount)
400
+
401
+ # ── TS: Bar Counting ──────────────────────────────────────────
402
+
403
+ def BARSLAST(self, cond: np.ndarray) -> np.ndarray:
404
+ return alpha.BARSLAST(np.asarray(cond, dtype=bool))
405
+
406
+ def BARSSINCE(self, cond: np.ndarray) -> np.ndarray:
407
+ return alpha.BARSSINCE(np.asarray(cond, dtype=bool))
408
+
382
409
  # ── TS: Conditional Scan (SELF recursion) ───────────────────────────
383
410
  # GTJA: SELF-referencing patterns
384
411
 
@@ -440,6 +467,16 @@ class ExecContext:
440
467
  def TS_MOMENT(self, a: np.ndarray, w: int, k: int = 2) -> np.ndarray:
441
468
  return alpha.MOMENT(a, int(w), int(k))
442
469
 
470
+ # ── TS: Binning ────────────────────────────────────────────────
471
+
472
+ def BINS(self, a: np.ndarray, n: int) -> np.ndarray:
473
+ return alpha.BINS(a, int(n))
474
+
475
+ # ── TS: Future Return ──────────────────────────────────────────
476
+
477
+ def FRET(self, open: np.ndarray, close: np.ndarray, is_calc: np.ndarray, delay: int, periods: int) -> np.ndarray:
478
+ return alpha.FRET(open, close, is_calc, int(delay), int(periods))
479
+
443
480
  # ── TS: Cross Detection ────────────────────────────────────────────
444
481
  # AmiBroker/GTJA: CROSS, LONGCROSS
445
482
 
@@ -449,6 +486,12 @@ class ExecContext:
449
486
  def LONGCROSS(self, a: np.ndarray, b: np.ndarray, n: int) -> np.ndarray:
450
487
  return alpha.LONGCROSS(a, b, int(n))
451
488
 
489
+ def RCROSS(self, a: np.ndarray, b: np.ndarray) -> np.ndarray:
490
+ return alpha.RCROSS(a, b)
491
+
492
+ def RLONGCROSS(self, a: np.ndarray, b: np.ndarray, n: int) -> np.ndarray:
493
+ return alpha.RLONGCROSS(a, b, int(n))
494
+
452
495
  # ====================================================================
453
496
  # Cross-Sectional Operators (no prefix)
454
497
  #
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes