Tap-aware chart decimation: mean-reduce the bounded exposure series instead of a min/max band #111
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The serve-time decimation shipped in cut 2 (#108) reduces every series by per-bucket
min/max. That is the right envelope for a cumulative equity curve (drawdown
spikes survive), but the wrong reduction for a bounded level series — the C10
exposure stream (f64 ∈ [-1,+1]).
Symptom
The exposure overlay collapses to a solid −1..+1 band (it reads as per-point
oscillation between +1 and −1). Confirmed on real GER40 M1:
bar) — genuinely whippy, so the band is partly real there.
bars — a healthy strategy — and it still bands out: 1997/2000 buckets straddle
a flip, because each bucket spans ~812 bars. So over any multi-year window min/max
renders every exposure as ±1 everywhere, hiding the net/duty-cycle level.
The equity curve is unaffected (min/max envelope is correct there).
Fix (A — tap-aware decimation)
decimatebecomes reduction-kind-aware per series:level survives decimation as a smooth line in [-1,+1] instead of a band.
The reduction kind is set by the chart builders (which know the tap): a small
reduce_for_tapkeyed on the tap name (the only bounded level tap today isexposure);decimatestays a mechanical transform that honours a per-seriesReduceKind. The shared spine is preserved (a mean series writes its bucket mean toboth boundary slots).
Scope
Hotfix-sized, confined to
crates/aura-cli(render.rsSeries/ReduceKind, main.rsdecimate+reduce_for_tap+ the two builders). RED-first: a test pinning that abipolar series with many intra-bucket flips decimates to its bucket mean, not a
−1..+1 band. Engine + registry untouched (C14). A typed per-tap semantics marker
(instead of the name heuristic) is a later generalisation if more bounded taps land.
context: surfaced demonstrating cut 2 (#108) on real GER40 data.
depends on: nothing.