wickra 0.4.6 → 0.5.0

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=314" 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=339" 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)
@@ -9,7 +9,7 @@
9
9
  [![crates.io](https://img.shields.io/crates/v/wickra.svg?logo=rust&color=orange)](https://crates.io/crates/wickra)
10
10
  [![PyPI](https://img.shields.io/pypi/v/wickra.svg?logo=pypi&color=blue)](https://pypi.org/project/wickra/)
11
11
  [![npm](https://img.shields.io/npm/v/wickra.svg?logo=npm&color=red)](https://www.npmjs.com/package/wickra)
12
- [![License: PolyForm-NC](https://img.shields.io/badge/license-PolyForm--NC--1.0.0-purple)](LICENSE)
12
+ [![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT_OR_Apache--2.0-blue)](#license)
13
13
  [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/wickra-lib/wickra/badge)](https://scorecard.dev/viewer/?uri=github.com/wickra-lib/wickra)
14
14
  [![Build provenance](https://img.shields.io/badge/provenance-attested-brightgreen?logo=github)](https://github.com/wickra-lib/wickra/attestations)
15
15
  [![Docs](https://img.shields.io/badge/docs-docs.wickra.org-0ea5e9?logo=readthedocs&logoColor=white)](https://docs.wickra.org)
@@ -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 314 indicators; start at the
50
+ every one of the 339 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
- 314 streaming-first indicators across nineteen families. Every one passes the
138
+ 339 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).
@@ -150,7 +150,7 @@ warmup) at [docs.wickra.org](https://docs.wickra.org/Indicators-Overview).
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
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, Mid Price, Mid Point, Average Price, Linear Regression Intercept, Time Series Forecast |
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
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 |
@@ -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, Advance/Decline Ratio, Advance/Decline Volume Line, McClellan Oscillator, McClellan Summation Index, TRIN / Arms Index, Breadth Thrust, New Highs - New Lows, High-Low Index, Percent Above Moving Average, Up/Down Volume Ratio, Bullish Percent Index, Cumulative Volume Index, Absolute Breadth Index, TICK Index |
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 314 indicators
243
+ │ ├── wickra-core/ core engine + all 339 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/
@@ -323,13 +324,20 @@ shape together before you invest the time.
323
324
 
324
325
  ## License
325
326
 
326
- Licensed under the **PolyForm Noncommercial License 1.0.0**. See [LICENSE](LICENSE).
327
+ Licensed under either of
327
328
 
328
- In plain English: use it, fork it, modify it, redistribute it, file issues, send
329
- pull requests — all welcome. Personal projects, research, education, non-profits,
330
- government, hobby trading bots: all fine. The one thing that's not allowed is
331
- commercial sale of the software or of services built around it. If you want to
332
- use Wickra commercially, get in touch about a license.
329
+ - Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
330
+ <http://www.apache.org/licenses/LICENSE-2.0>)
331
+ - MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
332
+
333
+ at your option. Use it, fork it, modify it, redistribute it — commercially or
334
+ not — file issues, send pull requests; all welcome.
335
+
336
+ ### Contribution
337
+
338
+ Unless you explicitly state otherwise, any contribution intentionally submitted
339
+ for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
340
+ dual licensed as above, without any additional terms or conditions.
333
341
 
334
342
  ## Disclaimer
335
343
 
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
@@ -786,6 +806,84 @@ export declare class SpearmanCorrelation {
786
806
  isReady(): boolean
787
807
  warmupPeriod(): number
788
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
+ }
789
887
  export type PairSpreadZScoreNode = PairSpreadZScore
790
888
  /**
791
889
  * Pair spread z-score: two ctor params (`betaPeriod`, `zPeriod`), one `(a, b)`
@@ -845,6 +943,68 @@ export declare class RelativeStrengthAB {
845
943
  isReady(): boolean
846
944
  warmupPeriod(): number
847
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
+ }
848
1008
  export type MacdNode = MACD
849
1009
  export declare class MACD {
850
1010
  constructor(fast: number, slow: number, signal: number)
@@ -3084,6 +3244,141 @@ export declare class CalendarSpread {
3084
3244
  isReady(): boolean
3085
3245
  warmupPeriod(): number
3086
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
+ }
3256
+ export type AdvanceDeclineRatioNode = AdvanceDeclineRatio
3257
+ export declare class AdvanceDeclineRatio {
3258
+ constructor()
3259
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3260
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3261
+ reset(): void
3262
+ isReady(): boolean
3263
+ warmupPeriod(): number
3264
+ }
3265
+ export type AdVolumeLineNode = AdVolumeLine
3266
+ export declare class AdVolumeLine {
3267
+ constructor()
3268
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3269
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3270
+ reset(): void
3271
+ isReady(): boolean
3272
+ warmupPeriod(): number
3273
+ }
3274
+ export type McClellanOscillatorNode = McClellanOscillator
3275
+ export declare class McClellanOscillator {
3276
+ constructor()
3277
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3278
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3279
+ reset(): void
3280
+ isReady(): boolean
3281
+ warmupPeriod(): number
3282
+ }
3283
+ export type McClellanSummationIndexNode = McClellanSummationIndex
3284
+ export declare class McClellanSummationIndex {
3285
+ constructor()
3286
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3287
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3288
+ reset(): void
3289
+ isReady(): boolean
3290
+ warmupPeriod(): number
3291
+ }
3292
+ export type TrinNode = Trin
3293
+ export declare class Trin {
3294
+ constructor()
3295
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3296
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3297
+ reset(): void
3298
+ isReady(): boolean
3299
+ warmupPeriod(): number
3300
+ }
3301
+ export type BreadthThrustNode = BreadthThrust
3302
+ export declare class BreadthThrust {
3303
+ constructor(period: number)
3304
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3305
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3306
+ reset(): void
3307
+ isReady(): boolean
3308
+ warmupPeriod(): number
3309
+ }
3310
+ export type NewHighsNewLowsNode = NewHighsNewLows
3311
+ export declare class NewHighsNewLows {
3312
+ constructor()
3313
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3314
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3315
+ reset(): void
3316
+ isReady(): boolean
3317
+ warmupPeriod(): number
3318
+ }
3319
+ export type HighLowIndexNode = HighLowIndex
3320
+ export declare class HighLowIndex {
3321
+ constructor(period: number)
3322
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3323
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3324
+ reset(): void
3325
+ isReady(): boolean
3326
+ warmupPeriod(): number
3327
+ }
3328
+ export type PercentAboveMaNode = PercentAboveMa
3329
+ export declare class PercentAboveMa {
3330
+ constructor()
3331
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>, aboveMa: Array<boolean>): number | null
3332
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>, aboveMa: Array<Array<boolean>>): Array<number>
3333
+ reset(): void
3334
+ isReady(): boolean
3335
+ warmupPeriod(): number
3336
+ }
3337
+ export type UpDownVolumeRatioNode = UpDownVolumeRatio
3338
+ export declare class UpDownVolumeRatio {
3339
+ constructor()
3340
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3341
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3342
+ reset(): void
3343
+ isReady(): boolean
3344
+ warmupPeriod(): number
3345
+ }
3346
+ export type BullishPercentIndexNode = BullishPercentIndex
3347
+ export declare class BullishPercentIndex {
3348
+ constructor()
3349
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>, onBuySignal: Array<boolean>): number | null
3350
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>, onBuySignal: Array<Array<boolean>>): Array<number>
3351
+ reset(): void
3352
+ isReady(): boolean
3353
+ warmupPeriod(): number
3354
+ }
3355
+ export type CumulativeVolumeIndexNode = CumulativeVolumeIndex
3356
+ export declare class CumulativeVolumeIndex {
3357
+ constructor()
3358
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3359
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3360
+ reset(): void
3361
+ isReady(): boolean
3362
+ warmupPeriod(): number
3363
+ }
3364
+ export type AbsoluteBreadthIndexNode = AbsoluteBreadthIndex
3365
+ export declare class AbsoluteBreadthIndex {
3366
+ constructor()
3367
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3368
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3369
+ reset(): void
3370
+ isReady(): boolean
3371
+ warmupPeriod(): number
3372
+ }
3373
+ export type TickIndexNode = TickIndex
3374
+ export declare class TickIndex {
3375
+ constructor()
3376
+ update(change: Array<number>, volume: Array<number>, newHigh: Array<boolean>, newLow: Array<boolean>): number | null
3377
+ batch(change: Array<Array<number>>, volume: Array<Array<number>>, newHigh: Array<Array<boolean>>, newLow: Array<Array<boolean>>): Array<number>
3378
+ reset(): void
3379
+ isReady(): boolean
3380
+ warmupPeriod(): number
3381
+ }
3087
3382
  export type SharpeRatioNode = SharpeRatio
3088
3383
  export declare class SharpeRatio {
3089
3384
  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, MIDPOINT, ROCP, ROCR, ROCR100, LINEARREG_INTERCEPT, TSF, Autocorrelation, HurstExponent, PearsonCorrelation, Beta, PairwiseBeta, SpearmanCorrelation, PairSpreadZScore, LeadLagCrossCorrelation, Cointegration, RelativeStrengthAB, 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, 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, AdvanceDeclineRatio, AdVolumeLine, McClellanOscillator, McClellanSummationIndex, Trin, BreadthThrust, NewHighsNewLows, HighLowIndex, PercentAboveMa, UpDownVolumeRatio, BullishPercentIndex, CumulativeVolumeIndex, AbsoluteBreadthIndex, TickIndex, 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
@@ -362,10 +362,20 @@ module.exports.PearsonCorrelation = PearsonCorrelation
362
362
  module.exports.Beta = Beta
363
363
  module.exports.PairwiseBeta = PairwiseBeta
364
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
365
371
  module.exports.PairSpreadZScore = PairSpreadZScore
366
372
  module.exports.LeadLagCrossCorrelation = LeadLagCrossCorrelation
367
373
  module.exports.Cointegration = Cointegration
368
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
369
379
  module.exports.MACD = MACD
370
380
  module.exports.MACDFIX = MACDFIX
371
381
  module.exports.MACDEXT = MACDEXT
@@ -607,6 +617,21 @@ module.exports.TakerBuySellRatio = TakerBuySellRatio
607
617
  module.exports.LiquidationFeatures = LiquidationFeatures
608
618
  module.exports.TermStructureBasis = TermStructureBasis
609
619
  module.exports.CalendarSpread = CalendarSpread
620
+ module.exports.AdvanceDecline = AdvanceDecline
621
+ module.exports.AdvanceDeclineRatio = AdvanceDeclineRatio
622
+ module.exports.AdVolumeLine = AdVolumeLine
623
+ module.exports.McClellanOscillator = McClellanOscillator
624
+ module.exports.McClellanSummationIndex = McClellanSummationIndex
625
+ module.exports.Trin = Trin
626
+ module.exports.BreadthThrust = BreadthThrust
627
+ module.exports.NewHighsNewLows = NewHighsNewLows
628
+ module.exports.HighLowIndex = HighLowIndex
629
+ module.exports.PercentAboveMa = PercentAboveMa
630
+ module.exports.UpDownVolumeRatio = UpDownVolumeRatio
631
+ module.exports.BullishPercentIndex = BullishPercentIndex
632
+ module.exports.CumulativeVolumeIndex = CumulativeVolumeIndex
633
+ module.exports.AbsoluteBreadthIndex = AbsoluteBreadthIndex
634
+ module.exports.TickIndex = TickIndex
610
635
  module.exports.SharpeRatio = SharpeRatio
611
636
  module.exports.SortinoRatio = SortinoRatio
612
637
  module.exports.CalmarRatio = CalmarRatio
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "wickra-darwin-arm64",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
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": [
7
7
  "wickra.darwin-arm64.node"
8
8
  ],
9
- "license": "LicenseRef-Wickra-Noncommercial-1.0.0",
9
+ "license": "MIT OR Apache-2.0",
10
10
  "engines": {
11
11
  "node": ">= 18"
12
12
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "wickra-darwin-x64",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
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": [
7
7
  "wickra.darwin-x64.node"
8
8
  ],
9
- "license": "LicenseRef-Wickra-Noncommercial-1.0.0",
9
+ "license": "MIT OR Apache-2.0",
10
10
  "engines": {
11
11
  "node": ">= 18"
12
12
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "wickra-linux-arm64-gnu",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
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": [
7
7
  "wickra.linux-arm64-gnu.node"
8
8
  ],
9
- "license": "LicenseRef-Wickra-Noncommercial-1.0.0",
9
+ "license": "MIT OR Apache-2.0",
10
10
  "engines": {
11
11
  "node": ">= 18"
12
12
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "wickra-linux-x64-gnu",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
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": [
7
7
  "wickra.linux-x64-gnu.node"
8
8
  ],
9
- "license": "LicenseRef-Wickra-Noncommercial-1.0.0",
9
+ "license": "MIT OR Apache-2.0",
10
10
  "engines": {
11
11
  "node": ">= 18"
12
12
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "wickra-win32-arm64-msvc",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
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": [
7
7
  "wickra.win32-arm64-msvc.node"
8
8
  ],
9
- "license": "LicenseRef-Wickra-Noncommercial-1.0.0",
9
+ "license": "MIT OR Apache-2.0",
10
10
  "engines": {
11
11
  "node": ">= 18"
12
12
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "wickra-win32-x64-msvc",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
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": [
7
7
  "wickra.win32-x64-msvc.node"
8
8
  ],
9
- "license": "LicenseRef-Wickra-Noncommercial-1.0.0",
9
+ "license": "MIT OR Apache-2.0",
10
10
  "engines": {
11
11
  "node": ">= 18"
12
12
  },
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "wickra",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
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",
7
7
  "types": "index.d.ts",
8
- "license": "LicenseRef-Wickra-Noncommercial-1.0.0",
8
+ "license": "MIT OR Apache-2.0",
9
9
  "keywords": [
10
10
  "trading",
11
11
  "indicators",
@@ -47,12 +47,12 @@
47
47
  "node": ">= 18"
48
48
  },
49
49
  "optionalDependencies": {
50
- "wickra-linux-x64-gnu": "0.4.6",
51
- "wickra-linux-arm64-gnu": "0.4.6",
52
- "wickra-darwin-x64": "0.4.6",
53
- "wickra-darwin-arm64": "0.4.6",
54
- "wickra-win32-x64-msvc": "0.4.6",
55
- "wickra-win32-arm64-msvc": "0.4.6"
50
+ "wickra-linux-x64-gnu": "0.5.0",
51
+ "wickra-linux-arm64-gnu": "0.5.0",
52
+ "wickra-darwin-x64": "0.5.0",
53
+ "wickra-darwin-arm64": "0.5.0",
54
+ "wickra-win32-x64-msvc": "0.5.0",
55
+ "wickra-win32-arm64-msvc": "0.5.0"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "napi build --platform --release",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file