wickra-wasm 0.4.1 → 0.4.3

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://wickra.org/og-banner.webp" 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=232" 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 219 indicators; start at the
50
+ every one of the 232 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
- 219 streaming-first indicators across sixteen families. Every one passes the
138
+ 232 streaming-first indicators across seventeen 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).
@@ -156,9 +156,16 @@ warmup) at [docs.wickra.org](https://docs.wickra.org/Indicators-Overview).
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 |
158
158
  | Candlestick Patterns | Doji, Hammer, Inverted Hammer, Hanging Man, Shooting Star, Engulfing, Harami, Morning/Evening Star, Three White Soldiers/Black Crows, Piercing Line/Dark Cloud Cover, Marubozu, Tweezer, Spinning Top, Three Inside Up/Down, Three Outside Up/Down |
159
+ | 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 |
159
160
  | Market Profile | Value Area (POC / VAH / VAL), Initial Balance, Opening Range |
160
161
  | 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) |
161
162
 
163
+ Every candlestick pattern emits a signed per-bar value — `+1.0` bullish,
164
+ `−1.0` bearish, `0.0` none — so the family drops straight into a feature matrix
165
+ as one column each. `Doji` is direction-less by default (`+1.0` / `0.0`);
166
+ construct it in signed mode (`Doji::new().signed()`, `Doji(signed=True)`,
167
+ `new Doji(true)`) for a dragonfly / gravestone `±1` reading.
168
+
162
169
  Adding a new indicator means implementing one trait in Rust; all four bindings
163
170
  inherit it automatically.
164
171
 
