wickra 0.4.5 → 0.4.7

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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="https://wickra.org"><img src="https://raw.githubusercontent.com/wickra-lib/.github/main/profile/wickra-banner.webp?v=295" alt="Wickra — streaming-first technical indicators" width="100%"></a>
2
+ <a href="https://wickra.org"><img src="https://raw.githubusercontent.com/wickra-lib/.github/main/profile/wickra-banner.webp?v=325" alt="Wickra — streaming-first technical indicators" width="100%"></a>
3
3
  </p>
4
4
 
5
5
  [![CI](https://github.com/wickra-lib/wickra/actions/workflows/ci.yml/badge.svg)](https://github.com/wickra-lib/wickra/actions/workflows/ci.yml)
@@ -47,7 +47,7 @@ Full documentation lives at **[docs.wickra.org](https://docs.wickra.org)**:
47
47
  [Node](https://docs.wickra.org/Quickstart-Node),
48
48
  [WASM](https://docs.wickra.org/Quickstart-WASM).
49
49
  - **Indicators** — a per-indicator deep dive (formula, parameters, warmup) for
50
- every one of the 295 indicators; start at the
50
+ every one of the 325 indicators; start at the
51
51
  [indicators overview](https://docs.wickra.org/Indicators-Overview).
52
52
  - **Reference** — [warmup periods](https://docs.wickra.org/Warmup-Periods),
53
53
  [streaming vs batch](https://docs.wickra.org/Streaming-vs-Batch),
@@ -135,7 +135,7 @@ python -m benchmarks.compare_libraries
135
135
 
136
136
  ## Indicators
137
137
 
138
- 295 streaming-first indicators across nineteen families. Every one passes the
138
+ 325 streaming-first indicators across twenty families. Every one passes the
139
139
  `batch == streaming` equivalence test, reference-value tests, and reset
140
140
  semantics tests. Each has a per-indicator deep dive (formula, parameters,
141
141
  warmup) at [docs.wickra.org](https://docs.wickra.org/Indicators-Overview).
@@ -143,15 +143,15 @@ warmup) at [docs.wickra.org](https://docs.wickra.org/Indicators-Overview).
143
143
  | Family | Indicators |
144
144
  |--------|-----------|
145
145
  | Moving Averages | SMA, EMA, WMA, DEMA, TEMA, HMA, KAMA, SMMA, TRIMA, ZLEMA, T3, VWMA, ALMA, McGinley Dynamic, FRAMA, VIDYA, JMA, Alligator, EVWMA |
146
- | Momentum Oscillators | RSI (Wilder), Anchored RSI, Stochastic, CCI, ROC, Williams %R, MFI, Awesome Oscillator, MOM, CMO, TSI, PMO, StochRSI, Ultimate Oscillator, RVI, PGO, KST, SMI, Laguerre RSI, Connors RSI, Inertia |
147
- | Trend & Directional | MACD, ADX (+DI/-DI), ADXR, Aroon, TRIX, Aroon Oscillator, Vortex, Random Walk Index, Trend Intensity Index, Wave Trend Oscillator, Mass Index, Choppiness Index, Vertical Horizontal Filter |
146
+ | Momentum Oscillators | RSI (Wilder), Anchored RSI, Stochastic, CCI, ROC, Williams %R, MFI, Awesome Oscillator, MOM, CMO, TSI, PMO, StochRSI, Ultimate Oscillator, RVI, PGO, KST, SMI, Laguerre RSI, Connors RSI, Inertia, ROC Percentage (ROCP), ROC Ratio (ROCR), ROC Ratio 100 (ROCR100) |
147
+ | Trend & Directional | MACD, MACD Fixed (MACDFIX), MACD Extended (MACDEXT), ADX (+DI/-DI), ADXR, Aroon, TRIX, Aroon Oscillator, Vortex, Random Walk Index, Trend Intensity Index, Wave Trend Oscillator, Mass Index, Choppiness Index, Vertical Horizontal Filter, Plus DM, Minus DM, Plus DI, Minus DI, DX |
148
148
  | Price Oscillators | PPO, DPO, Coppock, Accelerator Oscillator, Balance of Power, APO, AO Histogram, CFO, Zero-Lag MACD, Elder Impulse, STC |
149
149
  | Volatility & Bands | ATR, Bollinger Bands, Keltner Channels, Donchian Channels, NATR, StdDev, Ulcer Index, Historical Volatility, Bollinger Bandwidth, %B, True Range, Chaikin Volatility, RVI (Relative Volatility Index), Parkinson Volatility, Garman-Klass Volatility, Rogers-Satchell Volatility, Yang-Zhang Volatility |
150
150
  | Bands & Channels | MA Envelope, Acceleration Bands, STARC Bands, ATR Bands, Hurst Channel, LinReg Channel, Standard Error Bands, Double Bollinger Bands, TTM Squeeze, Fractal Chaos Bands, VWAP StdDev Bands |
151
- | Trailing Stops | Parabolic SAR, SuperTrend, Chandelier Exit, Chande Kroll Stop, ATR Trailing Stop, HiLo Activator, Volty Stop, Yo-Yo Exit, Donchian Channel Stop, Percentage Trailing Stop, Step Trailing Stop, Renko Trailing Stop |
151
+ | Trailing Stops | Parabolic SAR, Parabolic SAR Extended (SAREXT), SuperTrend, Chandelier Exit, Chande Kroll Stop, ATR Trailing Stop, HiLo Activator, Volty Stop, Yo-Yo Exit, Donchian Channel Stop, Percentage Trailing Stop, Step Trailing Stop, Renko Trailing Stop |
152
152
  | Volume | OBV, VWAP (cumulative + rolling), ADL, Volume-Price Trend, Chaikin Money Flow, Chaikin Oscillator, Force Index, Ease of Movement, Klinger Volume Oscillator, Volume Oscillator, NVI, PVI, Williams A/D, Anchored VWAP, Demand Index, TSV, VZO, Market Facilitation Index |
153
- | Price Statistics | Typical Price, Median Price, Weighted Close, Linear Regression, Linear Regression Slope, Z-Score, Linear Regression Angle, Variance, Coefficient of Variation, Skewness, Kurtosis, Standard Error, Detrended StdDev, R², Median Absolute Deviation, Autocorrelation, Hurst Exponent, Pearson Correlation, Beta, Pairwise Beta, Pair Spread Z-Score, Lead-Lag Cross-Correlation, Cointegration, Relative Strength A-vs-B, Spearman Correlation |
154
- | Ehlers / Cycle (DSP) | MAMA, FAMA, Fisher Transform, Inverse Fisher Transform, SuperSmoother, Hilbert Dominant Cycle, Sine Wave, Decycler, Decycler Oscillator, Roofing Filter, Center of Gravity, Cybernetic Cycle, Adaptive Cycle, Empirical Mode Decomposition, Ehlers Stochastic, Instantaneous Trendline |
153
+ | Price Statistics | Typical Price, Median Price, Weighted Close, Linear Regression, Linear Regression Slope, Z-Score, Linear Regression Angle, Variance, Coefficient of Variation, Skewness, Kurtosis, Standard Error, Detrended StdDev, R², Median Absolute Deviation, Autocorrelation, Hurst Exponent, Pearson Correlation, Beta, Pairwise Beta, Pair Spread Z-Score, Lead-Lag Cross-Correlation, Cointegration, Relative Strength A-vs-B, Spearman Correlation, Mid Price, Mid Point, Average Price, Linear Regression Intercept, Time Series Forecast, Rolling Correlation, Rolling Covariance, OU Half-Life, Spread Hurst, Distance SSD, Beta-Neutral Spread, Variance Ratio, Granger Causality, Kalman Hedge Ratio, Spread Bollinger Bands |
154
+ | Ehlers / Cycle (DSP) | MAMA, FAMA, Fisher Transform, Inverse Fisher Transform, SuperSmoother, Hilbert Dominant Cycle, Hilbert Phasor, Hilbert DC Phase, Hilbert Trend Mode, Sine Wave, Decycler, Decycler Oscillator, Roofing Filter, Center of Gravity, Cybernetic Cycle, Adaptive Cycle, Empirical Mode Decomposition, Ehlers Stochastic, Instantaneous Trendline |
155
155
  | Pivots & S/R | Classic Pivots, Fibonacci Pivots, Camarilla, Woodie Pivots, DeMark Pivots, Williams Fractals, ZigZag |
156
156
  | DeMark | TD Setup, TD Sequential, TD DeMarker, TD REI, TD Pressure, TD Combo, TD Countdown, TD Lines, TD Range Projection, TD Differential, TD Open, TD Risk Level |
157
157
  | Ichimoku & Charts | Ichimoku Kinko Hyo (Tenkan, Kijun, Senkou A/B, Chikou), Heikin-Ashi |
@@ -160,6 +160,7 @@ warmup) at [docs.wickra.org](https://docs.wickra.org/Indicators-Overview).
160
160
  | Microstructure | Order-Book Imbalance (Top-1 / Top-N / Full), Microprice, Quoted Spread, Depth Slope, Signed Volume, Cumulative Volume Delta, Trade Imbalance, Effective Spread, Realized Spread, Kyle's Lambda, Footprint |
161
161
  | Derivatives | Funding Rate, Funding Rate Mean, Funding Rate Z-Score, Funding Basis, Open-Interest Delta, OI / Price Divergence, OI-Weighted Price, Long/Short Ratio, Taker Buy/Sell Ratio, Liquidation Features, Term-Structure Basis, Calendar Spread |
162
162
  | Market Profile | Value Area (POC / VAH / VAL), Volume Profile (histogram), TPO Profile, Initial Balance, Opening Range |
163
+ | Market Breadth | Advance/Decline Line |
163
164
  | Risk / Performance | Sharpe Ratio, Sortino Ratio, Calmar Ratio, Omega Ratio, Max Drawdown, Average Drawdown, Drawdown Duration, Pain Index, Value at Risk, Conditional Value at Risk (CVaR), Profit Factor, Gain/Loss Ratio, Recovery Factor, Kelly Criterion, Treynor Ratio, Information Ratio, Alpha (Jensen) |
164
165
 
165
166
  Every candlestick pattern emits a signed per-bar value — `+1.0` bullish,
@@ -239,7 +240,7 @@ A Python live-trading example using the public `websockets` package lives at
239
240
  ```
240
241
  wickra/
241
242
  ├── crates/
242
- │ ├── wickra-core/ core engine + all 295 indicators
243
+ │ ├── wickra-core/ core engine + all 325 indicators
243
244
  │ ├── wickra/ top-level facade crate (publishes on crates.io) + benches/
244
245
  │ └── wickra-data/ CSV reader, tick aggregator, live exchange feeds
245
246
  ├── bindings/
package/index.d.ts CHANGED
@@ -33,6 +33,26 @@ export interface RelativeStrengthValue {
33
33
  /** RSI of the ratio. */
34
34
  ratioRsi: number
35
35
  }
36
+ /** Kalman hedge-ratio result: dynamic hedge ratio, intercept, and spread. */
37
+ export interface KalmanHedgeRatioValue {
38
+ /** Current hedge ratio (filtered slope of `a` on `b`). */
39
+ hedgeRatio: number
40
+ /** Current intercept (filtered level offset). */
41
+ intercept: number
42
+ /** Forecast error `a - (intercept + hedgeRatio*b)` — the spread signal. */
43
+ spread: number
44
+ }
45
+ /** Spread Bollinger-bands result: middle, upper and lower bands plus `%b`. */
46
+ export interface SpreadBollingerBandsValue {
47
+ /** Middle band: the rolling mean of the spread. */
48
+ middle: number
49
+ /** Upper band. */
50
+ upper: number
51
+ /** Lower band. */
52
+ lower: number
53
+ /** `%b`: where the spread sits across the band (`0` lower, `1` upper). */
54
+ percentB: number
55
+ }
36
56
  /** MACD triple: macd line, signal line, histogram. */
37
57
  export interface MacdValue {
38
58
  macd: number
@@ -45,6 +65,10 @@ export interface BollingerValue {
45
65
  lower: number
46
66
  stddev: number
47
67
  }
68
+ export interface HtPhasorValue {
69
+ inphase: number
70
+ quadrature: number
71
+ }
48
72
  export interface StochValue {
49
73
  k: number
50
74
  d: number
@@ -658,6 +682,60 @@ export declare class MedianAbsoluteDeviation {
658
682
  isReady(): boolean
659
683
  warmupPeriod(): number
660
684
  }
685
+ export type MidPointNode = MIDPOINT
686
+ export declare class MIDPOINT {
687
+ constructor(period: number)
688
+ update(value: number): number | null
689
+ batch(prices: Array<number>): Array<number>
690
+ reset(): void
691
+ isReady(): boolean
692
+ warmupPeriod(): number
693
+ }
694
+ export type RocpNode = ROCP
695
+ export declare class ROCP {
696
+ constructor(period: number)
697
+ update(value: number): number | null
698
+ batch(prices: Array<number>): Array<number>
699
+ reset(): void
700
+ isReady(): boolean
701
+ warmupPeriod(): number
702
+ }
703
+ export type RocrNode = ROCR
704
+ export declare class ROCR {
705
+ constructor(period: number)
706
+ update(value: number): number | null
707
+ batch(prices: Array<number>): Array<number>
708
+ reset(): void
709
+ isReady(): boolean
710
+ warmupPeriod(): number
711
+ }
712
+ export type Rocr100Node = ROCR100
713
+ export declare class ROCR100 {
714
+ constructor(period: number)
715
+ update(value: number): number | null
716
+ batch(prices: Array<number>): Array<number>
717
+ reset(): void
718
+ isReady(): boolean
719
+ warmupPeriod(): number
720
+ }
721
+ export type LinRegInterceptNode = LINEARREG_INTERCEPT
722
+ export declare class LINEARREG_INTERCEPT {
723
+ constructor(period: number)
724
+ update(value: number): number | null
725
+ batch(prices: Array<number>): Array<number>
726
+ reset(): void
727
+ isReady(): boolean
728
+ warmupPeriod(): number
729
+ }
730
+ export type TsfNode = TSF
731
+ export declare class TSF {
732
+ constructor(period: number)
733
+ update(value: number): number | null
734
+ batch(prices: Array<number>): Array<number>
735
+ reset(): void
736
+ isReady(): boolean
737
+ warmupPeriod(): number
738
+ }
661
739
  export type AutocorrelationNode = Autocorrelation
662
740
  export declare class Autocorrelation {
663
741
  constructor(period: number, lag: number)
@@ -728,6 +806,84 @@ export declare class SpearmanCorrelation {
728
806
  isReady(): boolean
729
807
  warmupPeriod(): number
730
808
  }
809
+ export type RollingCorrelationNode = RollingCorrelation
810
+ export declare class RollingCorrelation {
811
+ constructor(period: number)
812
+ update(x: number, y: number): number | null
813
+ /**
814
+ * Batch over two equally-sized arrays. Returns a length-`n` array
815
+ * with `NaN` for warmup positions.
816
+ */
817
+ batch(x: Array<number>, y: Array<number>): Array<number>
818
+ reset(): void
819
+ isReady(): boolean
820
+ warmupPeriod(): number
821
+ }
822
+ export type RollingCovarianceNode = RollingCovariance
823
+ export declare class RollingCovariance {
824
+ constructor(period: number)
825
+ update(x: number, y: number): number | null
826
+ /**
827
+ * Batch over two equally-sized arrays. Returns a length-`n` array
828
+ * with `NaN` for warmup positions.
829
+ */
830
+ batch(x: Array<number>, y: Array<number>): Array<number>
831
+ reset(): void
832
+ isReady(): boolean
833
+ warmupPeriod(): number
834
+ }
835
+ export type OuHalfLifeNode = OuHalfLife
836
+ export declare class OuHalfLife {
837
+ constructor(period: number)
838
+ update(x: number, y: number): number | null
839
+ /**
840
+ * Batch over two equally-sized arrays. Returns a length-`n` array
841
+ * with `NaN` for warmup positions.
842
+ */
843
+ batch(x: Array<number>, y: Array<number>): Array<number>
844
+ reset(): void
845
+ isReady(): boolean
846
+ warmupPeriod(): number
847
+ }
848
+ export type SpreadHurstNode = SpreadHurst
849
+ export declare class SpreadHurst {
850
+ constructor(period: number)
851
+ update(x: number, y: number): number | null
852
+ /**
853
+ * Batch over two equally-sized arrays. Returns a length-`n` array
854
+ * with `NaN` for warmup positions.
855
+ */
856
+ batch(x: Array<number>, y: Array<number>): Array<number>
857
+ reset(): void
858
+ isReady(): boolean
859
+ warmupPeriod(): number
860
+ }
861
+ export type DistanceSsdNode = DistanceSsd
862
+ export declare class DistanceSsd {
863
+ constructor(period: number)
864
+ update(x: number, y: number): number | null
865
+ /**
866
+ * Batch over two equally-sized arrays. Returns a length-`n` array
867
+ * with `NaN` for warmup positions.
868
+ */
869
+ batch(x: Array<number>, y: Array<number>): Array<number>
870
+ reset(): void
871
+ isReady(): boolean
872
+ warmupPeriod(): number
873
+ }
874
+ export type BetaNeutralSpreadNode = BetaNeutralSpread
875
+ export declare class BetaNeutralSpread {
876
+ constructor(period: number)
877
+ update(x: number, y: number): number | null
878
+ /**
879
+ * Batch over two equally-sized arrays. Returns a length-`n` array
880
+ * with `NaN` for warmup positions.
881
+ */
882
+ batch(x: Array<number>, y: Array<number>): Array<number>
883
+ reset(): void
884
+ isReady(): boolean
885
+ warmupPeriod(): number
886
+ }
731
887
  export type PairSpreadZScoreNode = PairSpreadZScore
732
888
  /**
733
889
  * Pair spread z-score: two ctor params (`betaPeriod`, `zPeriod`), one `(a, b)`
@@ -787,6 +943,68 @@ export declare class RelativeStrengthAB {
787
943
  isReady(): boolean
788
944
  warmupPeriod(): number
789
945
  }
946
+ export type VarianceRatioNode = VarianceRatio
947
+ /**
948
+ * Lo–MacKinlay variance ratio: two ctor params (`period`, `q`), one `(a, b)`
949
+ * pair per update, a single ratio out.
950
+ */
951
+ export declare class VarianceRatio {
952
+ constructor(period: number, q: number)
953
+ update(a: number, b: number): number | null
954
+ /**
955
+ * Batch over two equally-sized arrays. Returns a length-`n` array with
956
+ * `NaN` for warmup positions.
957
+ */
958
+ batch(a: Array<number>, b: Array<number>): Array<number>
959
+ reset(): void
960
+ isReady(): boolean
961
+ warmupPeriod(): number
962
+ }
963
+ export type GrangerCausalityNode = GrangerCausality
964
+ /**
965
+ * Granger causality F-statistic: two ctor params (`period`, `lag`), one
966
+ * `(a, b)` pair per update, a single F-statistic out.
967
+ */
968
+ export declare class GrangerCausality {
969
+ constructor(period: number, lag: number)
970
+ update(a: number, b: number): number | null
971
+ /**
972
+ * Batch over two equally-sized arrays. Returns a length-`n` array with
973
+ * `NaN` for warmup positions.
974
+ */
975
+ batch(a: Array<number>, b: Array<number>): Array<number>
976
+ reset(): void
977
+ isReady(): boolean
978
+ warmupPeriod(): number
979
+ }
980
+ export type KalmanHedgeRatioNode = KalmanHedgeRatio
981
+ export declare class KalmanHedgeRatio {
982
+ constructor(delta: number, observationVar: number)
983
+ update(a: number, b: number): KalmanHedgeRatioValue | null
984
+ /**
985
+ * Batch over two equally-sized arrays. Returns a flat array of length
986
+ * `3 * n`, interleaved per row as `[hedgeRatio0, intercept0, spread0, ...]`.
987
+ * Read column `j` of row `i` as `result[i * 3 + j]`. Warmup rows are `NaN`.
988
+ */
989
+ batch(a: Array<number>, b: Array<number>): Array<number>
990
+ reset(): void
991
+ isReady(): boolean
992
+ warmupPeriod(): number
993
+ }
994
+ export type SpreadBollingerBandsNode = SpreadBollingerBands
995
+ export declare class SpreadBollingerBands {
996
+ constructor(period: number, numStd: number)
997
+ update(a: number, b: number): SpreadBollingerBandsValue | null
998
+ /**
999
+ * Batch over two equally-sized arrays. Returns a flat array of length
1000
+ * `4 * n`, interleaved per row as `[middle0, upper0, lower0, percentB0, ...]`.
1001
+ * Read column `j` of row `i` as `result[i * 4 + j]`. Warmup rows are `NaN`.
1002
+ */
1003
+ batch(a: Array<number>, b: Array<number>): Array<number>
1004
+ reset(): void
1005
+ isReady(): boolean
1006
+ warmupPeriod(): number
1007
+ }
790
1008
  export type MacdNode = MACD
791
1009
  export declare class MACD {
792
1010
  constructor(fast: number, slow: number, signal: number)
@@ -801,6 +1019,36 @@ export declare class MACD {
801
1019
  isReady(): boolean
802
1020
  warmupPeriod(): number
803
1021
  }
1022
+ export type MacdFixNode = MACDFIX
1023
+ export declare class MACDFIX {
1024
+ constructor(signal: number)
1025
+ update(value: number): MacdValue | null
1026
+ /**
1027
+ * Batch over a price array. Returns a flat array of length `3 * n`,
1028
+ * interleaved per row as `[macd0, signal0, histogram0, macd1, ...]`.
1029
+ */
1030
+ batch(prices: Array<number>): Array<number>
1031
+ reset(): void
1032
+ isReady(): boolean
1033
+ warmupPeriod(): number
1034
+ }
1035
+ export type MacdExtNode = MACDEXT
1036
+ export declare class MACDEXT {
1037
+ /**
1038
+ * Moving-average types are TA-Lib `MA_Type` codes `0..=5`
1039
+ * (SMA, EMA, WMA, DEMA, TEMA, TRIMA).
1040
+ */
1041
+ constructor(fast: number, fastMatype: number, slow: number, slowMatype: number, signal: number, signalMatype: number)
1042
+ update(value: number): MacdValue | null
1043
+ /**
1044
+ * Batch over a price array. Returns a flat array of length `3 * n`,
1045
+ * interleaved per row as `[macd0, signal0, histogram0, macd1, ...]`.
1046
+ */
1047
+ batch(prices: Array<number>): Array<number>
1048
+ reset(): void
1049
+ isReady(): boolean
1050
+ warmupPeriod(): number
1051
+ }
804
1052
  export type BollingerNode = BollingerBands
805
1053
  export declare class BollingerBands {
806
1054
  constructor(period: number, multiplier: number)
@@ -824,6 +1072,91 @@ export declare class ATR {
824
1072
  isReady(): boolean
825
1073
  warmupPeriod(): number
826
1074
  }
1075
+ export type PlusDmNode = PLUS_DM
1076
+ export declare class PLUS_DM {
1077
+ constructor(period: number)
1078
+ update(high: number, low: number, close: number): number | null
1079
+ batch(high: Array<number>, low: Array<number>, close: Array<number>): Array<number>
1080
+ reset(): void
1081
+ isReady(): boolean
1082
+ warmupPeriod(): number
1083
+ }
1084
+ export type MinusDmNode = MINUS_DM
1085
+ export declare class MINUS_DM {
1086
+ constructor(period: number)
1087
+ update(high: number, low: number, close: number): number | null
1088
+ batch(high: Array<number>, low: Array<number>, close: Array<number>): Array<number>
1089
+ reset(): void
1090
+ isReady(): boolean
1091
+ warmupPeriod(): number
1092
+ }
1093
+ export type PlusDiNode = PLUS_DI
1094
+ export declare class PLUS_DI {
1095
+ constructor(period: number)
1096
+ update(high: number, low: number, close: number): number | null
1097
+ batch(high: Array<number>, low: Array<number>, close: Array<number>): Array<number>
1098
+ reset(): void
1099
+ isReady(): boolean
1100
+ warmupPeriod(): number
1101
+ }
1102
+ export type MinusDiNode = MINUS_DI
1103
+ export declare class MINUS_DI {
1104
+ constructor(period: number)
1105
+ update(high: number, low: number, close: number): number | null
1106
+ batch(high: Array<number>, low: Array<number>, close: Array<number>): Array<number>
1107
+ reset(): void
1108
+ isReady(): boolean
1109
+ warmupPeriod(): number
1110
+ }
1111
+ export type DxNode = DX
1112
+ export declare class DX {
1113
+ constructor(period: number)
1114
+ update(high: number, low: number, close: number): number | null
1115
+ batch(high: Array<number>, low: Array<number>, close: Array<number>): Array<number>
1116
+ reset(): void
1117
+ isReady(): boolean
1118
+ warmupPeriod(): number
1119
+ }
1120
+ export type MidPriceNode = MIDPRICE
1121
+ export declare class MIDPRICE {
1122
+ constructor(period: number)
1123
+ update(high: number, low: number, close: number): number | null
1124
+ batch(high: Array<number>, low: Array<number>, close: Array<number>): Array<number>
1125
+ reset(): void
1126
+ isReady(): boolean
1127
+ warmupPeriod(): number
1128
+ }
1129
+ export type AvgPriceNode = AVGPRICE
1130
+ export declare class AVGPRICE {
1131
+ constructor()
1132
+ update(open: number, high: number, low: number, close: number): number | null
1133
+ batch(open: Array<number>, high: Array<number>, low: Array<number>, close: Array<number>): Array<number>
1134
+ reset(): void
1135
+ isReady(): boolean
1136
+ warmupPeriod(): number
1137
+ }
1138
+ export type SarExtNode = SAREXT
1139
+ export declare class SAREXT {
1140
+ constructor(startValue: number, offsetOnReverse: number, accelInitLong: number, accelLong: number, accelMaxLong: number, accelInitShort: number, accelShort: number, accelMaxShort: number)
1141
+ update(high: number, low: number, close: number): number | null
1142
+ batch(high: Array<number>, low: Array<number>, close: Array<number>): Array<number>
1143
+ reset(): void
1144
+ isReady(): boolean
1145
+ warmupPeriod(): number
1146
+ }
1147
+ export type HtPhasorNode = HT_PHASOR
1148
+ export declare class HT_PHASOR {
1149
+ constructor()
1150
+ update(value: number): HtPhasorValue | null
1151
+ /**
1152
+ * Batch over a price array. Returns a flat array of length `2 * n`,
1153
+ * interleaved per row as `[inphase0, quadrature0, inphase1, ...]`.
1154
+ */
1155
+ batch(prices: Array<number>): Array<number>
1156
+ reset(): void
1157
+ isReady(): boolean
1158
+ warmupPeriod(): number
1159
+ }
827
1160
  export type StochNode = Stochastic
828
1161
  export declare class Stochastic {
829
1162
  constructor(kPeriod: number, dPeriod: number)
@@ -2010,6 +2343,24 @@ export declare class EmpiricalModeDecomposition {
2010
2343
  isReady(): boolean
2011
2344
  warmupPeriod(): number
2012
2345
  }
2346
+ export type HtDcPhaseNode = HT_DCPHASE
2347
+ export declare class HT_DCPHASE {
2348
+ constructor()
2349
+ update(value: number): number | null
2350
+ batch(prices: Array<number>): Array<number>
2351
+ reset(): void
2352
+ isReady(): boolean
2353
+ warmupPeriod(): number
2354
+ }
2355
+ export type HtTrendModeNode = HT_TRENDMODE
2356
+ export declare class HT_TRENDMODE {
2357
+ constructor()
2358
+ update(value: number): number | null
2359
+ batch(prices: Array<number>): Array<number>
2360
+ reset(): void
2361
+ isReady(): boolean
2362
+ warmupPeriod(): number
2363
+ }
2013
2364
  export type HilbertDominantCycleNode = HilbertDominantCycle
2014
2365
  export declare class HilbertDominantCycle {
2015
2366
  constructor()
@@ -2893,6 +3244,15 @@ export declare class CalendarSpread {
2893
3244
  isReady(): boolean
2894
3245
  warmupPeriod(): number
2895
3246
  }
3247
+ export type AdvanceDeclineNode = AdvanceDecline
3248
+ export declare class AdvanceDecline {
3249
+ constructor()
3250
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3251
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3252
+ reset(): void
3253
+ isReady(): boolean
3254
+ warmupPeriod(): number
3255
+ }
2896
3256
  export type SharpeRatioNode = SharpeRatio
2897
3257
  export declare class SharpeRatio {
2898
3258
  constructor(period: number, riskFree: number)
package/index.js CHANGED
@@ -310,7 +310,7 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- const { version, SMA, EMA, WMA, RSI, DEMA, TEMA, HMA, ROC, TRIX, SMMA, TRIMA, ZLEMA, MOM, CMO, DPO, StdDev, UlcerIndex, VerticalHorizontalFilter, ZScore, McGinleyDynamic, FRAMA, SuperSmoother, FisherTransform, Decycler, CenterOfGravity, CyberneticCycle, InstantaneousTrendline, EhlersStochastic, RVIVolatility, Variance, CoefficientOfVariation, Skewness, Kurtosis, StandardError, DetrendedStdDev, RSquared, MedianAbsoluteDeviation, Autocorrelation, HurstExponent, PearsonCorrelation, Beta, PairwiseBeta, SpearmanCorrelation, PairSpreadZScore, LeadLagCrossCorrelation, Cointegration, RelativeStrengthAB, MACD, BollingerBands, ATR, Stochastic, OBV, ADX, ADXR, CCI, WilliamsR, MFI, PSAR, Keltner, Donchian, VWAP, RollingVWAP, AwesomeOscillator, Aroon, Inertia, ConnorsRSI, LaguerreRSI, SMI, KST, PGO, RVI, AwesomeOscillatorHistogram, STC, ElderImpulse, ZeroLagMACD, CFO, APO, KAMA, EVWMA, Alligator, JMA, VIDYA, ALMA, T3, TSI, PMO, TII, ADL, VolumePriceTrend, ChaikinMoneyFlow, ChaikinOscillator, ForceIndex, NVI, PVI, VolumeOscillator, KVO, WilliamsAD, AnchoredRSI, AnchoredVWAP, DemandIndex, TSV, VZO, MarketFacilitationIndex, EaseOfMovement, SuperTrend, ChandelierExit, ChandeKrollStop, AtrTrailingStop, HiLoActivator, VoltyStop, YoyoExit, DonchianStop, PercentageTrailingStop, StepTrailingStop, RenkoTrailingStop, TypicalPrice, MedianPrice, WeightedClose, LinearRegression, LinRegSlope, AcceleratorOscillator, BalanceOfPower, ChoppinessIndex, TrueRange, ChaikinVolatility, YangZhangVolatility, RogersSatchellVolatility, GarmanKlassVolatility, ParkinsonVolatility, LinRegAngle, BollingerBandwidth, PercentB, NATR, HistoricalVolatility, AroonOscillator, WaveTrend, RWI, Vortex, MassIndex, StochRSI, UltimateOscillator, PPO, Coppock, VWMA, MaEnvelope, AccelerationBands, StarcBands, AtrBands, HurstChannel, LinRegChannel, StandardErrorBands, DoubleBollinger, TtmSqueeze, FractalChaosBands, VwapStdDevBands, ClassicPivots, FibonacciPivots, Camarilla, WoodiePivots, DemarkPivots, WilliamsFractals, ZigZag, TDSetup, TDSequential, TDDeMarker, TDREI, TDPressure, TDCombo, TDCountdown, TDLines, TDRangeProjection, TDDifferential, TDOpen, TDRiskLevel, InverseFisherTransform, DecyclerOscillator, RoofingFilter, EmpiricalModeDecomposition, HilbertDominantCycle, AdaptiveCycle, SineWave, MAMA, FAMA, Ichimoku, HeikinAshi, ValueArea, VolumeProfile, TpoProfile, InitialBalance, OpeningRange, Doji, Hammer, InvertedHammer, HangingMan, ShootingStar, Engulfing, Harami, MorningEveningStar, ThreeSoldiersOrCrows, PiercingDarkCloud, Marubozu, Tweezer, SpinningTop, ThreeInside, ThreeOutside, TwoCrows, UpsideGapTwoCrows, IdenticalThreeCrows, ThreeLineStrike, ThreeStarsInSouth, AbandonedBaby, AdvanceBlock, BeltHold, Breakaway, Counterattack, DojiStar, DragonflyDoji, GravestoneDoji, LongLeggedDoji, RickshawMan, EveningDojiStar, MorningDojiStar, GapSideBySideWhite, HighWave, Hikkake, HikkakeModified, HomingPigeon, OnNeck, InNeck, Thrusting, SeparatingLines, Kicking, KickingByLength, LadderBottom, MatHold, MatchingLow, LongLine, ShortLine, RisingThreeMethods, FallingThreeMethods, UpsideGapThreeMethods, DownsideGapThreeMethods, StalledPattern, StickSandwich, Takuri, ClosingMarubozu, OpeningMarubozu, TasukiGap, UniqueThreeRiver, ConcealingBabySwallow, OrderBookImbalanceTop1, OrderBookImbalanceFull, Microprice, QuotedSpread, DepthSlope, OrderBookImbalanceTopN, SignedVolume, CumulativeVolumeDelta, TradeImbalance, EffectiveSpread, RealizedSpread, KylesLambda, Footprint, FundingRate, FundingRateMean, FundingRateZScore, FundingBasis, OpenInterestDelta, OIPriceDivergence, OIWeighted, LongShortRatio, TakerBuySellRatio, LiquidationFeatures, TermStructureBasis, CalendarSpread, SharpeRatio, SortinoRatio, CalmarRatio, OmegaRatio, MaxDrawdown, AverageDrawdown, DrawdownDuration, PainIndex, ValueAtRisk, ConditionalValueAtRisk, ProfitFactor, GainLossRatio, RecoveryFactor, KellyCriterion, TreynorRatio, InformationRatio, RenkoBars, KagiBars, PointAndFigureBars, Alpha } = nativeBinding
313
+ const { version, SMA, EMA, WMA, RSI, DEMA, TEMA, HMA, ROC, TRIX, SMMA, TRIMA, ZLEMA, MOM, CMO, DPO, StdDev, UlcerIndex, VerticalHorizontalFilter, ZScore, McGinleyDynamic, FRAMA, SuperSmoother, FisherTransform, Decycler, CenterOfGravity, CyberneticCycle, InstantaneousTrendline, EhlersStochastic, RVIVolatility, Variance, CoefficientOfVariation, Skewness, Kurtosis, StandardError, DetrendedStdDev, RSquared, MedianAbsoluteDeviation, MIDPOINT, ROCP, ROCR, ROCR100, LINEARREG_INTERCEPT, TSF, Autocorrelation, HurstExponent, PearsonCorrelation, Beta, PairwiseBeta, SpearmanCorrelation, RollingCorrelation, RollingCovariance, OuHalfLife, SpreadHurst, DistanceSsd, BetaNeutralSpread, PairSpreadZScore, LeadLagCrossCorrelation, Cointegration, RelativeStrengthAB, VarianceRatio, GrangerCausality, KalmanHedgeRatio, SpreadBollingerBands, MACD, MACDFIX, MACDEXT, BollingerBands, ATR, PLUS_DM, MINUS_DM, PLUS_DI, MINUS_DI, DX, MIDPRICE, AVGPRICE, SAREXT, HT_PHASOR, Stochastic, OBV, ADX, ADXR, CCI, WilliamsR, MFI, PSAR, Keltner, Donchian, VWAP, RollingVWAP, AwesomeOscillator, Aroon, Inertia, ConnorsRSI, LaguerreRSI, SMI, KST, PGO, RVI, AwesomeOscillatorHistogram, STC, ElderImpulse, ZeroLagMACD, CFO, APO, KAMA, EVWMA, Alligator, JMA, VIDYA, ALMA, T3, TSI, PMO, TII, ADL, VolumePriceTrend, ChaikinMoneyFlow, ChaikinOscillator, ForceIndex, NVI, PVI, VolumeOscillator, KVO, WilliamsAD, AnchoredRSI, AnchoredVWAP, DemandIndex, TSV, VZO, MarketFacilitationIndex, EaseOfMovement, SuperTrend, ChandelierExit, ChandeKrollStop, AtrTrailingStop, HiLoActivator, VoltyStop, YoyoExit, DonchianStop, PercentageTrailingStop, StepTrailingStop, RenkoTrailingStop, TypicalPrice, MedianPrice, WeightedClose, LinearRegression, LinRegSlope, AcceleratorOscillator, BalanceOfPower, ChoppinessIndex, TrueRange, ChaikinVolatility, YangZhangVolatility, RogersSatchellVolatility, GarmanKlassVolatility, ParkinsonVolatility, LinRegAngle, BollingerBandwidth, PercentB, NATR, HistoricalVolatility, AroonOscillator, WaveTrend, RWI, Vortex, MassIndex, StochRSI, UltimateOscillator, PPO, Coppock, VWMA, MaEnvelope, AccelerationBands, StarcBands, AtrBands, HurstChannel, LinRegChannel, StandardErrorBands, DoubleBollinger, TtmSqueeze, FractalChaosBands, VwapStdDevBands, ClassicPivots, FibonacciPivots, Camarilla, WoodiePivots, DemarkPivots, WilliamsFractals, ZigZag, TDSetup, TDSequential, TDDeMarker, TDREI, TDPressure, TDCombo, TDCountdown, TDLines, TDRangeProjection, TDDifferential, TDOpen, TDRiskLevel, InverseFisherTransform, DecyclerOscillator, RoofingFilter, EmpiricalModeDecomposition, HT_DCPHASE, HT_TRENDMODE, HilbertDominantCycle, AdaptiveCycle, SineWave, MAMA, FAMA, Ichimoku, HeikinAshi, ValueArea, VolumeProfile, TpoProfile, InitialBalance, OpeningRange, Doji, Hammer, InvertedHammer, HangingMan, ShootingStar, Engulfing, Harami, MorningEveningStar, ThreeSoldiersOrCrows, PiercingDarkCloud, Marubozu, Tweezer, SpinningTop, ThreeInside, ThreeOutside, TwoCrows, UpsideGapTwoCrows, IdenticalThreeCrows, ThreeLineStrike, ThreeStarsInSouth, AbandonedBaby, AdvanceBlock, BeltHold, Breakaway, Counterattack, DojiStar, DragonflyDoji, GravestoneDoji, LongLeggedDoji, RickshawMan, EveningDojiStar, MorningDojiStar, GapSideBySideWhite, HighWave, Hikkake, HikkakeModified, HomingPigeon, OnNeck, InNeck, Thrusting, SeparatingLines, Kicking, KickingByLength, LadderBottom, MatHold, MatchingLow, LongLine, ShortLine, RisingThreeMethods, FallingThreeMethods, UpsideGapThreeMethods, DownsideGapThreeMethods, StalledPattern, StickSandwich, Takuri, ClosingMarubozu, OpeningMarubozu, TasukiGap, UniqueThreeRiver, ConcealingBabySwallow, OrderBookImbalanceTop1, OrderBookImbalanceFull, Microprice, QuotedSpread, DepthSlope, OrderBookImbalanceTopN, SignedVolume, CumulativeVolumeDelta, TradeImbalance, EffectiveSpread, RealizedSpread, KylesLambda, Footprint, FundingRate, FundingRateMean, FundingRateZScore, FundingBasis, OpenInterestDelta, OIPriceDivergence, OIWeighted, LongShortRatio, TakerBuySellRatio, LiquidationFeatures, TermStructureBasis, CalendarSpread, AdvanceDecline, SharpeRatio, SortinoRatio, CalmarRatio, OmegaRatio, MaxDrawdown, AverageDrawdown, DrawdownDuration, PainIndex, ValueAtRisk, ConditionalValueAtRisk, ProfitFactor, GainLossRatio, RecoveryFactor, KellyCriterion, TreynorRatio, InformationRatio, RenkoBars, KagiBars, PointAndFigureBars, Alpha } = nativeBinding
314
314
 
315
315
  module.exports.version = version
316
316
  module.exports.SMA = SMA
@@ -350,19 +350,46 @@ module.exports.StandardError = StandardError
350
350
  module.exports.DetrendedStdDev = DetrendedStdDev
351
351
  module.exports.RSquared = RSquared
352
352
  module.exports.MedianAbsoluteDeviation = MedianAbsoluteDeviation
353
+ module.exports.MIDPOINT = MIDPOINT
354
+ module.exports.ROCP = ROCP
355
+ module.exports.ROCR = ROCR
356
+ module.exports.ROCR100 = ROCR100
357
+ module.exports.LINEARREG_INTERCEPT = LINEARREG_INTERCEPT
358
+ module.exports.TSF = TSF
353
359
  module.exports.Autocorrelation = Autocorrelation
354
360
  module.exports.HurstExponent = HurstExponent
355
361
  module.exports.PearsonCorrelation = PearsonCorrelation
356
362
  module.exports.Beta = Beta
357
363
  module.exports.PairwiseBeta = PairwiseBeta
358
364
  module.exports.SpearmanCorrelation = SpearmanCorrelation
365
+ module.exports.RollingCorrelation = RollingCorrelation
366
+ module.exports.RollingCovariance = RollingCovariance
367
+ module.exports.OuHalfLife = OuHalfLife
368
+ module.exports.SpreadHurst = SpreadHurst
369
+ module.exports.DistanceSsd = DistanceSsd
370
+ module.exports.BetaNeutralSpread = BetaNeutralSpread
359
371
  module.exports.PairSpreadZScore = PairSpreadZScore
360
372
  module.exports.LeadLagCrossCorrelation = LeadLagCrossCorrelation
361
373
  module.exports.Cointegration = Cointegration
362
374
  module.exports.RelativeStrengthAB = RelativeStrengthAB
375
+ module.exports.VarianceRatio = VarianceRatio
376
+ module.exports.GrangerCausality = GrangerCausality
377
+ module.exports.KalmanHedgeRatio = KalmanHedgeRatio
378
+ module.exports.SpreadBollingerBands = SpreadBollingerBands
363
379
  module.exports.MACD = MACD
380
+ module.exports.MACDFIX = MACDFIX
381
+ module.exports.MACDEXT = MACDEXT
364
382
  module.exports.BollingerBands = BollingerBands
365
383
  module.exports.ATR = ATR
384
+ module.exports.PLUS_DM = PLUS_DM
385
+ module.exports.MINUS_DM = MINUS_DM
386
+ module.exports.PLUS_DI = PLUS_DI
387
+ module.exports.MINUS_DI = MINUS_DI
388
+ module.exports.DX = DX
389
+ module.exports.MIDPRICE = MIDPRICE
390
+ module.exports.AVGPRICE = AVGPRICE
391
+ module.exports.SAREXT = SAREXT
392
+ module.exports.HT_PHASOR = HT_PHASOR
366
393
  module.exports.Stochastic = Stochastic
367
394
  module.exports.OBV = OBV
368
395
  module.exports.ADX = ADX
@@ -491,6 +518,8 @@ module.exports.InverseFisherTransform = InverseFisherTransform
491
518
  module.exports.DecyclerOscillator = DecyclerOscillator
492
519
  module.exports.RoofingFilter = RoofingFilter
493
520
  module.exports.EmpiricalModeDecomposition = EmpiricalModeDecomposition
521
+ module.exports.HT_DCPHASE = HT_DCPHASE
522
+ module.exports.HT_TRENDMODE = HT_TRENDMODE
494
523
  module.exports.HilbertDominantCycle = HilbertDominantCycle
495
524
  module.exports.AdaptiveCycle = AdaptiveCycle
496
525
  module.exports.SineWave = SineWave
@@ -588,6 +617,7 @@ module.exports.TakerBuySellRatio = TakerBuySellRatio
588
617
  module.exports.LiquidationFeatures = LiquidationFeatures
589
618
  module.exports.TermStructureBasis = TermStructureBasis
590
619
  module.exports.CalendarSpread = CalendarSpread
620
+ module.exports.AdvanceDecline = AdvanceDecline
591
621
  module.exports.SharpeRatio = SharpeRatio
592
622
  module.exports.SortinoRatio = SortinoRatio
593
623
  module.exports.CalmarRatio = CalmarRatio
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickra-darwin-arm64",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Native binding for wickra (macOS Apple Silicon). Installed automatically as an optional dependency of wickra on matching platforms.",
5
5
  "main": "wickra.darwin-arm64.node",
6
6
  "files": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickra-darwin-x64",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Native binding for wickra (macOS Intel). Installed automatically as an optional dependency of wickra on matching platforms.",
5
5
  "main": "wickra.darwin-x64.node",
6
6
  "files": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickra-linux-arm64-gnu",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Native binding for wickra (linux arm64 GNU). Installed automatically as an optional dependency of wickra on matching platforms.",
5
5
  "main": "wickra.linux-arm64-gnu.node",
6
6
  "files": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickra-linux-x64-gnu",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Native binding for wickra (linux x64 GNU). Installed automatically as an optional dependency of wickra on matching platforms.",
5
5
  "main": "wickra.linux-x64-gnu.node",
6
6
  "files": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickra-win32-arm64-msvc",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Native binding for wickra (Windows arm64 MSVC). Installed automatically as an optional dependency of wickra on matching platforms.",
5
5
  "main": "wickra.win32-arm64-msvc.node",
6
6
  "files": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickra-win32-x64-msvc",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Native binding for wickra (Windows x64 MSVC). Installed automatically as an optional dependency of wickra on matching platforms.",
5
5
  "main": "wickra.win32-x64-msvc.node",
6
6
  "files": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickra",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Streaming-first technical indicators: incremental, fast, install-free. Node bindings powered by Rust.",
5
5
  "author": "kingchenc <support@wickra.org>",
6
6
  "main": "index.js",
@@ -47,12 +47,12 @@
47
47
  "node": ">= 18"
48
48
  },
49
49
  "optionalDependencies": {
50
- "wickra-linux-x64-gnu": "0.4.5",
51
- "wickra-linux-arm64-gnu": "0.4.5",
52
- "wickra-darwin-x64": "0.4.5",
53
- "wickra-darwin-arm64": "0.4.5",
54
- "wickra-win32-x64-msvc": "0.4.5",
55
- "wickra-win32-arm64-msvc": "0.4.5"
50
+ "wickra-linux-x64-gnu": "0.4.7",
51
+ "wickra-linux-arm64-gnu": "0.4.7",
52
+ "wickra-darwin-x64": "0.4.7",
53
+ "wickra-darwin-arm64": "0.4.7",
54
+ "wickra-win32-x64-msvc": "0.4.7",
55
+ "wickra-win32-arm64-msvc": "0.4.7"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "napi build --platform --release",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file