add Eurostat + UK ONS sources; valuation/bubble/economy/bonds groups; aggregate read; market-open header

Three new data sources hooked into the existing SOURCES registry. All
open APIs, no keys:

  - EUROSTAT: prefix EUROSTAT:dataset?dim=val&... — current EU bond
    yields (Bund/OAT/BTP/EZ) and Eurozone economic indicators that
    FRED's OECD-mirror series stopped updating in 2022-2023.
  - ONS: prefix ONS:topic/cdid/dataset — current UK CPI, unemployment,
    GDP, industrial production. Replaces the 5+ month-stale FRED
    LRHUTTTTGBM156S mirror.

New indicator groups in default.toml feed the strategic/fundamental
lens we converged on: valuation (CAPE/Buffett anchors), bubble_watch
(SKEW/VVIX/RSP vs SPY/HYG vs TLT/IPO/crypto), economy (multi-region,
ALL current-or-stale-flagged), bonds (UK/EU/US/JPN sovereign yields).

Indicator panel now opens with an AI "read" interpretation per group
(generated hourly at :07 UTC alongside an aggregate cross-group read
shown in the dashboard header). The aggregate is grounded by a markets
strip — NYSE/LSE/Frankfurt/Tokyo/HK/Shanghai with open/closed LEDs and
next-open countdown, computed locally from each exchange's tz.

Other UX bits: indicator-row tooltips populated from TOML notes;
rows whose last observation is >90 days old get a 'stale' chip;
ghost symbols (in DB but no longer in TOML) filtered out of the
panel; Eurostat/ONS symbols display as short codes rather than the
full API path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-05-15 23:07:42 +01:00
parent a10409c02b
commit 1edf9cad41
15 changed files with 1156 additions and 10 deletions

View file