@@ -230,7 +237,7 @@ A Python live-trading example using the public `websockets` package lives at
230
237
  ```
231
238
  wickra/
232
239
  ├── crates/
233
- │ ├── wickra-core/ core engine + all 219 indicators
240
+ │ ├── wickra-core/ core engine + all 232 indicators
234
241
  │ ├── wickra/ top-level facade crate (publishes on crates.io) + benches/
235
242
  │ └── wickra-data/ CSV reader, tick aggregator, live exchange feeds
236
243
  ├── bindings/
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "kingchenc <support@wickra.org>"
6
6
  ],
7
7
  "description": "WASM bindings for the Wickra streaming-first technical indicators library.",
8
- "version": "0.4.1",
8
+ "version": "0.4.3",
9
9
  "license": "PolyForm-Noncommercial-1.0.0",
10
10
  "repository": {
11
11
  "type": "git",
package/wickra_wasm.d.ts CHANGED
@@ -483,6 +483,16 @@ export class Coppock {
483
483
  warmupPeriod(): number;
484
484
  }
485
485
 
486
+ export class CumulativeVolumeDelta {
487
+ free(): void;
488
+ [Symbol.dispose](): void;
489
+ isReady(): boolean;
490
+ constructor();
491
+ reset(): void;
492
+ update(price: number, size: number, is_buy: boolean): number | undefined;
493
+ warmupPeriod(): number;
494
+ }
495
+
486
496
  export class CyberneticCycle {
487
497
  free(): void;
488
498
  [Symbol.dispose](): void;
@@ -558,6 +568,16 @@ export class DemarkPivots {
558
568
  warmupPeriod(): number;
559
569
  }
560
570
 
571
+ export class DepthSlope {
572
+ free(): void;
573
+ [Symbol.dispose](): void;
574
+ isReady(): boolean;
575
+ constructor();
576
+ reset(): void;
577
+ update(bid_px: Float64Array, bid_sz: Float64Array, ask_px: Float64Array, ask_sz: Float64Array): number | undefined;
578
+ warmupPeriod(): number;
579
+ }
580
+
561
581
  export class DetrendedStdDev {
562
582
  free(): void;
563
583
  [Symbol.dispose](): void;
@@ -574,7 +594,8 @@ export class Doji {
574
594
  [Symbol.dispose](): void;
575
595
  batch(open: Float64Array, high: Float64Array, low: Float64Array, close: Float64Array): Float64Array;
576
596
  isReady(): boolean;
577
- constructor();
597
+ isSigned(): boolean;
598
+ constructor(signed?: boolean | null);
578
599
  reset(): void;
579
600
  update(open: number, high: number, low: number, close: number): number | undefined;
580
601
  warmupPeriod(): number;
@@ -665,6 +686,16 @@ export class EaseOfMovement {
665
686
  update(high: number, low: number, volume: number): number | undefined;
666
687
  }
667
688
 
689
+ export class EffectiveSpread {
690
+ free(): void;
691
+ [Symbol.dispose](): void;
692
+ isReady(): boolean;
693
+ constructor();
694
+ reset(): void;
695
+ update(price: number, size: number, is_buy: boolean, mid: number): number | undefined;
696
+ warmupPeriod(): number;
697
+ }
698
+
668
699
  export class EhlersStochastic {
669
700
  free(): void;
670
701
  [Symbol.dispose](): void;
@@ -753,6 +784,16 @@ export class FisherTransform {
753
784
  warmupPeriod(): number;
754
785
  }
755
786
 
787
+ export class Footprint {
788
+ free(): void;
789
+ [Symbol.dispose](): void;
790
+ isReady(): boolean;
791
+ constructor(tick_size: number);
792
+ reset(): void;
793
+ update(price: number, size: number, is_buy: boolean): any;
794
+ warmupPeriod(): number;
795
+ }
796
+
756
797
  export class ForceIndex {
757
798
  free(): void;
758
799
  [Symbol.dispose](): void;
@@ -1082,6 +1123,16 @@ export class Kurtosis {
1082
1123
  warmupPeriod(): number;
1083
1124
  }
1084
1125
 
1126
+ export class KylesLambda {
1127
+ free(): void;
1128
+ [Symbol.dispose](): void;
1129
+ isReady(): boolean;
1130
+ constructor(window: number);
1131
+ reset(): void;
1132
+ update(price: number, size: number, is_buy: boolean, mid: number): number | undefined;
1133
+ warmupPeriod(): number;
1134
+ }
1135
+
1085
1136
  export class LaguerreRSI {
1086
1137
  free(): void;
1087
1138
  [Symbol.dispose](): void;
@@ -1291,6 +1342,16 @@ export class MedianPrice {
1291
1342
  update(high: number, low: number): number | undefined;
1292
1343
  }
1293
1344
 
1345
+ export class Microprice {
1346
+ free(): void;
1347
+ [Symbol.dispose](): void;
1348
+ isReady(): boolean;
1349
+ constructor();
1350
+ reset(): void;
1351
+ update(bid_px: Float64Array, bid_sz: Float64Array, ask_px: Float64Array, ask_sz: Float64Array): number | undefined;
1352
+ warmupPeriod(): number;
1353
+ }
1354
+
1294
1355
  export class MorningEveningStar {
1295
1356
  free(): void;
1296
1357
  [Symbol.dispose](): void;
@@ -1357,6 +1418,36 @@ export class OpeningRange {
1357
1418
  warmupPeriod(): number;
1358
1419
  }
1359
1420
 
1421
+ export class OrderBookImbalanceFull {
1422
+ free(): void;
1423
+ [Symbol.dispose](): void;
1424
+ isReady(): boolean;
1425
+ constructor();
1426
+ reset(): void;
1427
+ update(bid_px: Float64Array, bid_sz: Float64Array, ask_px: Float64Array, ask_sz: Float64Array): number | undefined;
1428
+ warmupPeriod(): number;
1429
+ }
1430
+
1431
+ export class OrderBookImbalanceTop1 {
1432
+ free(): void;
1433
+ [Symbol.dispose](): void;
1434
+ isReady(): boolean;
1435
+ constructor();
1436
+ reset(): void;
1437
+ update(bid_px: Float64Array, bid_sz: Float64Array, ask_px: Float64Array, ask_sz: Float64Array): number | undefined;
1438
+ warmupPeriod(): number;
1439
+ }
1440
+
1441
+ export class OrderBookImbalanceTopN {
1442
+ free(): void;
1443
+ [Symbol.dispose](): void;
1444
+ isReady(): boolean;
1445
+ constructor(levels: number);
1446
+ reset(): void;
1447
+ update(bid_px: Float64Array, bid_sz: Float64Array, ask_px: Float64Array, ask_sz: Float64Array): number | undefined;
1448
+ warmupPeriod(): number;
1449
+ }
1450
+
1360
1451
  export class PGO {
1361
1452
  free(): void;
1362
1453
  [Symbol.dispose](): void;
@@ -1519,6 +1610,16 @@ export class ProfitFactor {
1519
1610
  warmupPeriod(): number;
1520
1611
  }
1521
1612
 
1613
+ export class QuotedSpread {
1614
+ free(): void;
1615
+ [Symbol.dispose](): void;
1616
+ isReady(): boolean;
1617
+ constructor();
1618
+ reset(): void;
1619
+ update(bid_px: Float64Array, bid_sz: Float64Array, ask_px: Float64Array, ask_sz: Float64Array): number | undefined;
1620
+ warmupPeriod(): number;
1621
+ }
1622
+
1522
1623
  export class ROC {
1523
1624
  free(): void;
1524
1625
  [Symbol.dispose](): void;
@@ -1586,6 +1687,16 @@ export class RWI {
1586
1687
  update(high: number, low: number, close: number): any;
1587
1688
  }
1588
1689
 
1690
+ export class RealizedSpread {
1691
+ free(): void;
1692
+ [Symbol.dispose](): void;
1693
+ isReady(): boolean;
1694
+ constructor(horizon: number);
1695
+ reset(): void;
1696
+ update(price: number, size: number, is_buy: boolean, mid: number): number | undefined;
1697
+ warmupPeriod(): number;
1698
+ }
1699
+
1589
1700
  export class RecoveryFactor {
1590
1701
  free(): void;
1591
1702
  [Symbol.dispose](): void;
@@ -1724,6 +1835,16 @@ export class ShootingStar {
1724
1835
  warmupPeriod(): number;
1725
1836
  }
1726
1837
 
1838
+ export class SignedVolume {
1839
+ free(): void;
1840
+ [Symbol.dispose](): void;
1841
+ isReady(): boolean;
1842
+ constructor();
1843
+ reset(): void;
1844
+ update(price: number, size: number, is_buy: boolean): number | undefined;
1845
+ warmupPeriod(): number;
1846
+ }
1847
+
1727
1848
  export class SineWave {
1728
1849
  free(): void;
1729
1850
  [Symbol.dispose](): void;
@@ -2157,6 +2278,16 @@ export class ThreeSoldiersOrCrows {
2157
2278
  warmupPeriod(): number;
2158
2279
  }
2159
2280
 
2281
+ export class TradeImbalance {
2282
+ free(): void;
2283
+ [Symbol.dispose](): void;
2284
+ isReady(): boolean;
2285
+ constructor(window: number);
2286
+ reset(): void;
2287
+ update(price: number, size: number, is_buy: boolean): number | undefined;
2288
+ warmupPeriod(): number;
2289
+ }
2290
+
2160
2291
  export class TreynorRatio {
2161
2292
  free(): void;
2162
2293
  [Symbol.dispose](): void;
package/wickra_wasm.js CHANGED
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./wickra_wasm_bg.js";
5
5
  __wbg_set_wasm(wasm);
6
6
 
7
7
  export {
8
- ADL, ADX, ADXR, ALMA, APO, ATR, AccelerationBands, AcceleratorOscillator, AdaptiveCycle, Alligator, Alpha, AnchoredVWAP, Aroon, AroonOscillator, AtrBands, AtrTrailingStop, Autocorrelation, AverageDrawdown, AwesomeOscillator, AwesomeOscillatorHistogram, BalanceOfPower, Beta, BollingerBands, BollingerBandwidth, CCI, CFO, CMO, CalmarRatio, Camarilla, CenterOfGravity, ChaikinMoneyFlow, ChaikinOscillator, ChaikinVolatility, ChandeKrollStop, ChandelierExit, ChoppinessIndex, ClassicPivots, CoefficientOfVariation, Cointegration, ConditionalValueAtRisk, ConnorsRSI, Coppock, CyberneticCycle, DEMA, DPO, Decycler, DecyclerOscillator, DemandIndex, DemarkPivots, DetrendedStdDev, Doji, Donchian, DonchianStop, DoubleBollinger, DrawdownDuration, EMA, EVWMA, EaseOfMovement, EhlersStochastic, ElderImpulse, EmpiricalModeDecomposition, Engulfing, FAMA, FRAMA, FibonacciPivots, FisherTransform, ForceIndex, FractalChaosBands, GainLossRatio, GarmanKlassVolatility, HMA, Hammer, HangingMan, Harami, HeikinAshi, HiLoActivator, HilbertDominantCycle, HistoricalVolatility, HurstChannel, HurstExponent, Ichimoku, Inertia, InformationRatio, InitialBalance, InstantaneousTrendline, InverseFisherTransform, InvertedHammer, JMA, KAMA, KST, KVO, KellyCriterion, Keltner, Kurtosis, LaguerreRSI, LeadLagCrossCorrelation, LinRegAngle, LinRegChannel, LinRegSlope, LinearRegression, MACD, MAMA, MFI, MOM, MaEnvelope, MarketFacilitationIndex, Marubozu, MassIndex, MaxDrawdown, McGinleyDynamic, MedianAbsoluteDeviation, MedianPrice, MorningEveningStar, NATR, NVI, OBV, OmegaRatio, OpeningRange, PGO, PMO, PPO, PSAR, PVI, PainIndex, PairSpreadZScore, PairwiseBeta, ParkinsonVolatility, PearsonCorrelation, PercentB, PercentageTrailingStop, PiercingDarkCloud, ProfitFactor, ROC, RSI, RSquared, RVI, RVIVolatility, RWI, RecoveryFactor, RelativeStrengthAB, RenkoTrailingStop, RogersSatchellVolatility, RollingVWAP, RoofingFilter, SMA, SMI, SMMA, STC, SharpeRatio, ShootingStar, SineWave, Skewness, SortinoRatio, SpearmanCorrelation, SpinningTop, StandardError, StandardErrorBands, StarcBands, StdDev, StepTrailingStop, StochRSI, Stochastic, SuperSmoother, SuperTrend, T3, TDCombo, TDCountdown, TDDeMarker, TDDifferential, TDLines, TDOpen, TDPressure, TDREI, TDRangeProjection, TDRiskLevel, TDSequential, TDSetup, TEMA, TII, TRIMA, TRIX, TSI, TSV, ThreeInside, ThreeOutside, ThreeSoldiersOrCrows, TreynorRatio, TrueRange, TtmSqueeze, Tweezer, TypicalPrice, UlcerIndex, UltimateOscillator, VIDYA, VWAP, VWMA, VZO, ValueArea, ValueAtRisk, Variance, VerticalHorizontalFilter, VoltyStop, VolumeOscillator, VolumePriceTrend, Vortex, VwapStdDevBands, WMA, WaveTrend, WeightedClose, WilliamsAD, WilliamsFractals, WilliamsR, WoodiePivots, YangZhangVolatility, YoyoExit, ZLEMA, ZScore, ZeroLagMACD, ZigZag, installPanicHook, version
8
+ ADL, ADX, ADXR, ALMA, APO, ATR, AccelerationBands, AcceleratorOscillator, AdaptiveCycle, Alligator, Alpha, AnchoredVWAP, Aroon, AroonOscillator, AtrBands, AtrTrailingStop, Autocorrelation, AverageDrawdown, AwesomeOscillator, AwesomeOscillatorHistogram, BalanceOfPower, Beta, BollingerBands, BollingerBandwidth, CCI, CFO, CMO, CalmarRatio, Camarilla, CenterOfGravity, ChaikinMoneyFlow, ChaikinOscillator, ChaikinVolatility, ChandeKrollStop, ChandelierExit, ChoppinessIndex, ClassicPivots, CoefficientOfVariation, Cointegration, ConditionalValueAtRisk, ConnorsRSI, Coppock, CumulativeVolumeDelta, CyberneticCycle, DEMA, DPO, Decycler, DecyclerOscillator, DemandIndex, DemarkPivots, DepthSlope, DetrendedStdDev, Doji, Donchian, DonchianStop, DoubleBollinger, DrawdownDuration, EMA, EVWMA, EaseOfMovement, EffectiveSpread, EhlersStochastic, ElderImpulse, EmpiricalModeDecomposition, Engulfing, FAMA, FRAMA, FibonacciPivots, FisherTransform, Footprint, ForceIndex, FractalChaosBands, GainLossRatio, GarmanKlassVolatility, HMA, Hammer, HangingMan, Harami, HeikinAshi, HiLoActivator, HilbertDominantCycle, HistoricalVolatility, HurstChannel, HurstExponent, Ichimoku, Inertia, InformationRatio, InitialBalance, InstantaneousTrendline, InverseFisherTransform, InvertedHammer, JMA, KAMA, KST, KVO, KellyCriterion, Keltner, Kurtosis, KylesLambda, LaguerreRSI, LeadLagCrossCorrelation, LinRegAngle, LinRegChannel, LinRegSlope, LinearRegression, MACD, MAMA, MFI, MOM, MaEnvelope, MarketFacilitationIndex, Marubozu, MassIndex, MaxDrawdown, McGinleyDynamic, MedianAbsoluteDeviation, MedianPrice, Microprice, MorningEveningStar, NATR, NVI, OBV, OmegaRatio, OpeningRange, OrderBookImbalanceFull, OrderBookImbalanceTop1, OrderBookImbalanceTopN, PGO, PMO, PPO, PSAR, PVI, PainIndex, PairSpreadZScore, PairwiseBeta, ParkinsonVolatility, PearsonCorrelation, PercentB, PercentageTrailingStop, PiercingDarkCloud, ProfitFactor, QuotedSpread, ROC, RSI, RSquared, RVI, RVIVolatility, RWI, RealizedSpread, RecoveryFactor, RelativeStrengthAB, RenkoTrailingStop, RogersSatchellVolatility, RollingVWAP, RoofingFilter, SMA, SMI, SMMA, STC, SharpeRatio, ShootingStar, SignedVolume, SineWave, Skewness, SortinoRatio, SpearmanCorrelation, SpinningTop, StandardError, StandardErrorBands, StarcBands, StdDev, StepTrailingStop, StochRSI, Stochastic, SuperSmoother, SuperTrend, T3, TDCombo, TDCountdown, TDDeMarker, TDDifferential, TDLines, TDOpen, TDPressure, TDREI, TDRangeProjection, TDRiskLevel, TDSequential, TDSetup, TEMA, TII, TRIMA, TRIX, TSI, TSV, ThreeInside, ThreeOutside, ThreeSoldiersOrCrows, TradeImbalance, TreynorRatio, TrueRange, TtmSqueeze, Tweezer, TypicalPrice, UlcerIndex, UltimateOscillator, VIDYA, VWAP, VWMA, VZO, ValueArea, ValueAtRisk, Variance, VerticalHorizontalFilter, VoltyStop, VolumeOscillator, VolumePriceTrend, Vortex, VwapStdDevBands, WMA, WaveTrend, WeightedClose, WilliamsAD, WilliamsFractals, WilliamsR, WoodiePivots, YangZhangVolatility, YoyoExit, ZLEMA, ZScore, ZeroLagMACD, ZigZag, installPanicHook, version
9
9
  } from "./wickra_wasm_bg.js";