Repository navigation
fix(metrics): since-inception never annualized below one year or from a history window - #86
Merged
Merged
Conversation
… a history window Official since inception of funds under one year is the cumulative figure (NTSD 20.18); it is now null below 365 days between inception and the table date, and the gap is not filled from a later Yahoo estimate. Derived siAnn needs a series that starts at the first trade date. The derived 1-month window clamps to the end of a shorter month
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
siAnnandreturns.monthEnd.sinceInceptionwithoutYoungSinceInceptionnulls it below 365 days between the catalog inception and the table date, on the Market Price, NAV and index rows of the month-end and quarter-end tables (unknown inception keeps the figure)mergeOfficialReturnsno longer fills that gap from the Yahoo estimate: it is dated weeks later (WQTM got -9.59 to 2026-10-23 under the official 2026-09-30 date in the first scoped run)siAnnwas measured from the first close of whatever was loaded (aHISTORY_RANGE=5ywindow on an old fund gave siAnn = cagr5y). It now needs a series that starts within 10 days of Yahoo's first trade date (catalog inception as fallback) and at least one year, same rule as Invesco fix(updater): kept data reads its own meta.json, siAnn never annualized below one year or from a window Invesco#81Date.UTC(y, m - 1, d), so Oct 31 started at "Sep 31" = Oct 1; it is clamped to the end of the shorter month now (only used when the official 1-month figure is missing)siAnnline documents both rules000000000CUSIP drops the ISIN) and WT-8 (missingpctValwritten as"0") belong to the shared N-PORT reader ETF-H2Published values that change
siAnn: GDT -14.29, NTSD 20.18, WAMA 7.76, WDIG -22.65, WDRN -13.68, WIMA 8.12, WQTM 7.59, WSPC -9.78, WTLS 20.12 ->nullTICKERS=NTSD,WQTM,WDAF,DGRW REQUEST_SLEEP=0: NTSD 20.18 -> null, WQTM 7.59 -> null (NAV 7.49 and index 7.58 rows too), WDAF -0.75 (383 days) and DGRW 12.94 unchanged; exit 0, 2 updated, 2 unchanged, 0 failed; the only data changes were the since-inception fields andgeneratedAt; data discarded (git checkout -- api/)Checks
bun test: 57 pass, 0 fail, exit 0; the same run with the config controls exported also exits 0metrics 2fail onorigin/main(2 fail): a 5-year series from inception gives 14.87 while the same series without its first 3 years or without an inception givesnull, Oct 31 -> Sep 30 gives a 1-month 10 (was -45), USFR's table keeps 1.99 for a 2014 or exactly-one-year fund and nulls all three rows for NTSD's 2026-03-19 inception, and the merge does not refill it from Yahoobun build --target=bun scripts/update-data.ts --outfile=/dev/nullandsrc/main.tsx: ok.claude/tools/etfs/tc/check.sh: 64 lines before and after, no new errorscheck-readme.ts: ok;git diff --check: clean