docs(wiki): refresh PSAR streaming exposure and HV non-positive behaviour

PSAR — the wiki page still claimed "Node streaming. Not exposed in the
Node binding." That was true for an early release but is no longer:
the Node binding has exposed `psar.update(high, low, close)` since the
B1 fix in todo-detailed.md, and the WASM binding now exposes the same
streaming surface (audit finding R3, this branch). The page lists all
three streaming + batch shapes and adds a paragraph on the new
`is_ready` convention (audit finding R6 — flips on the first non-None
SAR, not on the seed candle).

HistoricalVolatility — the "Non-positive prices" edge-case note still
described the old behaviour ("that return is treated as 0"). The new
behaviour skips the bad tick entirely (audit finding R13): the
indicator's state is left untouched, the previous valid value is
returned, and the next real tick re-anchors against the previous
*valid* price. Updated the note to describe the new behaviour and
explain why (silently treating bad ticks as "no movement" underreports
realised volatility).
This commit is contained in:
kingchenc
2026-05-23 10:54:51 +02:00
parent 6786917cee
commit 62fcab1c86
2 changed files with 19 additions and 3 deletions
@@ -69,7 +69,12 @@ non-`None` output lands on input `period + 1`.
log return; its standard deviation — and so HV — is `0`
(`geometric_series_yields_zero` pins this).
- **Non-positive prices.** A log return is undefined when either price is
`<= 0`; that return is treated as `0`.
`<= 0`. Such ticks are **skipped**: the previous valid value is returned,
the indicator's state (previous price, window, sums) is left untouched, and
the next real positive tick re-anchors against the previous *valid* price.
Previous releases silently treated bad ticks as a `0.0` log-return, which
underreported realised volatility on broken data feeds — that behaviour has
changed.
- **Non-negative.** Volatility is a standard deviation and is never
negative (`output_is_non_negative` pins this).
- **NaN / infinity inputs.** Non-finite inputs are silently dropped.