@ -99,6 +99,89 @@ financials = [
{symbol="^FTAS", label="FTSE All-Share", note="UK breadth"},
]
# --- Strategic / fundamentals groups -----------------------------------------
# These feed the Temperature page (phase 2) where each indicator is shown as a
# percentile of its own history vs past cycles incl. recessions. Until phase 2
# they render as standard tabs in the Indicators panel.
# Valuation — slow-moving "is the market expensive vs history" anchors.
valuation = [
{symbol="FRED:WILL5000PRFC", label="Wilshire 5000 (US market cap proxy)", note="numerator for Buffett indicator"},
{symbol="FRED:GDP", label="US Nominal GDP (quarterly)", note="denominator for Buffett indicator"},
{symbol="FRED:SP500", label="S&P 500 (FRED long-history)", note="FRED-anchored percentile vs deep history"},
{symbol="FRED:DJIA", label="Dow Jones Industrial Average", note="long-history equity reference"},
{symbol="FRED:DGS10", label="US 10y nominal yield (FRED)", note="ERP denominator"},
{symbol="FRED:DFII10", label="US 10y real yield (TIPS)", note="real-rate signal — gold + multiples"},
{symbol="FRED:T10YIE", label="US 10y breakeven inflation", note="market-implied inflation"},
]
# Bubble watch — irrationality / positioning / behavioural extremes.
bubble_watch = [
{symbol="RSP", label="RSP — equal-weight S&P 500", note="breadth — falling vs SPY = concentration"},
{symbol="SPY", label="SPY — cap-weighted S&P 500", note="pair with RSP for concentration read"},
{symbol="IWM", label="IWM — Russell 2000", note="small-cap cycle health"},
{symbol="^VIX", label="VIX — equity vol", note="LOW percentile = complacency"},
{symbol="^VVIX", label="VVIX — vol of vol", note="LOW = no demand for vol insurance"},
{symbol="^SKEW", label="SKEW — tail-risk pricing", note="HIGH = options market pricing crash"},
{symbol="HYG", label="HYG — high-yield credit", note="pair with TLT for risk-on/off"},
{symbol="TLT", label="TLT — long Treasuries", note="duration / safe haven flows"},
{symbol="IPO", label="IPO — Renaissance IPO ETF", note="late-cycle frothiness gauge"},
{symbol="BTC-USD", label="Bitcoin", note="retail risk appetite + USD-debasement"},
{symbol="ETH-USD", label="Ethereum", note=""},
{symbol="FRED:BAMLH0A0HYM2", label="US HY OAS", note="LOW percentile = credit complacency"},
]
# Real economy — fundamental anchors that move on quarters, not days.
#
# Geographic coverage note: FRED mirrors OECD "international comparable"
# series for non-US economies. Several (Japan CPI, Eurozone unemployment,
# Eurozone industrial production, UK CPI) were de-facto abandoned by
# OECD-Stat in 2022-2023 and are 1-4 YEARS stale on FRED. Listing them
# would be worse than not having them. We only include series that are
# currently maintained. Up-to-date non-US economic data would require
# direct integration with Eurostat / ONS / Statistics Bureau of Japan /
# NBS-China — out of scope for v0. The dashboard flags any indicator
# older than 90 days as "stale" on screen.
economy = [
# United States
{symbol="FRED:ICSA", label="US initial jobless claims (weekly)", note="leading labour signal — weekly"},
{symbol="FRED:INDPRO", label="US industrial production", note="real activity, monthly"},
{symbol="FRED:HOUST", label="US housing starts", note="cyclical real-economy gauge"},
{symbol="FRED:UMCSENT", label="US consumer sentiment (UMich)", note="demand-side mood"},
{symbol="FRED:T10Y3M", label="US 10y-3m yield curve", note="Fed-favoured recession signal"},
{symbol="FRED:USREC", label="NBER recession indicator (0/1)", note="binary — context overlay only"},
# Eurozone — direct Eurostat (open API, no key, current)
{symbol="EUROSTAT:ei_cphi_m?geo=EA&indic=TOTAL&unit=RT12", label="Eurozone HICP YoY %", note="EZ inflation, YoY % — ECB-style series, current"},
{symbol="EUROSTAT:une_rt_m?geo=EA21&age=TOTAL&sex=T&unit=PC_ACT&s_adj=SA", label="Eurozone unemployment rate", note="EZ labour, seasonally adjusted"},
{symbol="EUROSTAT:sts_inpr_m?geo=EA21&nace_r2=B-D&s_adj=SCA&unit=I21", label="Eurozone industrial production", note="EZ real activity"},
# United Kingdom — direct ONS (open API, current within 1-2 months)
{symbol="ONS:economy/inflationandpriceindices/d7g7/mm23", label="UK CPI YoY %", note="UK headline inflation, monthly"},
{symbol="ONS:employmentandlabourmarket/peoplenotinwork/unemployment/mgsx/lms", label="UK unemployment rate", note="UK labour, 16+, seasonally adjusted"},
{symbol="ONS:economy/grossdomesticproductgdp/ihyo/qna", label="UK GDP growth q/q-4 %", note="UK GDP, year-on-year quarterly"},
{symbol="ONS:economy/economicoutputandproductivity/output/k222/diop", label="UK industrial production", note="UK IoP, monthly"},
# Japan
{symbol="FRED:LRHUTTTTJPM156S", label="Japan unemployment rate", note="JP labour — ~3mo lag"},
]
# Sovereign bond yields — UK / EU / US / JP. China yields have no free open-API
# source; would need scraping or paid feed.
bonds = [
# United States — daily, deep curve
{symbol="^IRX", label="US 3m T-bill yield", note="short-end, daily"},
{symbol="^FVX", label="US 5y Treasury yield", note="belly of the curve"},
{symbol="^TNX", label="US 10y Treasury yield", note="benchmark long rate"},
{symbol="^TYX", label="US 30y Treasury yield", note="long-end / term premium proxy"},
# Eurozone — Maastricht convergence yields via Eurostat (monthly)
{symbol="EUROSTAT:irt_lt_mcby_m?geo=EA&int_rt=MCBY", label="Eurozone 10y aggregate", note="EZ avg 10y govt bond yield"},
{symbol="EUROSTAT:irt_lt_mcby_m?geo=DE&int_rt=MCBY", label="German 10y Bund", note="EU risk-free benchmark"},
{symbol="EUROSTAT:irt_lt_mcby_m?geo=FR&int_rt=MCBY", label="French 10y OAT", note="core-EU spread to Bund"},
{symbol="EUROSTAT:irt_lt_mcby_m?geo=IT&int_rt=MCBY", label="Italian 10y BTP", note="periphery — BTP/Bund spread = EU stress"},
# United Kingdom — FRED OECD mirror (Eurostat dropped UK post-Brexit)
{symbol="FRED:IRLTLT01GBM156N", label="UK 10y Gilt", note="UK long-term yield"},
# Japan — BoJ regime tracker
{symbol="FRED:IRLTLT01JPM156N", label="Japan 10y JGB", note="BoJ; YCC legacy"},
]
# =============================================================================
# flash_news.py — RSS feed registry, by category