Skip to content

fix(metrics): since-inception never annualized below one year or from a history window - #86

Merged
daggerok merged 1 commit into
mainfrom
fix/updater-review-highs
Oct 26, 2026
Merged

daggerok merged 1 commit into
mainfrom
fix/updater-review-highs

Conversation

@daggerok

Copy link
Copy Markdown
Owner

What

  • ETF-H6, WisdomTree part (review WT-5): wisdomtree.com prints "Since Inception" in the Average Annual row as the CUMULATIVE figure for funds younger than one year (NTSD, launched 2026-03-19: 20.18 as of 2026-09-30), and it was published as siAnn and returns.monthEnd.sinceInception
    • new withoutYoungSinceInception nulls 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)
    • mergeOfficialReturns no 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)
  • Derived siAnn was measured from the first close of whatever was loaded (a HISTORY_RANGE=5y window 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#81
  • WT-7: the derived 1-month window used Date.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)
  • README: the siAnn line documents both rules
  • Not here, noted for the shared work: WT-2 (N-PORT tickers filled by name on bonds and FX forwards) belongs to ETF-C3 ticker hygiene; WT-3 (000000000 CUSIP drops the ISIN) and WT-8 (missing pctVal written as "0") belong to the shared N-PORT reader ETF-H2

Published values that change

  • Next refresh of each fund, no data committed here. Funds younger than one year at the 2026-09-30 table lose a cumulative 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 -> null
  • Scoped real run TICKERS=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 and generatedAt; data discarded (git checkout -- api/)

Checks

  • bun test: 57 pass, 0 fail, exit 0; the same run with the config controls exported also exits 0
  • New tests in metrics 2 fail on origin/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 gives null, 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 Yahoo
  • bun build --target=bun scripts/update-data.ts --outfile=/dev/null and src/main.tsx: ok
  • .claude/tools/etfs/tc/check.sh: 64 lines before and after, no new errors
  • check-readme.ts: ok; git diff --check: clean

… 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
@daggerok
daggerok merged commit dc97ade into main Oct 26, 2026
1 check passed
@daggerok
daggerok deleted the fix/updater-review-highs branch October 26, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant