wickra 0.4.2 → 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://raw.githubusercontent.com/wickra-lib/.github/main/profile/wickra-banner.webp?v=227" 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 227 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
- 227 streaming-first indicators across seventeen 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,7 +156,7 @@ 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, Signed Volume, Cumulative Volume Delta, Trade Imbalance |
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 |
160
160
  | Market Profile | Value Area (POC / VAH / VAL), Initial Balance, Opening Range |
161
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) |
162
162
 
@@ -237,7 +237,7 @@ A Python live-trading example using the public `websockets` package lives at
237
237
  ```
238
238
  wickra/
239
239
  ├── crates/
240
- │ ├── wickra-core/ core engine + all 227 indicators
240
+ │ ├── wickra-core/ core engine + all 232 indicators
241
241
  │ ├── wickra/ top-level facade crate (publishes on crates.io) + benches/
242
242
  │ └── wickra-data/ CSV reader, tick aggregator, live exchange feeds
243
243
  ├── bindings/
package/index.d.ts CHANGED
@@ -286,6 +286,12 @@ export interface ObSnapshot {
286
286
  askPx: Array<number>
287
287
  askSz: Array<number>
288
288
  }
289
+ /** One price bucket of a footprint. */
290
+ export interface FootprintLevelValue {
291
+ price: number
292
+ bidVol: number
293
+ askVol: number
294
+ }
289
295
  export type SmaNode = SMA
290
296
  export declare class SMA {
291
297
  constructor(period: number)
@@ -2232,6 +2238,15 @@ export declare class QuotedSpread {
2232
2238
  isReady(): boolean
2233
2239
  warmupPeriod(): number
2234
2240
  }
2241
+ export type DepthSlopeNode = DepthSlope
2242
+ export declare class DepthSlope {
2243
+ constructor()
2244
+ update(bidPx: Array<number>, bidSz: Array<number>, askPx: Array<number>, askSz: Array<number>): number | null
2245
+ batch(snapshots: Array<ObSnapshot>): Array<number>
2246
+ reset(): void
2247
+ isReady(): boolean
2248
+ warmupPeriod(): number
2249
+ }
2235
2250
  export type OrderBookImbalanceTopNNode = OrderBookImbalanceTopN
2236
2251
  export declare class OrderBookImbalanceTopN {
2237
2252
  constructor(levels: number)
@@ -2268,6 +2283,42 @@ export declare class TradeImbalance {
2268
2283
  isReady(): boolean
2269
2284
  warmupPeriod(): number
2270
2285
  }
2286
+ export type EffectiveSpreadNode = EffectiveSpread
2287
+ export declare class EffectiveSpread {
2288
+ constructor()
2289
+ update(price: number, size: number, isBuy: boolean, mid: number): number | null
2290
+ batch(price: Array<number>, size: Array<number>, isBuy: Array<boolean>, mid: Array<number>): Array<number>
2291
+ reset(): void
2292
+ isReady(): boolean
2293
+ warmupPeriod(): number
2294
+ }
2295
+ export type RealizedSpreadNode = RealizedSpread
2296
+ export declare class RealizedSpread {
2297
+ constructor(horizon: number)
2298
+ update(price: number, size: number, isBuy: boolean, mid: number): number | null
2299
+ batch(price: Array<number>, size: Array<number>, isBuy: Array<boolean>, mid: Array<number>): Array<number>
2300
+ reset(): void
2301
+ isReady(): boolean
2302
+ warmupPeriod(): number
2303
+ }
2304
+ export type KylesLambdaNode = KylesLambda
2305
+ export declare class KylesLambda {
2306
+ constructor(window: number)
2307
+ update(price: number, size: number, isBuy: boolean, mid: number): number | null
2308
+ batch(price: Array<number>, size: Array<number>, isBuy: Array<boolean>, mid: Array<number>): Array<number>
2309
+ reset(): void
2310
+ isReady(): boolean
2311
+ warmupPeriod(): number
2312
+ }
2313
+ export type FootprintNode = Footprint
2314
+ export declare class Footprint {
2315
+ constructor(tickSize: number)
2316
+ update(price: number, size: number, isBuy: boolean): Array<FootprintLevelValue>
2317
+ batch(price: Array<number>, size: Array<number>, isBuy: Array<boolean>): Array<Array<FootprintLevelValue>>
2318
+ reset(): void
2319
+ isReady(): boolean
2320
+ warmupPeriod(): number
2321
+ }
2271
2322
  export type SharpeRatioNode = SharpeRatio
2272
2323
  export declare class SharpeRatio {
2273
2324
  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, 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, InitialBalance, OpeningRange, Doji, Hammer, InvertedHammer, HangingMan, ShootingStar, Engulfing, Harami, MorningEveningStar, ThreeSoldiersOrCrows, PiercingDarkCloud, Marubozu, Tweezer, SpinningTop, ThreeInside, ThreeOutside, OrderBookImbalanceTop1, OrderBookImbalanceFull, Microprice, QuotedSpread, OrderBookImbalanceTopN, SignedVolume, CumulativeVolumeDelta, TradeImbalance, SharpeRatio, SortinoRatio, CalmarRatio, OmegaRatio, MaxDrawdown, AverageDrawdown, DrawdownDuration, PainIndex, ValueAtRisk, ConditionalValueAtRisk, ProfitFactor, GainLossRatio, RecoveryFactor, KellyCriterion, TreynorRatio, InformationRatio, 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, 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, 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, InitialBalance, OpeningRange, Doji, Hammer, InvertedHammer, HangingMan, ShootingStar, Engulfing, Harami, MorningEveningStar, ThreeSoldiersOrCrows, PiercingDarkCloud, Marubozu, Tweezer, SpinningTop, ThreeInside, ThreeOutside, OrderBookImbalanceTop1, OrderBookImbalanceFull, Microprice, QuotedSpread, DepthSlope, OrderBookImbalanceTopN, SignedVolume, CumulativeVolumeDelta, TradeImbalance, EffectiveSpread, RealizedSpread, KylesLambda, Footprint, SharpeRatio, SortinoRatio, CalmarRatio, OmegaRatio, MaxDrawdown, AverageDrawdown, DrawdownDuration, PainIndex, ValueAtRisk, ConditionalValueAtRisk, ProfitFactor, GainLossRatio, RecoveryFactor, KellyCriterion, TreynorRatio, InformationRatio, Alpha } = nativeBinding
314
314
 
315
315
  module.exports.version = version
316
316
  module.exports.SMA = SMA
@@ -519,10 +519,15 @@ module.exports.OrderBookImbalanceTop1 = OrderBookImbalanceTop1
519
519
  module.exports.OrderBookImbalanceFull = OrderBookImbalanceFull
520
520
  module.exports.Microprice = Microprice
521
521
  module.exports.QuotedSpread = QuotedSpread
522
+ module.exports.DepthSlope = DepthSlope
522
523
  module.exports.OrderBookImbalanceTopN = OrderBookImbalanceTopN
523
524
  module.exports.SignedVolume = SignedVolume
524
525
  module.exports.CumulativeVolumeDelta = CumulativeVolumeDelta
525
526
  module.exports.TradeImbalance = TradeImbalance
527
+ module.exports.EffectiveSpread = EffectiveSpread
528
+ module.exports.RealizedSpread = RealizedSpread
529
+ module.exports.KylesLambda = KylesLambda
530
+ module.exports.Footprint = Footprint
526
531
  module.exports.SharpeRatio = SharpeRatio
527
532
  module.exports.SortinoRatio = SortinoRatio
528
533
  module.exports.CalmarRatio = CalmarRatio
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickra-darwin-arm64",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
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.2",
3
+ "version": "0.4.3",
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.2",
3
+ "version": "0.4.3",
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.2",
3
+ "version": "0.4.3",
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.2",
3
+ "version": "0.4.3",
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.2",
3
+ "version": "0.4.3",
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.2",
3
+ "version": "0.4.3",
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.2",
51
- "wickra-linux-arm64-gnu": "0.4.2",
52
- "wickra-darwin-x64": "0.4.2",
53
- "wickra-darwin-arm64": "0.4.2",
54
- "wickra-win32-x64-msvc": "0.4.2",
55
- "wickra-win32-arm64-msvc": "0.4.2"
50
+ "wickra-linux-x64-gnu": "0.4.3",
51
+ "wickra-linux-arm64-gnu": "0.4.3",
52
+ "wickra-darwin-x64": "0.4.3",
53
+ "wickra-darwin-arm64": "0.4.3",
54
+ "wickra-win32-x64-msvc": "0.4.3",
55
+ "wickra-win32-arm64-msvc": "0.4.3"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "napi build --platform --release",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file