 kingchencandGitHub
|
ff5a047078
|
feat(derivatives): leverage, OI/volume, perpetual premium, funding APR, OI momentum (B16) (#214)
## B16 Derivatives — five new indicators (488 → 493)
All consume a `DerivativesTick` and emit `f64`:
| Indicator | Reads | Formula |
|-----------|-------|---------|
| `EstimatedLeverageRatio` | open_interest, long_size, short_size | `OI / (long + short)` |
| `OiToVolumeRatio` | open_interest, taker_buy_volume, taker_sell_volume | `OI / (buy + sell)` |
| `PerpetualPremiumIndex` | mark_price, index_price | `(mark − index) / index` |
| `FundingImpliedApr` | funding_rate | `rate × intervals_per_year` |
| `OpenInterestMomentum` | open_interest | `100 · (OI_t − OI_{t−period}) / OI_{t−period}` |
### Wiring
- Core structs + full unit tests (incl. zero-denominator branches).
- Hand-written Python/Node/WASM tick bindings; two new tick helpers (`deriv_oi_long_short`, `deriv_oi_taker`).
- Fuzz drives in `indicator_update_derivatives.rs`; dedicated reference + streaming-vs-batch tests (Python + Node).
- README counter + `docs/README.md` + `FAMILIES` assert bumped to 493.
### Verify (local, all green)
- `cargo test -p wickra-core --lib`: 4028 · `--doc`: 443
- clippy workspace: clean
- node: 563 · pytest: 928
|
2026-06-08 03:33:59 +02:00 |
|
 kingchencandGitHub
|
2d140419bb
|
feat: derivatives basis & calendar-spread indicators (part 3 of 3) (#128)
* feat(derivatives): TermStructureBasis indicator (core)
* feat(derivatives): CalendarSpread indicator (core)
* feat(derivatives): Python, Node and WASM bindings for basis & calendar-spread indicators
* test(derivatives): Python and Node tests for basis & calendar-spread indicators
* docs(derivatives): README row + counter 242->244, CHANGELOG part 3; fuzz basis indicators
|
2026-06-01 22:07:35 +02:00 |
|
 kingchencandGitHub
|
8e5bfd07ce
|
feat: derivatives open-interest, flow & liquidation indicators (part 2 of 3) (#127)
* feat(derivatives): OIPriceDivergence indicator (core)
* feat(derivatives): OIWeighted indicator (core)
* feat(derivatives): LongShortRatio indicator (core)
* feat(derivatives): TakerBuySellRatio indicator (core)
* feat(derivatives): LiquidationFeatures multi-output indicator (core)
* feat(derivatives): Python, Node and WASM bindings for OI, flow & liquidation indicators
* test(derivatives): Python and Node tests for OI, flow & liquidation indicators
* fuzz(derivatives): drive OI, flow & liquidation indicators in derivatives target
* docs(derivatives): README row + counter 237->242, CHANGELOG part 2
|
2026-06-01 21:50:35 +02:00 |
|
 kingchencandGitHub
|
5eb820a9c7
|
feat: derivatives funding & open-interest indicators (part 1 of 3) (#126)
* feat(derivatives): DerivativesTick input type + InvalidDerivatives error
* feat(derivatives): FundingRate indicator (core)
* feat(derivatives): FundingRateMean indicator (core)
* feat(derivatives): FundingRateZScore indicator (core)
* feat(derivatives): FundingBasis indicator (core)
* feat(derivatives): OpenInterestDelta indicator (core)
* feat(derivatives): Python, Node and WASM bindings for funding & OI-delta indicators
* test(derivatives): Python and Node tests for funding & OI-delta indicators
* bench(derivatives): synthetic-tick bench + derivatives fuzz target
* docs(derivatives): README family row + counter 232->237, CHANGELOG entry
|
2026-06-01 21:26:37 +02:00 |
|