Single-binary self-hosted market watcher for stocks, ETFs, indexes, and futures: live charts, key stats, fundamentals, SEC filings, and SSE streaming.
axumdockerfinancerustself-hostedsqlitestocksvite
1-- finance migration 0011: earnings calendar (Phase 25).
2--
3-- The next-expected earnings date for each stock, fetched from Yahoo's
4-- `quoteSummary.calendarEvents` module. Past earnings dates are not stored
5-- here: they ride for free on the 8-K item-2.02 filings the existing
6-- `filings` table already carries (Phase 14 added the `items` column), so a
7-- single SELECT against `filings.items LIKE '%2.02%'` lists them.
8--
9-- Stocks only — ETFs, indexes and futures have no earnings, so these stay
10-- NULL forever on every non-stock row. A stock Yahoo has no calendar data
11-- for (Yahoo's coverage is uneven on small caps) keeps `next_earnings_at`
12-- NULL even after a successful sync, and the symbol page falls back to a
13-- cadence estimate derived from the past 8-K item-2.02 dates.
14
15-- Forward-looking next earnings date (UTC epoch-ms; date precision but
16-- stored as a timestamp so it sorts and ages alongside the other
17-- `*_at` columns). NULL when Yahoo has no upcoming date or the stock
18-- has not been swept yet.
19ALTER TABLE symbols ADD COLUMN next_earnings_at INTEGER;
20
21-- When the Yahoo `earnings_calendar` scheduler section last refreshed
22-- this stock's `next_earnings_at`. NULL = never swept. Stocks only.
23ALTER TABLE symbols ADD COLUMN earnings_synced_at INTEGER;