You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse official NAV/Index returns and distribution tax breakdown
The product page's own "Total Returns" table already carries NAV
Returns and Underlying Index Returns rows alongside the Market Price
Returns row this script parsed; both are now captured into meta.json
without touching the existing primary field. Its "Recent Distributions"
table (ex/record/payable date plus Ordinary Income/ST Cap Gains/LT Cap
Gains/Return of Capital/Total) is now the primary distributions source,
merged with Yahoo dividend events only for ex-dates the official table
doesn't cover; each row's origin stays visible via a source label.
Updated app.tsx subtitles that had become factually wrong once Yahoo
was no longer the sole source.
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# WisdomTree
2
2
3
-
WisdomTree ETF holdings to Watchlist. A single-file client-side tool reading the generated `./api/wisdomtree` static feed (WisdomTree product pages, SEC EDGAR N-PORT-P holdings, Yahoo Finance history) into a searchable ETF/asset-class catalog with per-fund tabs, watchlist, N-PORT upload, CSV/TXT export — the same look, feel, columns and business logic as the sibling applications.
3
+
WisdomTree ETF holdings to Watchlist. A single-file client-side tool reading the generated `./api/wisdomtree` static feed (WisdomTree product pages — including official Market Price/NAV/Underlying Index returns and the official tax-character distributions table, SEC EDGAR N-PORT-P holdings, Yahoo Finance history with a narrow distributions/returns fallback) into a searchable ETF/asset-class catalog with per-fund tabs, watchlist, N-PORT upload, CSV/TXT export — the same look, feel, columns and business logic as the sibling applications.
4
4
5
5
## Using Bun
6
6
@@ -31,7 +31,8 @@ The **Update WisdomTree ETF data** GitHub Actions workflow exposes the same sett
| Holdings per fund | SEC EDGAR N-PORT-P `primary_doc.xml` (WisdomTree Trust CIK 0001350487) |
34
-
| Daily history, distributions | Yahoo Finance chart API for daily history |
34
+
| Per-fund returns, distributions | WisdomTree product page's "Total Returns" table (Market Price/NAV/Underlying Index rows) and "Recent Distributions" table (ex/record/payable date + Ordinary Income/ST/LT Cap Gains/Return of Capital) — the primary source for both |
35
+
| Daily history; returns/distributions fallback | Yahoo Finance chart API for daily history unconditionally, and as fallback for Market Price Returns tenors and distribution ex-dates the official page doesn't cover |
Copy file name to clipboardExpand all lines: app.tsx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1565,7 +1565,7 @@ function renderOverviewTable(fund: FundRow): void {
1565
1565
}
1566
1566
1567
1567
el.tickerCount.textContent=fund.ticker;
1568
-
renderSubtitle(`${fund.ticker} overview · ${rows.length} metrics. Returns are derived from adjusted market-price closes, not official NAVreturns.`);
1568
+
renderSubtitle(`${fund.ticker} overview · ${rows.length} metrics. Headline returns use official Market Price Returns where WisdomTree publishes them, falling back to adjusted market-price closes; official NAV/Underlying Index returns are recorded separately in the data feed.`);
@@ -1601,7 +1601,7 @@ function renderDistributionsTable(fund: FundRow): void {
1601
1601
}
1602
1602
1603
1603
el.tickerCount.textContent=fund.ticker;
1604
-
renderSubtitle(`${fund.ticker} distributions · dividend history from the Yahoo chart feed (ex-date, amount); frequency is inferred from the cadence.`);
1604
+
renderSubtitle(`${fund.ticker} distributions · the official WisdomTree tax-character breakdown for recent ex-dates, with Yahoo dividend events (ex-date, amount only) filling in older ex-dates it doesn't cover; frequency is inferred from the cadence.`);
test('returns an empty list when the page has no Recent Distributions section',()=>{
137
+
expect(parseOfficialDistributions('# GDE\n\n### Total Returns\n\nno distributions section here')).toEqual([]);
138
+
});
139
+
});
140
+
141
+
describe('official-first distributions merge (house policy: official wins, Yahoo fills only what it does not cover)',()=>{
142
+
test('prefers the official row over an overlapping Yahoo dividend event',()=>{
143
+
constofficial=parseOfficialDistributions('### Recent Distributions\n\n| Ex-Dividend Date | Record Date | Payable Date | Ordinary Income | Short Term Capital Gains | Long Term Capital Gains | Return of Capital | Total Distribution |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| 9/25/2026 | 9/25/2026 | 9/29/2026 | $0.17000 | $0.00000 | $0.00000 | $0.00000 | $0.17000 |');
144
+
constyahoo=[{epoch: Date.UTC(2026,8,25)/1000,amount: 0.169}];// Yahoo's own rounding for the same ex-date.
test('falls back to Yahoo dividend events for older ex-dates the small official table does not cover',()=>{
152
+
constofficial=parseOfficialDistributions('### Recent Distributions\n\n| Ex-Dividend Date | Record Date | Payable Date | Ordinary Income | Short Term Capital Gains | Long Term Capital Gains | Return of Capital | Total Distribution |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| 9/25/2026 | 9/25/2026 | 9/29/2026 | $0.17000 | $0.00000 | $0.00000 | $0.00000 | $0.17000 |');
153
+
constyahoo=[
154
+
{epoch: Date.UTC(2013,5,20)/1000,amount: 0.05},// an old, pre-tax-breakdown-era ex-date the official table no longer shows.
0 commit comments