@pond-ts/process 0.66.0 → 0.67.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/API.md +136 -114
- package/CHANGELOG.md +160 -1
- package/package.json +2 -2
package/API.md
CHANGED
|
@@ -30,7 +30,7 @@ next door is the point.
|
|
|
30
30
|
| `packages/core` | `pond-ts` | `.` and `./types` (zero-runtime schema contract) | `website/docs/pond-ts/` |
|
|
31
31
|
| `packages/react` | `@pond-ts/react` | `.` | `website/docs/react/` |
|
|
32
32
|
| `packages/charts` | `@pond-ts/charts` | `.` | `website/docs/charts/` |
|
|
33
|
-
| `packages/financial` | `@pond-ts/financial` |
|
|
33
|
+
| `packages/financial` | `@pond-ts/financial` | `.`, `./fluent` (prototype augmentation), `./catalog` | `website/docs/financial/` |
|
|
34
34
|
| `packages/fit` | `@pond-ts/fit` | `.` | `website/docs/fit/` |
|
|
35
35
|
| `packages/process` | `@pond-ts/process` | `.` and `./pool` (Node worker pool) — **experimental** | `website/docs/process/` |
|
|
36
36
|
|
|
@@ -441,112 +441,117 @@ study whose centre line is the caller's own field
|
|
|
441
441
|
appends only the bands (`atrBands`: no `Middle`), since the middle is already
|
|
442
442
|
on the series.
|
|
443
443
|
|
|
444
|
-
| Study | Output column(s) | Options gist
|
|
445
|
-
| --------------------------- | -------------------------------------------------------------------------- |
|
|
446
|
-
| `sma` | `sma` | `{ period, column?, output? }`
|
|
447
|
-
| `ema` | `ema` | `{ period, column?, output? }` (α = 2/(period+1))
|
|
448
|
-
| `movingAverage` | `ma` | `{ period, type?, column?, output? }` — the shared `MaType` menu (default `'sma'`)
|
|
449
|
-
| `bollinger` | `bbMiddle`, `bbUpper`, `bbLower` | `{ period, stdDev?, column?, prefix? }`
|
|
450
|
-
| `envelope` | `envMiddle`, `envUpper`, `envLower` | `{ period, percent?, maType?, column?, prefix? }`
|
|
451
|
-
| `rollingStdev` | `stdev` | `{ period, column?, output? }` (population, ddof=0)
|
|
452
|
-
| `rollingMin` / `rollingMax` | `min` / `max` | `{ period, column?, output? }` (one edge; `donchian` gives the channel)
|
|
453
|
-
| `rollingPercentile` | `p{q}` (e.g. `p90`) | `{ period, q, column?, output? }`
|
|
454
|
-
| `zScore` | `zscore` | `{ period, column?, output? }`
|
|
455
|
-
| `percentChange` | `pctChange` | `{ periods?, column?, output? }` (= ROC; TA-Lib-verified)
|
|
456
|
-
| `rsi` | `rsi` | `{ period?, column?, output? }` (Wilder, default 14)
|
|
457
|
-
| `macd` | `macdLine`, `macdSignal`, `macdHist` | `{ fastPeriod?, slowPeriod?, signalPeriod?, column?, prefix? }` (12/26/9)
|
|
458
|
-
| `atr` | `atr` | `{ period?, high?, low?, close?, output? }` (Wilder, default 14)
|
|
459
|
-
| `momentum` | `momentum` | `{ period?, column?, output? }` (`v − v[−period]`, default 10)
|
|
460
|
-
| `historicalVolatility` | `hv` | `{ period?, annualize?, column?, output? }` (σ of log returns, ×√252)
|
|
461
|
-
| `stochastic` | `stochK`, `stochD` | `{ kPeriod?, slowing?, dPeriod?, high?, low?, close?, prefix? }` (14/3/3; `slowing: 1` = fast)
|
|
462
|
-
| `williamsR` | `williamsR` | `{ period?, high?, low?, close?, output? }` (default 14, bounded −100..0)
|
|
463
|
-
| `donchian` | `dcUpper`, `dcLower`, `dcMiddle` | `{ period?, high?, low?, prefix? }` (default 20)
|
|
464
|
-
| `obv` | `obv` | `{ close?, volume?, output? }` (no period; TA-Lib seed `volume[0]`)
|
|
465
|
-
| `vwap` | `vwap` | `{ period, high?, low?, close?, volume?, output? }` (rolling, typical px)
|
|
466
|
-
| `keltner` | `kcMiddle`, `kcUpper`, `kcLower` | `{ period?, atrPeriod?, multiplier?, maType?, high?, low?, close?, prefix? }` (modern variant: EMA(20) of typical price ± 2·ATR(10))
|
|
467
|
-
| `atrBands` | `atrbUpper`, `atrbLower` | `{ period?, multiplier?, column?, high?, low?, close?, prefix? }` (14/2; **no middle** — it is `column`)
|
|
468
|
-
| `qstick` | `qstick` | `{ period?, maType?, open?, close?, output? }` (MA of `close − open`, default 8/sma)
|
|
469
|
-
| `trix` | `trix`, `trixSignal` | `{ period?, signalPeriod?, column?, prefix? }` (1-bar % ROC of EMA³, 15/9; the line takes the prefix itself)
|
|
470
|
-
| `coppock` | `coppock` | `{ longPeriod?, shortPeriod?, wmaPeriod?, column?, output? }` (WMA of ROC₁₄+ROC₁₁, 14/11/10 — monthly by convention)
|
|
471
|
-
| `priceOscillator` | `priceOsc` | `{ fastPeriod?, slowPeriod?, maType?, mode?, column?, output? }` (12/26/ema, percent = PPO, `mode: 'absolute'` = APO)
|
|
472
|
-
| `disparityIndex` | `disparity` | `{ period?, maType?, column?, output? }` (`100·(price − MA)/MA`, default 14/sma)
|
|
473
|
-
| `detrendedPriceOscillator` | `dpo` | `{ period?, maType?, column?, output? }` (`price − MA[i − ⌊period/2⌋−1]`, default 20/sma)
|
|
474
|
-
| `elderRay` | `elderBull`, `elderBear` | `{ period?, high?, low?, close?, prefix? }` (`high/low − EMA(close)`, default 13)
|
|
475
|
-
| `awesomeOscillator` | `ao` | `{ fastPeriod?, slowPeriod?, high?, low?, output? }` (SMA 5 − SMA 34 of `(high+low)/2`)
|
|
476
|
-
| `accumulationDistribution` | `ad` | `{ high?, low?, close?, volume?, output? }` (no period; cumulative CLV·volume, = TA-Lib `AD`)
|
|
477
|
-
| `chaikinOscillator` | `chaikinOsc` | `{ fastPeriod?, slowPeriod?, high?, low?, close?, volume?, output? }` (EMA 3 − EMA 10 of A/D, = TA-Lib `ADOSC`)
|
|
478
|
-
| `priceVolumeTrend` | `pvt` | `{ close?, volume?, output? }` (no period; cumulative fractional-change·volume; bar 0 undefined)
|
|
479
|
-
| `chaikinMoneyFlow` | `cmf` | `{ period?, high?, low?, close?, volume?, output? }` (Σ CLV·vol / Σ vol over 20, bounded −1..+1)
|
|
480
|
-
| `moneyFlowIndex` | `mfi` | `{ period?, high?, low?, close?, volume?, output? }` (RSI form on typical-price·volume, default 14, = TA-Lib `MFI`)
|
|
481
|
-
| `forceIndex` | `force` | `{ period?, close?, volume?, output? }` (EMA of Δclose·volume, Elder's 13; `period: 1` is the raw force)
|
|
482
|
-
| `easeOfMovement` | `eom` | `{ period?, maType?, scale?, high?, low?, volume?, output? }` (Arms' box ratio, 14/sma/1e8; quadratic in price)
|
|
483
|
-
| `volumeOscillator` | `volOsc` | `{ fastPeriod?, slowPeriod?, maType?, volume?, output? }` (5/10/sma; `priceOscillator` percent-mode over volume)
|
|
484
|
-
| `chandeMomentum` | `cmo` | `{ period?, column?, output? }` (Chande's **unsmoothed** up/down sums, default 14 — _not_ TA-Lib's CMO, which is `2·rsi − 100`)
|
|
485
|
-
| `ultimateOscillator` | `uo` | `{ shortPeriod?, mediumPeriod?, longPeriod?, high?, low?, close?, output? }` (7/14/28 weighted 4/2/1; TA-Lib `ULTOSC`)
|
|
486
|
-
| `commodityChannelIndex` | `cci` | `{ period?, high?, low?, close?, output? }` (`(tp − SMA)/(0.015 · meanAbsDev)`, default 20; TA-Lib `CCI`)
|
|
487
|
-
| `intradayMomentumIndex` | `imi` | `{ period?, open?, close?, output? }` (RSI's form over `close − open`, **plain** sums, default 14)
|
|
488
|
-
| `relativeVigorIndex` | `rvi`, `rviSignal` | `{ period?, open?, high?, low?, close?, prefix? }` (SWMA `(1,2,2,1)/6` body/range sums + SWMA signal, default 10)
|
|
489
|
-
| `psychologicalLine` | `psy` | `{ period?, column?, output? }` (percent of **up** closes, strict `>`, default 12)
|
|
490
|
-
| `directionalMovement` | `dmiPlusDi`, `dmiMinusDi`, `dmiDx`, `dmiAdx`, `dmiAdxr` | `{ period?, high?, low?, close?, prefix? }` (Wilder's DMS — `+DI`/`−DI`/`DX`/`ADX`/`ADXR`, default 14; per-column warm-up; Wilder's seed, so a decaying transient vs TA-Lib)
|
|
491
|
-
| `aroon` | `aroonUp`, `aroonDown`, `aroonOsc` | `{ period?, high?, low?, prefix? }` (`100·(period − bars since extreme)/period` over a **`period + 1`**-bar window, default 25; = TA-Lib `AROON`/`AROONOSC`)
|
|
492
|
-
| `vortex` | `viPlus`, `viMinus` | `{ period?, high?, low?, close?, prefix? }` (`Σ\|H − prevL\| / Σ TR` and `Σ\|L − prevH\| / Σ TR`, default 14; positive, not bounded by 1)
|
|
493
|
-
| `chaikinVolatility` | `chaikinVol` | `{ period?, rocPeriod?, high?, low?, output? }` (percent ROC of EMA(`high − low`), 10/10; **plain** range)
|
|
494
|
-
| `massIndex` | `mass` | `{ emaPeriod?, sumPeriod?, high?, low?, output? }` (Σ EMA(range)/EMA² over 25, Dorsey's 9/25; a **sum**, reads ≈ `sumPeriod`)
|
|
495
|
-
| `choppinessIndex` | `chop` | `{ period?, high?, low?, close?, output? }` (`100·log10(ΣTR/(HH−LL))/log10(period)`, default 14, bounded 0..100; `period ≥ 2`)
|
|
496
|
-
| `ulcerIndex` | `ulcer` | `{ period?, column?, output? }` (RMS % drawdown from the rolling peak, StockCharts' rolling form, default 14; warm-up `2·period−2`)
|
|
497
|
-
| `verticalHorizontalFilter` | `vhf` | `{ period?, column?, output? }` ((HH−LL)/Σ\|Δcolumn\| over 28, Adam White's; a **fraction** in (0, 1], warm-up `period`)
|
|
498
|
-
| `gopalakrishnanRangeIndex` | `gapo` | `{ period?, high?, low?, output? }` (`ln(HH−LL)/ln(period)` = log base `period` of the range, default 10; `period ≥ 2`)
|
|
499
|
-
| `relativeVolatilityIndex` | `relVol` | `{ period?, stdevPeriod?, column?, output? }` (RSI's form on σ, Wilder-smoothed, Dorsey's 14/10 — **not** `rvi`, see below)
|
|
500
|
-
| `linearRegression` | `linregValue`, `linregSlope`, `linregIntercept`, `linregAngle`, `linregR2` | `{ period?, column?, prefix? }` (one rolling OLS fit against the bar index, default 14, `period ≥ 2`; `Value` = TA-Lib `LINEARREG`, `Intercept` = the fit at the window's **first** bar, `Angle` = degrees and **scale-dependent**)
|
|
501
|
-
| `timeSeriesForecast` | `tsf` | `{ period?, column?, output? }` (the same fit one bar **past** the window, default 14; = TA-Lib `TSF`; deliberately not a `MaType`)
|
|
502
|
-
| `chandeForecastOscillator` | `cfo` | `{ period?, column?, output? }` (`100·(price − TSF)/price`, default 14; scale-invariant, **not** shift-invariant)
|
|
503
|
-
| `centerOfGravity` | `cog` | `{ period?, column?, output? }` (Ehlers' position-weighted balance point, default 10; **negative**, in `[−period, −1]` on positive prices, flat reads `−(period+1)/2` — TradingView's uncentred convention)
|
|
504
|
-
| `correlation` | `corr` | `{ period?, column?, benchmark, output? }` (Pearson r of two columns over 30 bars, = TA-Lib `CORREL`; `benchmark` is a **column on the same joined series**, required)
|
|
505
|
-
| `beta` | `beta` | `{ period?, column?, benchmark, output? }` (slope of `column`'s 1-bar returns on `benchmark`'s over 5 bars, = TA-Lib `BETA(benchmark, column)`; pass **prices**, returns taken inside)
|
|
506
|
-
| `priceRelative` | `priceRel` | `{ column?, benchmark, output? }` (`column / benchmark`, no period — ChartIQ's Price Relative / Relative Strength **comparative**; not `rsi`)
|
|
507
|
-
| `performanceIndex` | `perf` | `{ period?, column?, benchmark, output? }` (each side's own `period`-bar growth, divided; 1 = parity, default 20; `(x−1)·100` == `percentChange(priceRelative)`)
|
|
508
|
-
| `guppy` | `gmmaS3`…`gmmaS15`, `gmmaL30`…`gmmaL60` | `{ column?, type?, prefix? }` (Guppy's GMMA — the **fixed** twelve averages, short 3/5/8/10/12/15, long 30/35/40/45/50/60, default `ema`; the lists ship as `GUPPY_SHORT_PERIODS` / `GUPPY_LONG_PERIODS`)
|
|
509
|
-
| `rainbow` | `rainbow1`…`rainbow10` | `{ column?, period?, type?, prefix? }` (Widner's Rainbow — ten **recursive** averages, each smoothing the previous; default period 2 / `sma`; stage `k` warms up at `k·(period−1)`)
|
|
510
|
-
| `rainbowOscillator` | `rbo`, `rboUpper`, `rboLower` | `{ column?, period?, lookback?, type?, prefix? }` (ChartIQ's — `100·(price − mean of the ten)/(HH−LL)` with the stack's own width as mirrored bands; default 2 / 10)
|
|
511
|
-
| `kst` | `kst`, `kstSignal` | `{ column?, signalPeriod?, prefix? }` (Pring's Know Sure Thing — ROC 10/15/20/30 smoothed 10/10/10/15, weighted 1/2/3/4; the twelve numbers are **not** options, only the signal SMA is, default 9)
|
|
512
|
-
| `priceMomentumOscillator` | `pmo`, `pmoSignal` | `{ column?, prefix? }` (DecisionPoint's PMO — two stages of **custom** `α = 2/n` smoothing over a 1-bar percent ROC, ×10, with a **span** EMA(10) signal; no period options)
|
|
513
|
-
| `stochasticRsi` | `stochRsiK`, `stochRsiD` | `{ column?, rsiPeriod?, stochPeriod?, kPeriod?, dPeriod?, prefix? }` (the stochastic construction over the RSI, 14/14/3/3; `stochRsiK` == TA-Lib `STOCHRSI`'s **fastd**, `stochRsiD` has no TA-Lib counterpart)
|
|
514
|
-
| `trueStrengthIndex` | `tsi`, `tsiSignal` | `{ column?, longPeriod?, shortPeriod?, signalPeriod?, prefix? }` (Blau's TSI — `100·EMA(EMA(Δ,long),short)/EMA(EMA(\|Δ\|,long),short)`, 25/13/7; bounded −100…100, long applied **first**)
|
|
515
|
-
| `movingAverageDeviation` | `maDev` | `{ period?, maType?, column?, output? }` (`price − MA`, in **price units**, default 20/sma — the points half of the pair whose percent half IS `disparityIndex`; no `mode` flag)
|
|
516
|
-
| `parabolicSar` | `psar`, `psarTrend` | `{ step?, maxStep?, high?, low?, prefix? }` (Wilder's stop-and-reverse, defaults 0.02 / 0.2; **= TA-Lib `SAR` exactly**; `Trend` is `+1` long / `−1` short — the stop can print ON an extreme, so the side is not derivable from the value)
|
|
517
|
-
| `superTrend` | `st`, `stTrend` | `{ period?, multiplier?, high?, low?, close?, prefix? }` (Seban's ratcheting ATR band as TradingView's `ta.supertrend`, defaults 10 / 3; `st` **is** the live band, so the bands are not emitted; the seed side is DOWN)
|
|
518
|
-
| `atrTrailingStop` | `ats`, `atsTrend` | `{ period?, multiplier?, high?, low?, close?, prefix? }` (close-anchored ratcheting stop, Vervoort's, defaults 14 / 3; a close exactly ON the stop flips **short**; the Chandelier anchor is `donchian` + `atr`, not a knob)
|
|
519
|
-
| `negativeVolumeIndex` | `nvi` | `{ column?, volume?, output?, start? }` (Fosback: compound the close return only on a **lower**-volume bar, base 1000; no period, no warm-up; a **flat** volume holds on both indices)
|
|
520
|
-
| `positiveVolumeIndex` | `pvi` | `{ column?, volume?, output?, start? }` (the same on a **higher**-volume bar)
|
|
521
|
-
| `klinger` | `kvo`, `kvoSignal` | `{ fastPeriod?, slowPeriod?, signalPeriod?, high?, low?, close?, volume?, prefix? }` (Klinger's ORIGINAL volume force through an EMA pair, defaults 34 / 55 / 13; **F-AMBIG** — TradingView's simplified `ta.kvo` is a different indicator)
|
|
522
|
-
| `typicalPrice` | `typicalPrice` | `{ high?, low?, close?, output? }` (`(h+l+c)/3` = TA-Lib `TYPPRICE`, exact; **no warm-up**)
|
|
523
|
-
| `medianPrice` | `medianPrice` | `{ high?, low?, output? }` (`(h+l)/2` = `MEDPRICE`, exact; `close` on the shared options type is ignored)
|
|
524
|
-
| `weightedClose` | `weightedClose` | `{ high?, low?, close?, output? }` (`(h+l+2c)/4` = `WCLPRICE`, exact)
|
|
525
|
-
| `averagePrice` | `averagePrice` | `{ open?, high?, low?, close?, output? }` (`(o+h+l+c)/4` = `AVGPRICE`, exact — the only transform that reads the open)
|
|
526
|
-
| `balanceOfPower` | `bop` | `{ period?, maType?, open?, high?, low?, close?, output? }` (`(c−o)/(h−l)`, bounded −1…1; **raw by default** = TA-Lib `BOP` exact, `period` gives ChartIQ's smoothed form; a flat bar is `0`; `maType` without `period` throws)
|
|
527
|
-
| `starcBands` | `starcMiddle`, `starcUpper`, `starcLower` | `{ period?, atrPeriod?, multiplier?, maType?, high?, low?, close?, prefix? }` (Stoller: MA(**close**) ± mult·ATR, 20 / 15 / 2 / sma — the close-centred sibling of `keltner`'s typical-price centre)
|
|
528
|
-
| `highLowBands` | `hlbMiddle`, `hlbUpper`, `hlbLower` | `{ period?, percent?, maType?, high?, low?, prefix? }` (MA(**median price**) × (1 ± percent%), 10 / 1% / trima; it **is** `envelope` over a `medianPrice` column — same `percent`, same units; ChartIQ labels the knob "shift")
|
|
529
|
-
| `bollingerBandwidth` | `bbWidth` | `{ period?, stdDev?, column?, output? }` (`100·(upper − lower)/middle`, 20 / 2 — the **×100** StockCharts form; a flat window is `0`, not missing; a zero-centre window — flat at zero or zero-mean — is missing)
|
|
530
|
-
| `bollingerPercentB` | `percentB` | `{ period?, stdDev?, column?, output? }` (`(price − lower)/(upper − lower)`, 20 / 2 — the **decimal** form, unbounded; a flat window is a genuine `0/0` → missing)
|
|
531
|
-
| `primeNumberBands` | `pnbUpper`, `pnbLower` | `{ high?, low?, prefix? }` (smallest prime ≥ high / largest ≤ low — a step function of the price LEVEL, no warm-up; a price below 2 is outside the domain; cost grows with price magnitude)
|
|
532
|
-
| `primeNumberOscillator` | `pno` | `{ column?, output? }` (`price − nearestPrime(price)`, signed; a tie goes to the **lower** prime; no warm-up; neither scale- nor shift-invariant)
|
|
533
|
-
| `marketFacilitationIndex` | `bwmfi` | `{ high?, low?, volume?, output? }` (Bill Williams' `(h−l)/volume`, raw — **`bwmfi`, not `mfi`**, which `moneyFlowIndex` owns; zero volume → missing, flat bar → `0`)
|
|
534
|
-
| `twiggsMoneyFlow` | `tmf` | `{ period?, high?, low?, close?, volume?, output? }` (Twiggs: CMF rebuilt on the **true** range and Wilder-smoothed, default 21; bounded −1…1; **F-AMBIG** — the window-sum form is 0.0706 away; warm-up `period`, and an interior gap ends it)
|
|
535
|
-
| `tradeVolumeIndex` | `tvi` | `{ minTick, column?, volume?, output? }` (tick-direction accumulation; `minTick` — the instrument's minimum tick — is **required**; an undecided bar keeps the LAST direction, no first direction is invented, base 0, no warm-up; an interior gap **ends** the level, `obv`'s rule)
|
|
536
|
-
| `shinoharaIntensityRatio` | `sirStrong`, `sirWeak` | `{ period?, open?, high?, low?, close?, prefix? }` (Shinohara's A and B ratios, `100·Σup/Σdown` over 26 bars — A against the bar's own open, B against the previous close; **F-AMBIG** on which is charted "strong"; neither is bounded and B inverts on a gappy tape; per-column warm-up 25 / 26)
|
|
537
|
-
| `elderImpulse` | `impulse` | `{ emaPeriod?, fastPeriod?, slowPeriod?, signalPeriod?, column?, output? }` (Elder: `+1` when EMA(13) **and** the MACD histogram both rise, `−1` when both fall, `0` otherwise — a **numeric** column, `withColumn` has no string door; ties are `0`; warm-up 34)
|
|
538
|
-
| `movingAverageCross` | `maCross` | `{ fastPeriod?, slowPeriod?, maType?, column?, output? }` (a **signal** column: `+1` on the bar the fast MA crosses above the slow, `−1` below, `0` otherwise — the averages themselves are `movingAverage`'s; an exact tie is no cross and a touch-and-retreat is no cross; `maType`, not `type`; warm-up `slowPeriod`)
|
|
539
|
-
| `anchoredVwap` | `avwap` | `{ anchor, high?, low?, close?, volume?, output? }` (cumulative `Σ tp·vol / Σ vol` from the first bar **at or after** `anchor` — a `Date` or epoch ms, **required**; earlier bars `undefined`; an interior gap ends the line, `obv`'s rule; the session-reset form
|
|
540
|
-
| `
|
|
541
|
-
| `
|
|
542
|
-
| `
|
|
543
|
-
| `
|
|
544
|
-
| `
|
|
545
|
-
| `
|
|
546
|
-
| `
|
|
547
|
-
| `
|
|
548
|
-
| `
|
|
549
|
-
| `
|
|
444
|
+
| Study | Output column(s) | Options gist | Source |
|
|
445
|
+
| --------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
446
|
+
| `sma` | `sma` | `{ period, column?, output? }` | `packages/financial/src/studies/moving-average.ts` |
|
|
447
|
+
| `ema` | `ema` | `{ period, column?, output? }` (α = 2/(period+1)) | `packages/financial/src/studies/moving-average.ts` |
|
|
448
|
+
| `movingAverage` | `ma` | `{ period, type?, column?, output? }` — the shared `MaType` menu (default `'sma'`) | `packages/financial/src/studies/moving-average.ts` |
|
|
449
|
+
| `bollinger` | `bbMiddle`, `bbUpper`, `bbLower` | `{ period, stdDev?, column?, prefix? }` | `packages/financial/src/studies/bollinger.ts` |
|
|
450
|
+
| `envelope` | `envMiddle`, `envUpper`, `envLower` | `{ period, percent?, maType?, column?, prefix? }` | `packages/financial/src/studies/envelope.ts` |
|
|
451
|
+
| `rollingStdev` | `stdev` | `{ period, column?, output? }` (population, ddof=0) | `packages/financial/src/studies/rolling-stat.ts` |
|
|
452
|
+
| `rollingMin` / `rollingMax` | `min` / `max` | `{ period, column?, output? }` (one edge; `donchian` gives the channel) | `packages/financial/src/studies/rolling-stat.ts` |
|
|
453
|
+
| `rollingPercentile` | `p{q}` (e.g. `p90`) | `{ period, q, column?, output? }` | `packages/financial/src/studies/rolling-stat.ts` |
|
|
454
|
+
| `zScore` | `zscore` | `{ period, column?, output? }` | `packages/financial/src/studies/z-score.ts` |
|
|
455
|
+
| `percentChange` | `pctChange` | `{ periods?, column?, output? }` (= ROC; TA-Lib-verified) | `packages/financial/src/studies/percent-change.ts` |
|
|
456
|
+
| `rsi` | `rsi` | `{ period?, column?, output? }` (Wilder, default 14) | `packages/financial/src/studies/rsi.ts` |
|
|
457
|
+
| `macd` | `macdLine`, `macdSignal`, `macdHist` | `{ fastPeriod?, slowPeriod?, signalPeriod?, column?, prefix? }` (12/26/9) | `packages/financial/src/studies/macd.ts` |
|
|
458
|
+
| `atr` | `atr` | `{ period?, high?, low?, close?, output? }` (Wilder, default 14) | `packages/financial/src/studies/atr.ts` |
|
|
459
|
+
| `momentum` | `momentum` | `{ period?, column?, output? }` (`v − v[−period]`, default 10) | `packages/financial/src/studies/momentum.ts` |
|
|
460
|
+
| `historicalVolatility` | `hv` | `{ period?, annualize?, column?, output? }` (σ of log returns, ×√252) | `packages/financial/src/studies/volatility.ts` |
|
|
461
|
+
| `stochastic` | `stochK`, `stochD` | `{ kPeriod?, slowing?, dPeriod?, high?, low?, close?, prefix? }` (14/3/3; `slowing: 1` = fast) | `packages/financial/src/studies/stochastic.ts` |
|
|
462
|
+
| `williamsR` | `williamsR` | `{ period?, high?, low?, close?, output? }` (default 14, bounded −100..0) | `packages/financial/src/studies/williams-r.ts` |
|
|
463
|
+
| `donchian` | `dcUpper`, `dcLower`, `dcMiddle` | `{ period?, high?, low?, prefix? }` (default 20) | `packages/financial/src/studies/donchian.ts` |
|
|
464
|
+
| `obv` | `obv` | `{ close?, volume?, output? }` (no period; TA-Lib seed `volume[0]`) | `packages/financial/src/studies/obv.ts` |
|
|
465
|
+
| `vwap` | `vwap` | `{ period, high?, low?, close?, volume?, output? }` (rolling, typical px) | `packages/financial/src/studies/vwap.ts` |
|
|
466
|
+
| `keltner` | `kcMiddle`, `kcUpper`, `kcLower` | `{ period?, atrPeriod?, multiplier?, maType?, high?, low?, close?, prefix? }` (modern variant: EMA(20) of typical price ± 2·ATR(10)) | `packages/financial/src/studies/keltner.ts` |
|
|
467
|
+
| `atrBands` | `atrbUpper`, `atrbLower` | `{ period?, multiplier?, column?, high?, low?, close?, prefix? }` (14/2; **no middle** — it is `column`) | `packages/financial/src/studies/atr-bands.ts` |
|
|
468
|
+
| `qstick` | `qstick` | `{ period?, maType?, open?, close?, output? }` (MA of `close − open`, default 8/sma) | `packages/financial/src/studies/qstick.ts` |
|
|
469
|
+
| `trix` | `trix`, `trixSignal` | `{ period?, signalPeriod?, column?, prefix? }` (1-bar % ROC of EMA³, 15/9; the line takes the prefix itself) | `packages/financial/src/studies/trix.ts` |
|
|
470
|
+
| `coppock` | `coppock` | `{ longPeriod?, shortPeriod?, wmaPeriod?, column?, output? }` (WMA of ROC₁₄+ROC₁₁, 14/11/10 — monthly by convention) | `packages/financial/src/studies/coppock.ts` |
|
|
471
|
+
| `priceOscillator` | `priceOsc` | `{ fastPeriod?, slowPeriod?, maType?, mode?, column?, output? }` (12/26/ema, percent = PPO, `mode: 'absolute'` = APO) | `packages/financial/src/studies/price-oscillator.ts` |
|
|
472
|
+
| `disparityIndex` | `disparity` | `{ period?, maType?, column?, output? }` (`100·(price − MA)/MA`, default 14/sma) | `packages/financial/src/studies/disparity-index.ts` |
|
|
473
|
+
| `detrendedPriceOscillator` | `dpo` | `{ period?, maType?, column?, output? }` (`price − MA[i − ⌊period/2⌋−1]`, default 20/sma) | `packages/financial/src/studies/detrended-price-oscillator.ts` |
|
|
474
|
+
| `elderRay` | `elderBull`, `elderBear` | `{ period?, high?, low?, close?, prefix? }` (`high/low − EMA(close)`, default 13) | `packages/financial/src/studies/elder-ray.ts` |
|
|
475
|
+
| `awesomeOscillator` | `ao` | `{ fastPeriod?, slowPeriod?, high?, low?, output? }` (SMA 5 − SMA 34 of `(high+low)/2`) | `packages/financial/src/studies/awesome-oscillator.ts` |
|
|
476
|
+
| `accumulationDistribution` | `ad` | `{ high?, low?, close?, volume?, output? }` (no period; cumulative CLV·volume, = TA-Lib `AD`) | `packages/financial/src/studies/accumulation-distribution.ts` |
|
|
477
|
+
| `chaikinOscillator` | `chaikinOsc` | `{ fastPeriod?, slowPeriod?, high?, low?, close?, volume?, output? }` (EMA 3 − EMA 10 of A/D, = TA-Lib `ADOSC`) | `packages/financial/src/studies/chaikin-oscillator.ts` |
|
|
478
|
+
| `priceVolumeTrend` | `pvt` | `{ close?, volume?, output? }` (no period; cumulative fractional-change·volume; bar 0 undefined) | `packages/financial/src/studies/price-volume-trend.ts` |
|
|
479
|
+
| `chaikinMoneyFlow` | `cmf` | `{ period?, high?, low?, close?, volume?, output? }` (Σ CLV·vol / Σ vol over 20, bounded −1..+1) | `packages/financial/src/studies/chaikin-money-flow.ts` |
|
|
480
|
+
| `moneyFlowIndex` | `mfi` | `{ period?, high?, low?, close?, volume?, output? }` (RSI form on typical-price·volume, default 14, = TA-Lib `MFI`) | `packages/financial/src/studies/money-flow-index.ts` |
|
|
481
|
+
| `forceIndex` | `force` | `{ period?, close?, volume?, output? }` (EMA of Δclose·volume, Elder's 13; `period: 1` is the raw force) | `packages/financial/src/studies/force-index.ts` |
|
|
482
|
+
| `easeOfMovement` | `eom` | `{ period?, maType?, scale?, high?, low?, volume?, output? }` (Arms' box ratio, 14/sma/1e8; quadratic in price) | `packages/financial/src/studies/ease-of-movement.ts` |
|
|
483
|
+
| `volumeOscillator` | `volOsc` | `{ fastPeriod?, slowPeriod?, maType?, volume?, output? }` (5/10/sma; `priceOscillator` percent-mode over volume) | `packages/financial/src/studies/volume-oscillator.ts` |
|
|
484
|
+
| `chandeMomentum` | `cmo` | `{ period?, column?, output? }` (Chande's **unsmoothed** up/down sums, default 14 — _not_ TA-Lib's CMO, which is `2·rsi − 100`) | `packages/financial/src/studies/chande-momentum.ts` |
|
|
485
|
+
| `ultimateOscillator` | `uo` | `{ shortPeriod?, mediumPeriod?, longPeriod?, high?, low?, close?, output? }` (7/14/28 weighted 4/2/1; TA-Lib `ULTOSC`) | `packages/financial/src/studies/ultimate-oscillator.ts` |
|
|
486
|
+
| `commodityChannelIndex` | `cci` | `{ period?, high?, low?, close?, output? }` (`(tp − SMA)/(0.015 · meanAbsDev)`, default 20; TA-Lib `CCI`) | `packages/financial/src/studies/commodity-channel-index.ts` |
|
|
487
|
+
| `intradayMomentumIndex` | `imi` | `{ period?, open?, close?, output? }` (RSI's form over `close − open`, **plain** sums, default 14) | `packages/financial/src/studies/intraday-momentum-index.ts` |
|
|
488
|
+
| `relativeVigorIndex` | `rvi`, `rviSignal` | `{ period?, open?, high?, low?, close?, prefix? }` (SWMA `(1,2,2,1)/6` body/range sums + SWMA signal, default 10) | `packages/financial/src/studies/relative-vigor-index.ts` |
|
|
489
|
+
| `psychologicalLine` | `psy` | `{ period?, column?, output? }` (percent of **up** closes, strict `>`, default 12) | `packages/financial/src/studies/psychological-line.ts` |
|
|
490
|
+
| `directionalMovement` | `dmiPlusDi`, `dmiMinusDi`, `dmiDx`, `dmiAdx`, `dmiAdxr` | `{ period?, high?, low?, close?, prefix? }` (Wilder's DMS — `+DI`/`−DI`/`DX`/`ADX`/`ADXR`, default 14; per-column warm-up; Wilder's seed, so a decaying transient vs TA-Lib) | `packages/financial/src/studies/directional-movement.ts` |
|
|
491
|
+
| `aroon` | `aroonUp`, `aroonDown`, `aroonOsc` | `{ period?, high?, low?, prefix? }` (`100·(period − bars since extreme)/period` over a **`period + 1`**-bar window, default 25; = TA-Lib `AROON`/`AROONOSC`) | `packages/financial/src/studies/aroon.ts` |
|
|
492
|
+
| `vortex` | `viPlus`, `viMinus` | `{ period?, high?, low?, close?, prefix? }` (`Σ\|H − prevL\| / Σ TR` and `Σ\|L − prevH\| / Σ TR`, default 14; positive, not bounded by 1) | `packages/financial/src/studies/vortex.ts` |
|
|
493
|
+
| `chaikinVolatility` | `chaikinVol` | `{ period?, rocPeriod?, high?, low?, output? }` (percent ROC of EMA(`high − low`), 10/10; **plain** range) | `packages/financial/src/studies/chaikin-volatility.ts` |
|
|
494
|
+
| `massIndex` | `mass` | `{ emaPeriod?, sumPeriod?, high?, low?, output? }` (Σ EMA(range)/EMA² over 25, Dorsey's 9/25; a **sum**, reads ≈ `sumPeriod`) | `packages/financial/src/studies/mass-index.ts` |
|
|
495
|
+
| `choppinessIndex` | `chop` | `{ period?, high?, low?, close?, output? }` (`100·log10(ΣTR/(HH−LL))/log10(period)`, default 14, bounded 0..100; `period ≥ 2`) | `packages/financial/src/studies/choppiness-index.ts` |
|
|
496
|
+
| `ulcerIndex` | `ulcer` | `{ period?, column?, output? }` (RMS % drawdown from the rolling peak, StockCharts' rolling form, default 14; warm-up `2·period−2`) | `packages/financial/src/studies/ulcer-index.ts` |
|
|
497
|
+
| `verticalHorizontalFilter` | `vhf` | `{ period?, column?, output? }` ((HH−LL)/Σ\|Δcolumn\| over 28, Adam White's; a **fraction** in (0, 1], warm-up `period`) | `packages/financial/src/studies/vertical-horizontal-filter.ts` |
|
|
498
|
+
| `gopalakrishnanRangeIndex` | `gapo` | `{ period?, high?, low?, output? }` (`ln(HH−LL)/ln(period)` = log base `period` of the range, default 10; `period ≥ 2`) | `packages/financial/src/studies/gopalakrishnan-range-index.ts` |
|
|
499
|
+
| `relativeVolatilityIndex` | `relVol` | `{ period?, stdevPeriod?, column?, output? }` (RSI's form on σ, Wilder-smoothed, Dorsey's 14/10 — **not** `rvi`, see below) | `packages/financial/src/studies/relative-volatility-index.ts` |
|
|
500
|
+
| `linearRegression` | `linregValue`, `linregSlope`, `linregIntercept`, `linregAngle`, `linregR2` | `{ period?, column?, prefix? }` (one rolling OLS fit against the bar index, default 14, `period ≥ 2`; `Value` = TA-Lib `LINEARREG`, `Intercept` = the fit at the window's **first** bar, `Angle` = degrees and **scale-dependent**) | `packages/financial/src/studies/linear-regression.ts` |
|
|
501
|
+
| `timeSeriesForecast` | `tsf` | `{ period?, column?, output? }` (the same fit one bar **past** the window, default 14; = TA-Lib `TSF`; deliberately not a `MaType`) | `packages/financial/src/studies/time-series-forecast.ts` |
|
|
502
|
+
| `chandeForecastOscillator` | `cfo` | `{ period?, column?, output? }` (`100·(price − TSF)/price`, default 14; scale-invariant, **not** shift-invariant) | `packages/financial/src/studies/chande-forecast-oscillator.ts` |
|
|
503
|
+
| `centerOfGravity` | `cog` | `{ period?, column?, output? }` (Ehlers' position-weighted balance point, default 10; **negative**, in `[−period, −1]` on positive prices, flat reads `−(period+1)/2` — TradingView's uncentred convention) | `packages/financial/src/studies/center-of-gravity.ts` |
|
|
504
|
+
| `correlation` | `corr` | `{ period?, column?, benchmark, output? }` (Pearson r of two columns over 30 bars, = TA-Lib `CORREL`; `benchmark` is a **column on the same joined series**, required) | `packages/financial/src/studies/correlation.ts` |
|
|
505
|
+
| `beta` | `beta` | `{ period?, column?, benchmark, output? }` (slope of `column`'s 1-bar returns on `benchmark`'s over 5 bars, = TA-Lib `BETA(benchmark, column)`; pass **prices**, returns taken inside) | `packages/financial/src/studies/beta.ts` |
|
|
506
|
+
| `priceRelative` | `priceRel` | `{ column?, benchmark, output? }` (`column / benchmark`, no period — ChartIQ's Price Relative / Relative Strength **comparative**; not `rsi`) | `packages/financial/src/studies/price-relative.ts` |
|
|
507
|
+
| `performanceIndex` | `perf` | `{ period?, column?, benchmark, output? }` (each side's own `period`-bar growth, divided; 1 = parity, default 20; `(x−1)·100` == `percentChange(priceRelative)`) | `packages/financial/src/studies/performance-index.ts` |
|
|
508
|
+
| `guppy` | `gmmaS3`…`gmmaS15`, `gmmaL30`…`gmmaL60` | `{ column?, type?, prefix? }` (Guppy's GMMA — the **fixed** twelve averages, short 3/5/8/10/12/15, long 30/35/40/45/50/60, default `ema`; the lists ship as `GUPPY_SHORT_PERIODS` / `GUPPY_LONG_PERIODS`) | `packages/financial/src/studies/guppy.ts` |
|
|
509
|
+
| `rainbow` | `rainbow1`…`rainbow10` | `{ column?, period?, type?, prefix? }` (Widner's Rainbow — ten **recursive** averages, each smoothing the previous; default period 2 / `sma`; stage `k` warms up at `k·(period−1)`) | `packages/financial/src/studies/rainbow.ts` |
|
|
510
|
+
| `rainbowOscillator` | `rbo`, `rboUpper`, `rboLower` | `{ column?, period?, lookback?, type?, prefix? }` (ChartIQ's — `100·(price − mean of the ten)/(HH−LL)` with the stack's own width as mirrored bands; default 2 / 10) | `packages/financial/src/studies/rainbow.ts` |
|
|
511
|
+
| `kst` | `kst`, `kstSignal` | `{ column?, signalPeriod?, prefix? }` (Pring's Know Sure Thing — ROC 10/15/20/30 smoothed 10/10/10/15, weighted 1/2/3/4; the twelve numbers are **not** options, only the signal SMA is, default 9) | `packages/financial/src/studies/kst.ts` |
|
|
512
|
+
| `priceMomentumOscillator` | `pmo`, `pmoSignal` | `{ column?, prefix? }` (DecisionPoint's PMO — two stages of **custom** `α = 2/n` smoothing over a 1-bar percent ROC, ×10, with a **span** EMA(10) signal; no period options) | `packages/financial/src/studies/price-momentum-oscillator.ts` |
|
|
513
|
+
| `stochasticRsi` | `stochRsiK`, `stochRsiD` | `{ column?, rsiPeriod?, stochPeriod?, kPeriod?, dPeriod?, prefix? }` (the stochastic construction over the RSI, 14/14/3/3; `stochRsiK` == TA-Lib `STOCHRSI`'s **fastd**, `stochRsiD` has no TA-Lib counterpart) | `packages/financial/src/studies/stochastic-rsi.ts` |
|
|
514
|
+
| `trueStrengthIndex` | `tsi`, `tsiSignal` | `{ column?, longPeriod?, shortPeriod?, signalPeriod?, prefix? }` (Blau's TSI — `100·EMA(EMA(Δ,long),short)/EMA(EMA(\|Δ\|,long),short)`, 25/13/7; bounded −100…100, long applied **first**) | `packages/financial/src/studies/true-strength-index.ts` |
|
|
515
|
+
| `movingAverageDeviation` | `maDev` | `{ period?, maType?, column?, output? }` (`price − MA`, in **price units**, default 20/sma — the points half of the pair whose percent half IS `disparityIndex`; no `mode` flag) | `packages/financial/src/studies/moving-average-deviation.ts` |
|
|
516
|
+
| `parabolicSar` | `psar`, `psarTrend` | `{ step?, maxStep?, high?, low?, prefix? }` (Wilder's stop-and-reverse, defaults 0.02 / 0.2; **= TA-Lib `SAR` exactly**; `Trend` is `+1` long / `−1` short — the stop can print ON an extreme, so the side is not derivable from the value) | `packages/financial/src/studies/parabolic-sar.ts` |
|
|
517
|
+
| `superTrend` | `st`, `stTrend` | `{ period?, multiplier?, high?, low?, close?, prefix? }` (Seban's ratcheting ATR band as TradingView's `ta.supertrend`, defaults 10 / 3; `st` **is** the live band, so the bands are not emitted; the seed side is DOWN) | `packages/financial/src/studies/super-trend.ts` |
|
|
518
|
+
| `atrTrailingStop` | `ats`, `atsTrend` | `{ period?, multiplier?, high?, low?, close?, prefix? }` (close-anchored ratcheting stop, Vervoort's, defaults 14 / 3; a close exactly ON the stop flips **short**; the Chandelier anchor is `donchian` + `atr`, not a knob) | `packages/financial/src/studies/atr-trailing-stop.ts` |
|
|
519
|
+
| `negativeVolumeIndex` | `nvi` | `{ column?, volume?, output?, start? }` (Fosback: compound the close return only on a **lower**-volume bar, base 1000; no period, no warm-up; a **flat** volume holds on both indices) | `packages/financial/src/studies/volume-index.ts` |
|
|
520
|
+
| `positiveVolumeIndex` | `pvi` | `{ column?, volume?, output?, start? }` (the same on a **higher**-volume bar) | `packages/financial/src/studies/volume-index.ts` |
|
|
521
|
+
| `klinger` | `kvo`, `kvoSignal` | `{ fastPeriod?, slowPeriod?, signalPeriod?, high?, low?, close?, volume?, prefix? }` (Klinger's ORIGINAL volume force through an EMA pair, defaults 34 / 55 / 13; **F-AMBIG** — TradingView's simplified `ta.kvo` is a different indicator) | `packages/financial/src/studies/klinger.ts` |
|
|
522
|
+
| `typicalPrice` | `typicalPrice` | `{ high?, low?, close?, output? }` (`(h+l+c)/3` = TA-Lib `TYPPRICE`, exact; **no warm-up**) | `packages/financial/src/studies/price-transform.ts` |
|
|
523
|
+
| `medianPrice` | `medianPrice` | `{ high?, low?, output? }` (`(h+l)/2` = `MEDPRICE`, exact; `close` on the shared options type is ignored) | `packages/financial/src/studies/price-transform.ts` |
|
|
524
|
+
| `weightedClose` | `weightedClose` | `{ high?, low?, close?, output? }` (`(h+l+2c)/4` = `WCLPRICE`, exact) | `packages/financial/src/studies/price-transform.ts` |
|
|
525
|
+
| `averagePrice` | `averagePrice` | `{ open?, high?, low?, close?, output? }` (`(o+h+l+c)/4` = `AVGPRICE`, exact — the only transform that reads the open) | `packages/financial/src/studies/price-transform.ts` |
|
|
526
|
+
| `balanceOfPower` | `bop` | `{ period?, maType?, open?, high?, low?, close?, output? }` (`(c−o)/(h−l)`, bounded −1…1; **raw by default** = TA-Lib `BOP` exact, `period` gives ChartIQ's smoothed form; a flat bar is `0`; `maType` without `period` throws) | `packages/financial/src/studies/balance-of-power.ts` |
|
|
527
|
+
| `starcBands` | `starcMiddle`, `starcUpper`, `starcLower` | `{ period?, atrPeriod?, multiplier?, maType?, high?, low?, close?, prefix? }` (Stoller: MA(**close**) ± mult·ATR, 20 / 15 / 2 / sma — the close-centred sibling of `keltner`'s typical-price centre) | `packages/financial/src/studies/starc-bands.ts` |
|
|
528
|
+
| `highLowBands` | `hlbMiddle`, `hlbUpper`, `hlbLower` | `{ period?, percent?, maType?, high?, low?, prefix? }` (MA(**median price**) × (1 ± percent%), 10 / 1% / trima; it **is** `envelope` over a `medianPrice` column — same `percent`, same units; ChartIQ labels the knob "shift") | `packages/financial/src/studies/high-low-bands.ts` |
|
|
529
|
+
| `bollingerBandwidth` | `bbWidth` | `{ period?, stdDev?, column?, output? }` (`100·(upper − lower)/middle`, 20 / 2 — the **×100** StockCharts form; a flat window is `0`, not missing; a zero-centre window — flat at zero or zero-mean — is missing) | `packages/financial/src/studies/bollinger-derived.ts` |
|
|
530
|
+
| `bollingerPercentB` | `percentB` | `{ period?, stdDev?, column?, output? }` (`(price − lower)/(upper − lower)`, 20 / 2 — the **decimal** form, unbounded; a flat window is a genuine `0/0` → missing) | `packages/financial/src/studies/bollinger-derived.ts` |
|
|
531
|
+
| `primeNumberBands` | `pnbUpper`, `pnbLower` | `{ high?, low?, prefix? }` (smallest prime ≥ high / largest ≤ low — a step function of the price LEVEL, no warm-up; a price below 2 is outside the domain; cost grows with price magnitude) | `packages/financial/src/studies/prime-number.ts` |
|
|
532
|
+
| `primeNumberOscillator` | `pno` | `{ column?, output? }` (`price − nearestPrime(price)`, signed; a tie goes to the **lower** prime; no warm-up; neither scale- nor shift-invariant) | `packages/financial/src/studies/prime-number.ts` |
|
|
533
|
+
| `marketFacilitationIndex` | `bwmfi` | `{ high?, low?, volume?, output? }` (Bill Williams' `(h−l)/volume`, raw — **`bwmfi`, not `mfi`**, which `moneyFlowIndex` owns; zero volume → missing, flat bar → `0`) | `packages/financial/src/studies/market-facilitation-index.ts` |
|
|
534
|
+
| `twiggsMoneyFlow` | `tmf` | `{ period?, high?, low?, close?, volume?, output? }` (Twiggs: CMF rebuilt on the **true** range and Wilder-smoothed, default 21; bounded −1…1; **F-AMBIG** — the window-sum form is 0.0706 away; warm-up `period`, and an interior gap ends it) | `packages/financial/src/studies/twiggs-money-flow.ts` |
|
|
535
|
+
| `tradeVolumeIndex` | `tvi` | `{ minTick, column?, volume?, output? }` (tick-direction accumulation; `minTick` — the instrument's minimum tick — is **required**; an undecided bar keeps the LAST direction, no first direction is invented, base 0, no warm-up; an interior gap **ends** the level, `obv`'s rule) | `packages/financial/src/studies/trade-volume-index.ts` |
|
|
536
|
+
| `shinoharaIntensityRatio` | `sirStrong`, `sirWeak` | `{ period?, open?, high?, low?, close?, prefix? }` (Shinohara's A and B ratios, `100·Σup/Σdown` over 26 bars — A against the bar's own open, B against the previous close; **F-AMBIG** on which is charted "strong"; neither is bounded and B inverts on a gappy tape; per-column warm-up 25 / 26) | `packages/financial/src/studies/shinohara-intensity-ratio.ts` |
|
|
537
|
+
| `elderImpulse` | `impulse` | `{ emaPeriod?, fastPeriod?, slowPeriod?, signalPeriod?, column?, output? }` (Elder: `+1` when EMA(13) **and** the MACD histogram both rise, `−1` when both fall, `0` otherwise — a **numeric** column, `withColumn` has no string door; ties are `0`; warm-up 34) | `packages/financial/src/studies/elder-impulse.ts` |
|
|
538
|
+
| `movingAverageCross` | `maCross` | `{ fastPeriod?, slowPeriod?, maType?, column?, output? }` (a **signal** column: `+1` on the bar the fast MA crosses above the slow, `−1` below, `0` otherwise — the averages themselves are `movingAverage`'s; an exact tie is no cross and a touch-and-retreat is no cross; `maType`, not `type`; warm-up `slowPeriod`) | `packages/financial/src/studies/moving-average-cross.ts` |
|
|
539
|
+
| `anchoredVwap` | `avwap` | `{ anchor, high?, low?, close?, volume?, output? }` (cumulative `Σ tp·vol / Σ vol` from the first bar **at or after** `anchor` — a `Date` or epoch ms, **required**; earlier bars `undefined`; an interior gap ends the line, `obv`'s rule; the session-reset form is `sessionVwap`, on the same kernel) | `packages/financial/src/studies/anchored-vwap.ts` |
|
|
540
|
+
| `ichimoku` | `ichiTenkan`, `ichiKijun`, `ichiSenkouA`, `ichiSenkouB`, `ichiChikou` | `{ conversionPeriod?, basePeriod?, spanBPeriod?, displacement?, high?, low?, close?, prefix? }` (Hosoda's five lines, 9/26/52/26 — each the window's HH/LL midpoint; `Chikou` is the close. **`displacement` shifts nothing**: every column is keyed to the bar it is _computed from_ (**G5**); warm-up 8/25/25/51/0) | `packages/financial/src/studies/ichimoku.ts` |
|
|
541
|
+
| `ichimokuOffsets` | — | `{ displacement?, prefix? }` (**not a study** — the per-column x-offset in **bars** a chart applies to `ichimoku`: `+displacement` on the two Senkou spans, `−displacement` on `Chikou`, `0` on the rest; pass it the study's own options) | `packages/financial/src/studies/ichimoku.ts` |
|
|
542
|
+
| `zigZag` | `zzPivot`, `zzDirection`, `zzLine` | `{ deviation?, high?, low?, prefix? }` (percent-reversal pivots, 5% of the leg's extreme by default; `zzPivot` sits on the extreme's **own** bar, `zzDirection` is the leg's `+1`/`−1`, `zzLine` joins them. **All three repaint** (**G6**); the last leg is provisional. A gap discards the leg in force) | `packages/financial/src/studies/zig-zag.ts` |
|
|
543
|
+
| `sessionVwap` | `svwap` | `{ sessions \| session, stamped?, high?, low?, close?, volume?, output? }` (`anchoredVwap` **re-anchored at every session open**; exactly one of `sessions` (a `TradingCalendar` or `Session[]` — the primary door) and `session` (a session-id column, e.g. from `tagSessions`); a bar in closed time is `undefined`; an interior gap ends **that session's** line and the next open re-seeds; `Σ vol = 0` → `undefined`) | `packages/financial/src/studies/session-vwap.ts` |
|
|
544
|
+
| `pivotPoints` | `ppPivot`, `ppR1–R3`, `ppS1–S3` (+ `ppR4`/`ppS4` on `'camarilla'`) | `{ sessions \| session, stamped?, method?, high?, low?, close?, prefix? }` (each session's ladder from the **previous session with bars**' high/low/close, held flat; `method` = `'standard'` (floor) \| `'fibonacci'` (0.382/0.618/1.000) \| `'woodie'` (`(H+L+2C)/4` centre) \| `'camarilla'` (1.1/12, 1.1/6, 1.1/4, 1.1/2 from the **close**, and the only set with a fourth pair — the column set and the return type follow `method`); the first session and closed time are `undefined`) | `packages/financial/src/studies/pivot-points.ts` |
|
|
545
|
+
| `stochasticMomentumIndex` | `smi`, `smiSignal` | `{ period?, longPeriod?, shortPeriod?, signalPeriod?, high?, low?, close?, prefix? }` (Blau's SMI — the close against the **midpoint** of the HH/LL range, double-EMA smoothed above and below, ×100; Blau's 13 / 25 / 2 / 3; bounded −100…100) | `packages/financial/src/studies/stochastic-momentum-index.ts` |
|
|
546
|
+
| `fisherTransform` | `fisher`, `fisherSignal` | `{ period?, high?, low?, prefix? }` (Ehlers' transform of the **median price's** own range position, default 10; the `0.33/0.67`, `±0.99→±0.999` clamp and `0.5/0.5` constants are Ehlers', not options; the signal is the line delayed one bar) | `packages/financial/src/studies/fisher-transform.ts` |
|
|
547
|
+
| `schaffTrendCycle` | `stc` | `{ fastPeriod?, slowPeriod?, cyclePeriod?, column?, output? }` (Schaff's double stochastic of a MACD with a fixed `0.5` smoothing between, 23 / 50 / 10, bounded 0…100; a pinned first stochastic leaves the second window flat → `undefined`) | `packages/financial/src/studies/schaff-trend-cycle.ts` |
|
|
548
|
+
| `prettyGoodOscillator` | `pgo` | `{ period?, column?, high?, low?, close?, output? }` (Johnson's `(close − SMA)/EMA(TR)`, default 14, in average-daily-ranges; **F-AMBIG** — the Wilder-ATR denominator port is a different study, measured) | `packages/financial/src/studies/pretty-good-oscillator.ts` |
|
|
549
|
+
| `swingIndex` | `si` | `{ limit, open?, high?, low?, close?, output? }` (Wilder 1978; `limit` — the instrument's limit move — is **required**, there being no defensible default; bounded −100…100 at a `limit` above the largest gap; `R = 0` → `undefined`) | `packages/financial/src/studies/swing-index.ts` |
|
|
550
|
+
| `accumulativeSwingIndex` | `asi` | `{ limit, open?, high?, low?, close?, output? }` (the running total of `swingIndex`; a running sum, so an interior gap — a halted bar pair included — ends it) | `packages/financial/src/studies/swing-index.ts` |
|
|
551
|
+
| `randomWalkIndex` | `rwiHigh`, `rwiLow` | `{ period?, high?, low?, close?, prefix? }` (Poulos: the max over horizons `2 … period` of `(high − low[−n])/(meanTR(n)·√n)`, default 14; the **`n`-bar mean** TR, not Wilder's ATR; O(N·period), and it goes negative) | `packages/financial/src/studies/random-walk-index.ts` |
|
|
552
|
+
| `ravi` | `ravi` | `{ shortPeriod?, longPeriod?, column?, output? }` (Chande: `100·\|SMA(7) − SMA(65)\|/SMA(65)`; **absolute**, so it answers "is there a trend", not "which way"; trending above 3%) | `packages/financial/src/studies/ravi.ts` |
|
|
553
|
+
| `trendIntensityIndex` | `tii` | `{ period?, maPeriod?, column?, output? }` (M. H. Pee: `100·Σpos/(Σpos + Σneg)` of the deviations from an SMA, 30 / 60, bounded 0…100; **F-AMBIG** — the count form is a different study; warm-up 88) | `packages/financial/src/studies/trend-intensity-index.ts` |
|
|
554
|
+
| `specialK` | `specialK` | `{ column?, output? }` (Pring's extended KST — twelve weighted smoothed ROCs across three groups; the thirty-six constants ARE the study, so there are no period options; **warm-up 724 bars**) | `packages/financial/src/studies/special-k.ts` |
|
|
550
555
|
|
|
551
556
|
**The two-series family takes a benchmark COLUMN, never a second
|
|
552
557
|
`TimeSeries`.** `correlation`, `beta`, `priceRelative` and `performanceIndex`
|
|
@@ -596,15 +601,32 @@ names it separately, but the formula is identical (and TA-Lib-verified through
|
|
|
596
601
|
Adding a study? Follow `packages/financial/src/studies/README.md` (uniform
|
|
597
602
|
shape + pandas oracle case + fluent method are all REQUIRED).
|
|
598
603
|
|
|
604
|
+
### Study catalog (`@pond-ts/financial/catalog`)
|
|
605
|
+
|
|
606
|
+
Every study, described at runtime — the facts a `@pond-ts/process` registry
|
|
607
|
+
or a picker needs that the options interfaces and return types carry only in
|
|
608
|
+
erased types. A separate subpath: importing it pulls in every study.
|
|
609
|
+
|
|
610
|
+
| Export | Purpose | Source |
|
|
611
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
|
|
612
|
+
| `STUDIES` | `readonly StudyDescriptor[]` — one per fluent method, in family order then menu order (the catalog test pins the set equal to the fluent methods) | `packages/financial/src/catalog/index.ts` |
|
|
613
|
+
| `studyDescriptor(name)` | Look one up by its exported name | `packages/financial/src/catalog/index.ts` |
|
|
614
|
+
| `STUDY_FAMILIES` / `StudyFamily` | The nine picker groups (`moving-average`, `bands`, `momentum`, `trend`, `volatility`, `volume`, `statistical`, `price`, `session`) | `packages/financial/src/catalog/types.ts` |
|
|
615
|
+
| `StudyDescriptor`, `StudyInput`, `StudyParam` (`StudyNumberParam` \| `StudyEnumParam`), `StudyOutput`, `StudyNaming`, `StudyUnit`, `StudyRun` | The descriptor: `name`, `family`, `summary`, `inputs` (`role` + `default`, absent ⇒ required), `params` keyed by option (`kind`, `default` or `example`, `min`/`max` where validated, `suggest`), `naming` (`output` or `prefix` + its default), `outputs` (`id` suffix + `unit` — the axis-membership vocabulary), `optional: true` + `requires` for a switch-style option and a menu that needs it, `anchor: 'session' \| 'time'` for the session-anchored pair and `anchoredVwap`, `run` | `packages/financial/src/catalog/types.ts` |
|
|
616
|
+
| `defineStudy` / `StudySpec` | Author a descriptor against the study's options interface; the compiler classifies every key and rejects a missed one, a default on a required option or an undescribed option shape | `packages/financial/src/catalog/define.ts` |
|
|
617
|
+
|
|
599
618
|
### Trading calendars & sessions
|
|
600
619
|
|
|
601
|
-
| Export
|
|
602
|
-
|
|
|
603
|
-
| `TradingCalendar`
|
|
604
|
-
| `generateSessions`
|
|
605
|
-
| `normalizeSessions`
|
|
606
|
-
| `identityDiscontinuity` / `segmentDiscontinuity` / `weekendSkip`
|
|
607
|
-
| Types
|
|
620
|
+
| Export | Purpose | Source |
|
|
621
|
+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- |
|
|
622
|
+
| `TradingCalendar` | Query API: `.sessions()`, `.sessionOn()`, `.isTradingDay()`, `.isOpen()`, `.sessionsInRange()`, `.sessionSequence()`, `.barSequence(period)`, `.tagSessions()`, `.discontinuities()` | `packages/financial/src/calendar/` |
|
|
623
|
+
| `generateSessions` | `Session[]` from `SessionRules` over a date range (DST-correct) | `packages/financial/src/calendar/` |
|
|
624
|
+
| `normalizeSessions` | Validate + sort an explicit session list | `packages/financial/src/calendar/` |
|
|
625
|
+
| `identityDiscontinuity` / `segmentDiscontinuity` / `weekendSkip` | `DiscontinuityProvider`s for the trading-time axis | `packages/financial/src/calendar/` |
|
|
626
|
+
| Types | `Session`, `SessionBreak`, `SessionRules`, `DateRange`, `InstantRange`, `TaggedSchema`, `LiveSegment`, `DiscontinuityProvider` | `packages/financial/src/calendar/` |
|
|
627
|
+
| `SessionSource` / `SessionAnchorOptions` | The session-anchored studies' input: `TradingCalendar \| Session[]` (`sessions`), or a session-id column name (`session`), plus `stamped` | `packages/financial/src/contract/session-anchor.ts` |
|
|
628
|
+
| `PIVOT_METHODS` / `PivotMethod` | The four pivot formula sets (`standard`, `fibonacci`, `woodie`, `camarilla`) | `packages/financial/src/kernels/pivot.ts` |
|
|
629
|
+
| `PivotPointsSchema` / `CamarillaPivotPointsSchema` / `PivotPointsResult` | `pivotPoints`' method-dependent appended-schema types (7 columns, or 9 for Camarilla) | `packages/financial/src/studies/pivot-points.ts` |
|
|
608
630
|
|
|
609
631
|
### Contract & constants
|
|
610
632
|
|
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,8 @@ The `@pond-ts` packages — `pond-ts`, `@pond-ts/react`, `@pond-ts/charts`,
|
|
|
8
8
|
under a single `v*` tag, so this file covers them all. Pre-1.0: minor bumps may
|
|
9
9
|
include new features and type-level changes; patch bumps are strictly additive.
|
|
10
10
|
|
|
11
|
-
[Unreleased]: https://github.com/pond-ts/pond/compare/v0.
|
|
11
|
+
[Unreleased]: https://github.com/pond-ts/pond/compare/v0.67.0...HEAD
|
|
12
|
+
[0.67.0]: https://github.com/pond-ts/pond/compare/v0.66.0...v0.67.0
|
|
12
13
|
[0.66.0]: https://github.com/pond-ts/pond/compare/v0.65.0...v0.66.0
|
|
13
14
|
[0.65.0]: https://github.com/pond-ts/pond/compare/v0.64.0...v0.65.0
|
|
14
15
|
[0.64.0]: https://github.com/pond-ts/pond/compare/v0.63.0...v0.64.0
|
|
@@ -69,10 +70,168 @@ include new features and type-level changes; patch bumps are strictly additive.
|
|
|
69
70
|
|
|
70
71
|
## [Unreleased]
|
|
71
72
|
|
|
73
|
+
## [0.67.0] — 2026-09-11
|
|
74
|
+
|
|
75
|
+
### Added
|
|
76
|
+
|
|
77
|
+
- `@pond-ts/financial`: **a runtime study catalog** — `import { STUDIES } from
|
|
78
|
+
'@pond-ts/financial/catalog'`. One `StudyDescriptor` per study (all 109
|
|
79
|
+
fluent methods): the columns it reads (`inputs`, with defaults — absent
|
|
80
|
+
means required, as a `benchmark` is), its numeric and menu options
|
|
81
|
+
(`params`: `kind`, `default` or an `example` for a required one,
|
|
82
|
+
`min`/`max` — inclusive, and only where the study validates a constant
|
|
83
|
+
bound — and a `suggest` range a control is drawn on, legal throughout at
|
|
84
|
+
the other options' defaults), how it names what it appends (`naming`: `output` or `prefix`
|
|
85
|
+
and the default), the columns it appends (`outputs`, each with a `unit`
|
|
86
|
+
from a closed vocabulary — `inherit` / `delta` / `percent` / `ratio` /
|
|
87
|
+
`signal` / `volume` / `index` / `bars` — that answers whether the column
|
|
88
|
+
may share the source's axis), a `family` and one-line `summary` for a
|
|
89
|
+
picker, `anchor: 'session' | 'time'` for the two session-anchored studies
|
|
90
|
+
and `anchoredVwap` (an input the consumer supplies from context, not a
|
|
91
|
+
control), `optional: true` for an option whose absence is a switch rather
|
|
92
|
+
than a value (`balanceOfPower`'s `period`) with `requires` for a menu
|
|
93
|
+
that is only legal alongside it, and `run`. The shape is modelled on `@pond-ts/process`'s `OpDef` (`role`, `id`,
|
|
94
|
+
`unit`, `suggest` are its words) so a registry maps it rather than
|
|
95
|
+
interprets it — with two deliberate differences: an input carries its
|
|
96
|
+
`default`, and a required option carries an `example` where process
|
|
97
|
+
requires a `default`. Asked for by a consumer that was otherwise
|
|
98
|
+
hand-transcribing ~400 facts from `.d.ts` files and re-checking them per
|
|
99
|
+
release. Guarded two ways so it cannot drift from the studies:
|
|
100
|
+
`defineStudy<Options>()` classifies every key of the options interface at
|
|
101
|
+
compile time and rejects a missed or misspelt key, a default claimed on a
|
|
102
|
+
required option, a menu value outside the union, a menu `of` that omits a
|
|
103
|
+
member, or an option shape it does not know; and `test/catalog.test.ts` runs every descriptor against its
|
|
104
|
+
study — the appended columns are exactly those declared and every one
|
|
105
|
+
has a value on the fixture, stating every default explicitly changes
|
|
106
|
+
nothing, every menu value and both `suggest` endpoints run, a declared
|
|
107
|
+
`min`/`max` is accepted and one past it throws, and the catalog is exactly
|
|
108
|
+
the set of fluent methods. A separate subpath, so the main entry's tree-shaking is untouched.
|
|
109
|
+
The `API map` workflow now guards `catalog/index.ts` too.
|
|
110
|
+
- `@pond-ts/financial`: **the session-anchored studies** (corpus §6.6 / §6.9 —
|
|
111
|
+
the **G4** pair the trading calendar was gating). Both take the session as a
|
|
112
|
+
first-class input through one shared option shape, `SessionAnchorOptions`:
|
|
113
|
+
exactly one of **`sessions`** (a `TradingCalendar` or a `Session[]` — the
|
|
114
|
+
primary door — a calendar is narrowed with `sessionsInRange`, an explicit
|
|
115
|
+
list validated per call — and walked once, `O(N +
|
|
116
|
+
sessions)`) or **`session`** (the name of a session-id column, what
|
|
117
|
+
`TradingCalendar.tagSessions` appends — the door for a series already
|
|
118
|
+
partitioned by session), plus `stamped: 'open' | 'close'` on the calendar
|
|
119
|
+
door. A bar in **closed time** — between sessions, a weekend print on a 24/7
|
|
120
|
+
feed, outside the schedule — reads `undefined` in both studies. Both doors
|
|
121
|
+
run the **same** `sessionIdValues` walk `tagSessions` now runs, so they are
|
|
122
|
+
the same anchoring by construction, and a test pins the two routes equal
|
|
123
|
+
under both stamp conventions.
|
|
124
|
+
- **`sessionVwap({ sessions | session, stamped, high, low, close, volume,
|
|
125
|
+
output = 'svwap' })`** — the VWAP an intraday desk means: `Σ tp·vol / Σ vol`
|
|
126
|
+
accumulated from each session's open and **reset at the next**. This is the
|
|
127
|
+
third VWAP form `vwap` named and deliberately left open. It composes on
|
|
128
|
+
`anchoredVwap`'s arithmetic literally rather than by resemblance — both
|
|
129
|
+
studies now call one `anchoredVwapValues(typical, volume, anchors)` kernel
|
|
130
|
+
and differ only in what they pass as the anchor group. An interior gap ends
|
|
131
|
+
**that session's** line (`obv`'s rule; the two sums are blanked together so
|
|
132
|
+
a bar with volume but a missing `high` cannot bias the average) and the
|
|
133
|
+
next session open re-seeds — the reset is the recovery `anchoredVwap` makes
|
|
134
|
+
the caller do by hand. `Σ vol = 0` → `undefined`, live at the output.
|
|
135
|
+
- **`pivotPoints({ sessions | session, stamped, method = 'standard', high,
|
|
136
|
+
low, close, prefix = 'pp' })`** — each session's support/resistance ladder
|
|
137
|
+
from the **previous session's** aggregate high / low / close, held flat
|
|
138
|
+
across the session. Four formula sets, all reading the same three inputs
|
|
139
|
+
and differing in constants: `'standard'` (floor-trader), `'fibonacci'`
|
|
140
|
+
(0.382 / 0.618 / 1.000 of the range), `'woodie'` (the standard ladder over
|
|
141
|
+
the close-weighted centre `(H + L + 2C)/4`) and `'camarilla'` (Nick Scott's
|
|
142
|
+
1.1/12, 1.1/6, 1.1/4, 1.1/2, measured from the **close**, not the pivot).
|
|
143
|
+
**The column set follows `method`**: seven columns (`${prefix}Pivot`,
|
|
144
|
+
`R1–R3`, `S1–S3`) for the first three and **nine** for Camarilla, which is
|
|
145
|
+
the only set defining a fourth pair — the return type is conditional on
|
|
146
|
+
`method` rather than shipping three methods with two permanently-`undefined`
|
|
147
|
+
columns. The first session with bars and every closed-time bar read
|
|
148
|
+
`undefined`; "previous session" means the previous session **with bars in
|
|
149
|
+
this series**, not the previous entry on the calendar.
|
|
150
|
+
- Two deliberate definition deltas, both documented on the study: Woodie's
|
|
151
|
+
ships the previous-**close** centre `(H + L + 2C)/4` rather than the
|
|
152
|
+
current-open variant also in circulation, and Camarilla's levels are
|
|
153
|
+
centred on the close rather than on the pivot (which is the definition, and
|
|
154
|
+
is what makes its ladder asymmetric about `ppPivot`).
|
|
155
|
+
- Oracle: five new cases on a new **session-keyed** input
|
|
156
|
+
(`input.sessionTimes`) — the same 80 OHLCV bars re-keyed onto a real
|
|
157
|
+
09:30–16:00 America/New_York 30-minute grid over six sessions, with two
|
|
158
|
+
bars in no session. The references are pandas `groupby`-`cumsum` and
|
|
159
|
+
`groupby().agg().shift(1).reindex()`, a different formulation from our
|
|
160
|
+
sequential loops; the vitest side rebuilds the calendar from the same rules
|
|
161
|
+
rather than from a table, so a Temporal/`zoneinfo` disagreement about a
|
|
162
|
+
session boundary fails the case rather than hiding.
|
|
163
|
+
- `@pond-ts/financial`: **Ichimoku Cloud and ZigZag** (corpus §6.4) — the two
|
|
164
|
+
most-used studies left in the corpus, each shipped in the form that needs no
|
|
165
|
+
core change. Both take the uniform shape (bar columns plus a `prefix`,
|
|
166
|
+
bar-count periods, a length-preserving per-column warm-up, a fluent method)
|
|
167
|
+
and both have pandas oracle cases. One internal kernel helper rides with
|
|
168
|
+
them: **`rollingBarExtremesValues`** (the max of one array beside the min of
|
|
169
|
+
another over a strict window, in one deque walk), which the perf check
|
|
170
|
+
surfaced — Ichimoku on the single-array door spent 414 ms of its ~404 ms at
|
|
171
|
+
1M bars in six deque passes where three suffice; on the package bench the
|
|
172
|
+
study went 433.6 → 280.7 ms at 1M.
|
|
173
|
+
- **`ichimoku({ conversionPeriod = 9, basePeriod = 26, spanBPeriod = 52,
|
|
174
|
+
displacement = 26, high, low, close, prefix = 'ichi' })`** — Hosoda's five
|
|
175
|
+
lines as `ichiTenkan` / `ichiKijun` / `ichiSenkouA` / `ichiSenkouB` /
|
|
176
|
+
`ichiChikou`, each the midpoint of the highest `high` and lowest `low` of
|
|
177
|
+
its own window (the Chikou span is the close). Per-column warm-up 8 / 25 /
|
|
178
|
+
25 / 51 / 0. **`displacement` changes no value**: the study keys every
|
|
179
|
+
column to the bar it is _computed from_ and shifts nothing — the forward
|
|
180
|
+
spans have no rows past the last bar to land on (assessment gap **G5**),
|
|
181
|
+
and a pre-shifted Chikou would be a look-ahead column, the one thing no
|
|
182
|
+
other column in the package is. The new **`ichimokuOffsets(options)`**
|
|
183
|
+
returns the per-column x-offset in bars (`+displacement` on the two spans,
|
|
184
|
+
`−displacement` on Chikou, `0` on the rest) for a chart to apply — the
|
|
185
|
+
data-side half of the charts ask **C2**. Measured against the common slip
|
|
186
|
+
(taking the ranges over the close): up to 0.2281 / 0.2383 / 0.2226 /
|
|
187
|
+
0.2328 on the oracle's deliberately narrow bars.
|
|
188
|
+
- **`zigZag({ deviation = 5, high, low, prefix = 'zz' })`** — the price path
|
|
189
|
+
reduced to its swings: `zzPivot` (the pivot price on its own bar),
|
|
190
|
+
`zzDirection` (`+1` rising / `−1` falling leg) and `zzLine` (the straight
|
|
191
|
+
line between consecutive pivots). A leg turns when price retraces
|
|
192
|
+
`deviation` **percent** from the leg's running extreme — measured against
|
|
193
|
+
the peak on a fall, the trough on a rise. **Every column repaints**
|
|
194
|
+
(assessment gap **G6**): a pivot is written at the bar its extreme
|
|
195
|
+
occurred but is not known until a later bar confirms it, so none of the
|
|
196
|
+
three may be fed to a backtest unlagged. The **last leg is provisional**
|
|
197
|
+
and therefore has no pivot and no line — only a direction. A gap resets
|
|
198
|
+
the machine _and_ discards the leg in force, and no line is drawn across
|
|
199
|
+
it. The close-based fork needs no option (`{ high: 'close', low: 'close' }`)
|
|
200
|
+
and ships as its own oracle case; the absolute-deviation fork is measured
|
|
201
|
+
at a whole extra pivot on the fixture.
|
|
202
|
+
|
|
203
|
+
### Changed
|
|
204
|
+
|
|
205
|
+
- `@pond-ts/financial`: **`bollinger` draws the degenerate band on a flat
|
|
206
|
+
window** — `upper = lower = middle` where `σ = 0`, instead of blanking
|
|
207
|
+
both bands around an unbroken middle line. `undefined` now means warm-up
|
|
208
|
+
only, as it does for `keltner`'s zero-range channel. A consumer's
|
|
209
|
+
"outside the band" test is `bbUpper > bbLower`, not a hole in the data.
|
|
210
|
+
`bollingerBandwidth` is still `0` there (its numerator is forced to zero)
|
|
211
|
+
and `bollingerPercentB` still `undefined` (a genuine 0/0), and `bbWidth`
|
|
212
|
+
is now recoverable from the `bollinger` columns on every bar the bands
|
|
213
|
+
are set. Asked for by a consumer whose band over a stale stretch broke
|
|
214
|
+
into segments ([PND-BBFLAT]).
|
|
215
|
+
- `@pond-ts/financial`: **`TradingCalendar.tagSessions` is ~4.7× faster** and
|
|
216
|
+
its output is unchanged on every row. It was materializing `series.toArray()`
|
|
217
|
+
and reading `event.begin()` — one `Event` plus one data object per row, the
|
|
218
|
+
cost PR #536 removed from the study kernel — where it now reads
|
|
219
|
+
`keyColumn().begin` columnar through the shared `sessionIdValues` walk the
|
|
220
|
+
session-anchored studies use. Measured at 1M bars: **120.90 ms → 25.69 ms**.
|
|
221
|
+
The session column it appends is now a `Float64Array` rather than an
|
|
222
|
+
`Array<number | undefined>`; `withColumn` maps `NaN` to missing, so readers
|
|
223
|
+
still see `number | undefined` and the declared `TaggedSchema` is unchanged.
|
|
224
|
+
- `@pond-ts/financial`: `anchoredVwap` now runs the shared
|
|
225
|
+
`anchoredVwapValues` kernel rather than composing two `cumulativeValues`
|
|
226
|
+
passes over two blanked arrays. Bit-identical output; the kernel arithmetic
|
|
227
|
+
measures **23.51 ms → 16.62 ms** at 1M rows.
|
|
228
|
+
|
|
72
229
|
## [0.66.0] — 2026-09-07
|
|
73
230
|
|
|
74
231
|
### Added
|
|
75
232
|
|
|
233
|
+
### Changed
|
|
234
|
+
|
|
76
235
|
- `@pond-ts/financial`: **the volume and miscellaneous leftovers** (corpus
|
|
77
236
|
§6.6 / §6.4 / §6.1) — six studies in the uniform shape (bar columns plus an
|
|
78
237
|
`output` or `prefix`, bar-count periods, a length-preserving per-column
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pond-ts/process",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.0",
|
|
4
4
|
"description": "Computations as data over pond-ts: processing graphs authored fluently or composed as JSON, resolved against a declared op vocabulary with content-addressed caching, provenance, and per-node timings. Experimental, pre-1.0.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"verify": "npm run format:check && npm run build && npm test"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"pond-ts": "^0.
|
|
45
|
+
"pond-ts": "^0.67.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"typescript": "^5.6.3",
|