Background
PV001 (shipped) found that the naive four-sum identity (Σy² − (Σy)²/n) for Slope.BufferList suffers catastrophic cancellation on stock-price-like inputs and fails the IsExactly bit-equality contract, so Slope.BufferList stays at its current ~3.41x deviation-form ratio for v3.0. These are the follow-up paths.
Sub-items
History
Originally tracked as PV-V31-1, PV-V31-2, and PV-V31-3 in docs/plans/streaming-indicators.plan.md (now removed; full write-up in git history).
Background
PV001 (shipped) found that the naive four-sum identity (
Σy² − (Σy)²/n) forSlope.BufferListsuffers catastrophic cancellation on stock-price-like inputs and fails theIsExactlybit-equality contract, soSlope.BufferListstays at its current ~3.41x deviation-form ratio for v3.0. These are the follow-up paths.Sub-items
Slope.BufferListtest suite; ship only if.IsExactly(series)holds.sumY— less ambitious: eliminate the_buffer.Average()pre-pass while keeping the deviation foreach. Bit-equality not guaranteed; measure drift, then decide whether to accept under a relaxed tolerance or revert.IsApproximately<T>test helper + BufferList tolerance audit — cross-cutting decision to allow finance-grade approximate comparisons in BufferList tests where bit-equality is incompatible with O(1) numerical reformulations.tests/Library/TestTools/TestAssert.cstoday exposes onlyIsBetweenandIsExactly. Add anIsApproximately(precision)helper, audit all 79 BufferList test files, and decide per-indicator whetherIsExactlyis load-bearing orIsApproximately(Money6)is the correct contract. Unlocks the O(1) identities above and similar cancellation-bound reformulations elsewhere.History
Originally tracked as PV-V31-1, PV-V31-2, and PV-V31-3 in
docs/plans/streaming-indicators.plan.md(now removed; full write-up in git history).