NHK Spring `5991.T` %-change "gap" was a precompute bug, fixed

Thesis

NHK Spring `5991.T` %-change "gap" was a precompute bug, fixed

The −100/data-gap on 5991.T 30d/3m turned out not to be a history-window artifact (series is 1327 weekly + 20 daily bars deep). Root cause: calculateChange in precompute-summaries.ts selected the raw last bar without skipping a trailing null-close row — yfinance returns the current forming JP session as close: null, which nulled 30d/3m for any foreign ticker mid-session while 7d (hourly, last bar valid) computed fine. Fixed by making last skip trailing null/zero closes (symmetric with the existing first selector and the filter); verified no regression on healthy names (STX/WDC/HOCPY byte-identical). 5991.T now reads +25.6% 30d / +26.0% 3m. Engine fix filed in TASKS-ENGINE.md. This also de-risks every other foreign-primary in perspective tables (same class of bug would have hit any .T/.KS/.TW name pulled mid-session).

No direct external sources are attached to this read.