Repository navigation
feat(updater): shared calendar dates, ticker and new-fund checks, guard keeps numeric weights - #88
Merged
Merged
Conversation
…rd keeps numeric weights SPDR adopts the shared updater blocks it has a path for (holdings-guard Q24, calendar-dates, fund-selection Q27 Q28; no N-PORT or Yahoo window) and publishes a bare holdings ticker only for a U.S. listing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
SPDR adopts the shared updater blocks of the ETF template that it has a path for (
.claude/tools/etfs/etf-std/*.block.ts, applied withapply-block.ts, byte-identical in every brand), as in Schwab daggerok/Schwab#75. SPDR has no N-PORT code and no Yahoo window (its NAV history comes from SSGA's workbook andmergeOlderRowsalready keeps older rows), sonport-readerandwindowed-chartare left out:holdings-guard(Q24): an all-non-numeric weight sheet never replaces a published sheet with numeric weights, even whennumericandsumare relaxed (spdrHoldingsProblempassesholdingsWeightCountof the published pages)calendar-dates:toIsoDateand the workbookhistoryDatearecalendarIso(same days as before, plusAug 31, 2026and two-digit years);withoutYoungReturnsnow nulls 1y, 3y, 5y and 10y figures a fund is too young for, not only since inceptionfund-selection(Q27, Q28): aTICKERSentry outside the live catalog and the published funds stops the run right after the catalog, before the bulk feeds and any fund request (a published fund that left the catalog now counts as known, like a published closed fund before);NEW FUNDS:names a fund on its first successful publish (was: every catalog ticker missing from the index before the run, published or not),NEW FUNDS (not published yet):a new fund that has no data yetwithListedTickerspublishes-for a line whose Local Currency is not USD, and for futures, options and cash lines; the row stays keyed by its IdentifierPublished values that change on the next run: holdings tickers of non-USD lines in the international funds (CWI, SPDW, SPEM, GXC and the rest) become
-, and futures, option and CASH_USD lines lose their ticker; USD equity tickers (SPY, XLK) stay as they areHow it was checked
bun test: 45 pass, 0 fail (exit 0), also with the workflow control variables ofupdate-data.config.jsonexported; the new tests fail without their wiring (checked by removing each piece: guard argument, ticker check, NEW FUNDS report, age rule, calendar dates)bun build --target=bun scripts/update-data.ts --outfile=/dev/null,bun build --target=bun src/main.tsx --outfile=/dev/null,git diff --check, hubcheck-readme.ts,check-scripts.ts,apply-block.ts --check holdings-guard,calendar-dates,fund-selection(identical),split-test-groups.ts(no group over five).claude/tools/etfs/tc/check.sh: no new errors (48 -> 48 pre-existing lines)TICKERS="SPY XLK CWI GLD"-> 4 updated with the new trading day, SPY and XLK tickers unchanged, CWI local tickers ->-;HISTORY_RANGE=1y TICKERS=SPY-> history 5764 rows kept