"""Market Bubble Indicator Time Series Data

Source: Live data retrieved June 2026 from Yale/Shiller, FRED, World Bank, multpl.com

Datasets:
    A - Shiller CAPE (Cyclically Adjusted P/E) — 1880–2026
    B - Buffett Indicator (Equity Market Cap / GDP) — 1975–2026
    C - S&P 500 Trailing P/E — 1950–2026
    D - S&P 500 Dividend Yield — 1950–2026
    H - US Household & Federal Debt / GDP ratios — key points 1980–2025
"""

from __future__ import annotations

# ---------------------------------------------------------------------------
# Dataset A: Shiller CAPE — annual from 1880 to present (147 points)
# Source: https://www.multpl.com/shiller-pe/table/by-year (Yale/Shiller)
# Retrieved: 2026-06-04
# ---------------------------------------------------------------------------
shiller_cape: list[dict] = [
    {"year": 1880, "value": 14.87, "source": "Yale/Shiller"},
    {"year": 1881, "value": 18.47, "source": "Yale/Shiller"},
    {"year": 1882, "value": 15.68, "source": "Yale/Shiller"},
    {"year": 1883, "value": 15.27, "source": "Yale/Shiller"},
    {"year": 1884, "value": 14.43, "source": "Yale/Shiller"},
    {"year": 1885, "value": 13.13, "source": "Yale/Shiller"},
    {"year": 1886, "value": 16.70, "source": "Yale/Shiller"},
    {"year": 1887, "value": 17.52, "source": "Yale/Shiller"},
    {"year": 1888, "value": 15.36, "source": "Yale/Shiller"},
    {"year": 1889, "value": 15.81, "source": "Yale/Shiller"},
    {"year": 1890, "value": 17.22, "source": "Yale/Shiller"},
    {"year": 1891, "value": 15.43, "source": "Yale/Shiller"},
    {"year": 1892, "value": 19.01, "source": "Yale/Shiller"},
    {"year": 1893, "value": 17.65, "source": "Yale/Shiller"},
    {"year": 1894, "value": 15.74, "source": "Yale/Shiller"},
    {"year": 1895, "value": 16.51, "source": "Yale/Shiller"},
    {"year": 1896, "value": 16.58, "source": "Yale/Shiller"},
    {"year": 1897, "value": 17.03, "source": "Yale/Shiller"},
    {"year": 1898, "value": 19.25, "source": "Yale/Shiller"},
    {"year": 1899, "value": 22.92, "source": "Yale/Shiller"},
    {"year": 1900, "value": 18.67, "source": "Yale/Shiller"},
    {"year": 1901, "value": 20.97, "source": "Yale/Shiller"},
    {"year": 1902, "value": 22.34, "source": "Yale/Shiller"},
    {"year": 1903, "value": 20.32, "source": "Yale/Shiller"},
    {"year": 1904, "value": 15.86, "source": "Yale/Shiller"},
    {"year": 1905, "value": 18.46, "source": "Yale/Shiller"},
    {"year": 1906, "value": 20.13, "source": "Yale/Shiller"},
    {"year": 1907, "value": 17.22, "source": "Yale/Shiller"},
    {"year": 1908, "value": 11.90, "source": "Yale/Shiller"},
    {"year": 1909, "value": 14.77, "source": "Yale/Shiller"},
    {"year": 1910, "value": 14.54, "source": "Yale/Shiller"},
    {"year": 1911, "value": 14.05, "source": "Yale/Shiller"},
    {"year": 1912, "value": 13.80, "source": "Yale/Shiller"},
    {"year": 1913, "value": 13.15, "source": "Yale/Shiller"},
    {"year": 1914, "value": 11.64, "source": "Yale/Shiller"},
    {"year": 1915, "value": 10.36, "source": "Yale/Shiller"},
    {"year": 1916, "value": 12.54, "source": "Yale/Shiller"},
    {"year": 1917, "value": 10.99, "source": "Yale/Shiller"},
    {"year": 1918, "value": 6.64, "source": "Yale/Shiller"},
    {"year": 1919, "value": 6.10, "source": "Yale/Shiller"},
    {"year": 1920, "value": 5.99, "source": "Yale/Shiller"},
    {"year": 1921, "value": 5.12, "source": "Yale/Shiller"},
    {"year": 1922, "value": 6.29, "source": "Yale/Shiller"},
    {"year": 1923, "value": 8.15, "source": "Yale/Shiller"},
    {"year": 1924, "value": 8.07, "source": "Yale/Shiller"},
    {"year": 1925, "value": 9.69, "source": "Yale/Shiller"},
    {"year": 1926, "value": 11.34, "source": "Yale/Shiller"},
    {"year": 1927, "value": 13.19, "source": "Yale/Shiller"},
    {"year": 1928, "value": 18.81, "source": "Yale/Shiller"},
    {"year": 1929, "value": 27.08, "source": "Yale/Shiller"},
    {"year": 1930, "value": 22.31, "source": "Yale/Shiller"},
    {"year": 1931, "value": 16.71, "source": "Yale/Shiller"},
    {"year": 1932, "value": 9.31, "source": "Yale/Shiller"},
    {"year": 1933, "value": 8.73, "source": "Yale/Shiller"},
    {"year": 1934, "value": 13.03, "source": "Yale/Shiller"},
    {"year": 1935, "value": 11.50, "source": "Yale/Shiller"},
    {"year": 1936, "value": 17.09, "source": "Yale/Shiller"},
    {"year": 1937, "value": 21.62, "source": "Yale/Shiller"},
    {"year": 1938, "value": 13.51, "source": "Yale/Shiller"},
    {"year": 1939, "value": 15.60, "source": "Yale/Shiller"},
    {"year": 1940, "value": 16.38, "source": "Yale/Shiller"},
    {"year": 1941, "value": 13.90, "source": "Yale/Shiller"},
    {"year": 1942, "value": 10.10, "source": "Yale/Shiller"},
    {"year": 1943, "value": 10.15, "source": "Yale/Shiller"},
    {"year": 1944, "value": 11.05, "source": "Yale/Shiller"},
    {"year": 1945, "value": 11.96, "source": "Yale/Shiller"},
    {"year": 1946, "value": 15.62, "source": "Yale/Shiller"},
    {"year": 1947, "value": 11.47, "source": "Yale/Shiller"},
    {"year": 1948, "value": 10.42, "source": "Yale/Shiller"},
    {"year": 1949, "value": 10.25, "source": "Yale/Shiller"},
    {"year": 1950, "value": 10.75, "source": "Yale/Shiller"},
    {"year": 1951, "value": 11.90, "source": "Yale/Shiller"},
    {"year": 1952, "value": 12.53, "source": "Yale/Shiller"},
    {"year": 1953, "value": 13.01, "source": "Yale/Shiller"},
    {"year": 1954, "value": 12.00, "source": "Yale/Shiller"},
    {"year": 1955, "value": 15.99, "source": "Yale/Shiller"},
    {"year": 1956, "value": 18.29, "source": "Yale/Shiller"},
    {"year": 1957, "value": 16.72, "source": "Yale/Shiller"},
    {"year": 1958, "value": 13.79, "source": "Yale/Shiller"},
    {"year": 1959, "value": 17.98, "source": "Yale/Shiller"},
    {"year": 1960, "value": 18.34, "source": "Yale/Shiller"},
    {"year": 1961, "value": 18.47, "source": "Yale/Shiller"},
    {"year": 1962, "value": 21.20, "source": "Yale/Shiller"},
    {"year": 1963, "value": 19.26, "source": "Yale/Shiller"},
    {"year": 1964, "value": 21.63, "source": "Yale/Shiller"},
    {"year": 1965, "value": 23.27, "source": "Yale/Shiller"},
    {"year": 1966, "value": 24.06, "source": "Yale/Shiller"},
    {"year": 1967, "value": 20.43, "source": "Yale/Shiller"},
    {"year": 1968, "value": 21.51, "source": "Yale/Shiller"},
    {"year": 1969, "value": 21.19, "source": "Yale/Shiller"},
    {"year": 1970, "value": 17.09, "source": "Yale/Shiller"},
    {"year": 1971, "value": 16.46, "source": "Yale/Shiller"},
    {"year": 1972, "value": 17.26, "source": "Yale/Shiller"},
    {"year": 1973, "value": 18.71, "source": "Yale/Shiller"},
    {"year": 1974, "value": 13.53, "source": "Yale/Shiller"},
    {"year": 1975, "value": 8.92, "source": "Yale/Shiller"},
    {"year": 1976, "value": 11.19, "source": "Yale/Shiller"},
    {"year": 1977, "value": 11.44, "source": "Yale/Shiller"},
    {"year": 1978, "value": 9.24, "source": "Yale/Shiller"},
    {"year": 1979, "value": 9.26, "source": "Yale/Shiller"},
    {"year": 1980, "value": 8.85, "source": "Yale/Shiller"},
    {"year": 1981, "value": 9.26, "source": "Yale/Shiller"},
    {"year": 1982, "value": 7.39, "source": "Yale/Shiller"},
    {"year": 1983, "value": 8.76, "source": "Yale/Shiller"},
    {"year": 1984, "value": 9.89, "source": "Yale/Shiller"},
    {"year": 1985, "value": 10.00, "source": "Yale/Shiller"},
    {"year": 1986, "value": 11.72, "source": "Yale/Shiller"},
    {"year": 1987, "value": 14.92, "source": "Yale/Shiller"},
    {"year": 1988, "value": 13.90, "source": "Yale/Shiller"},
    {"year": 1989, "value": 15.09, "source": "Yale/Shiller"},
    {"year": 1990, "value": 17.05, "source": "Yale/Shiller"},
    {"year": 1991, "value": 15.61, "source": "Yale/Shiller"},
    {"year": 1992, "value": 19.77, "source": "Yale/Shiller"},
    {"year": 1993, "value": 20.32, "source": "Yale/Shiller"},
    {"year": 1994, "value": 21.41, "source": "Yale/Shiller"},
    {"year": 1995, "value": 20.22, "source": "Yale/Shiller"},
    {"year": 1996, "value": 24.76, "source": "Yale/Shiller"},
    {"year": 1997, "value": 28.33, "source": "Yale/Shiller"},
    {"year": 1998, "value": 32.86, "source": "Yale/Shiller"},
    {"year": 1999, "value": 40.57, "source": "Yale/Shiller"},
    {"year": 2000, "value": 43.77, "source": "Yale/Shiller"},
    {"year": 2001, "value": 36.98, "source": "Yale/Shiller"},
    {"year": 2002, "value": 30.28, "source": "Yale/Shiller"},
    {"year": 2003, "value": 22.90, "source": "Yale/Shiller"},
    {"year": 2004, "value": 27.66, "source": "Yale/Shiller"},
    {"year": 2005, "value": 26.59, "source": "Yale/Shiller"},
    {"year": 2006, "value": 26.47, "source": "Yale/Shiller"},
    {"year": 2007, "value": 27.21, "source": "Yale/Shiller"},
    {"year": 2008, "value": 24.02, "source": "Yale/Shiller"},
    {"year": 2009, "value": 15.17, "source": "Yale/Shiller"},
    {"year": 2010, "value": 20.53, "source": "Yale/Shiller"},
    {"year": 2011, "value": 22.98, "source": "Yale/Shiller"},
    {"year": 2012, "value": 21.21, "source": "Yale/Shiller"},
    {"year": 2013, "value": 21.90, "source": "Yale/Shiller"},
    {"year": 2014, "value": 24.86, "source": "Yale/Shiller"},
    {"year": 2015, "value": 26.49, "source": "Yale/Shiller"},
    {"year": 2016, "value": 24.21, "source": "Yale/Shiller"},
    {"year": 2017, "value": 28.06, "source": "Yale/Shiller"},
    {"year": 2018, "value": 33.31, "source": "Yale/Shiller"},
    {"year": 2019, "value": 28.38, "source": "Yale/Shiller"},
    {"year": 2020, "value": 30.99, "source": "Yale/Shiller"},
    {"year": 2021, "value": 34.51, "source": "Yale/Shiller"},
    {"year": 2022, "value": 36.94, "source": "Yale/Shiller"},
    {"year": 2023, "value": 28.34, "source": "Yale/Shiller"},
    {"year": 2024, "value": 31.97, "source": "Yale/Shiller"},
    {"year": 2025, "value": 37.14, "source": "Yale/Shiller"},
    {"year": 2026, "value": 40.03, "source": "Yale/Shiller"},
]

shiller_cape_meta = {
    "source_url": "https://www.multpl.com/shiller-pe/table/by-year",
    "frequency": "annual",
    "range": "1880-2026",
    "points": 147,
    "historical_mean": 17.39,
    "retrieved": "2026-06-04",
    "confidence": "HIGH",
}

# ---------------------------------------------------------------------------
# Dataset B: Buffett Indicator — annual from 1975 to 2026 (52 points)
# 1975-2020: FRED / World Bank series DDDM01USA156NWDB
# 2021-2026: Composite from CEIC, currentmarketvaluation.com,
#            thebuffettindicator.com
# Retrieved: 2026-06-04
# ---------------------------------------------------------------------------
buffett_indicator: list[dict] = [
    {"year": 1975, "value": 41.77, "source": "FRED/World Bank"},
    {"year": 1976, "value": 47.14, "source": "FRED/World Bank"},
    {"year": 1977, "value": 40.07, "source": "FRED/World Bank"},
    {"year": 1978, "value": 36.65, "source": "FRED/World Bank"},
    {"year": 1979, "value": 37.82, "source": "FRED/World Bank"},
    {"year": 1980, "value": 47.59, "source": "FRED/World Bank"},
    {"year": 1981, "value": 39.40, "source": "FRED/World Bank"},
    {"year": 1982, "value": 43.57, "source": "FRED/World Bank"},
    {"year": 1983, "value": 49.78, "source": "FRED/World Bank"},
    {"year": 1984, "value": 39.68, "source": "FRED/World Bank"},
    {"year": 1985, "value": 53.03, "source": "FRED/World Bank"},
    {"year": 1986, "value": 55.42, "source": "FRED/World Bank"},
    {"year": 1987, "value": 52.15, "source": "FRED/World Bank"},
    {"year": 1988, "value": 53.09, "source": "FRED/World Bank"},
    {"year": 1989, "value": 59.95, "source": "FRED/World Bank"},
    {"year": 1990, "value": 51.88, "source": "FRED/World Bank"},
    {"year": 1991, "value": 67.55, "source": "FRED/World Bank"},
    {"year": 1992, "value": 69.72, "source": "FRED/World Bank"},
    {"year": 1993, "value": 76.56, "source": "FRED/World Bank"},
    {"year": 1994, "value": 70.50, "source": "FRED/World Bank"},
    {"year": 1995, "value": 91.00, "source": "FRED/World Bank"},
    {"year": 1996, "value": 105.05, "source": "FRED/World Bank"},
    {"year": 1997, "value": 125.56, "source": "FRED/World Bank"},
    {"year": 1998, "value": 142.59, "source": "FRED/World Bank"},
    {"year": 1999, "value": 153.43, "source": "FRED/World Bank"},
    {"year": 2000, "value": 147.38, "source": "FRED/World Bank"},
    {"year": 2001, "value": 132.15, "source": "FRED/World Bank"},
    {"year": 2002, "value": 101.15, "source": "FRED/World Bank"},
    {"year": 2003, "value": 124.53, "source": "FRED/World Bank"},
    {"year": 2004, "value": 133.61, "source": "FRED/World Bank"},
    {"year": 2005, "value": 130.38, "source": "FRED/World Bank"},
    {"year": 2006, "value": 141.64, "source": "FRED/World Bank"},
    {"year": 2007, "value": 137.64, "source": "FRED/World Bank"},
    {"year": 2008, "value": 78.47, "source": "FRED/World Bank"},
    {"year": 2009, "value": 104.14, "source": "FRED/World Bank"},
    {"year": 2010, "value": 114.85, "source": "FRED/World Bank"},
    {"year": 2011, "value": 100.26, "source": "FRED/World Bank"},
    {"year": 2012, "value": 114.85, "source": "FRED/World Bank"},
    {"year": 2013, "value": 142.70, "source": "FRED/World Bank"},
    {"year": 2014, "value": 150.03, "source": "FRED/World Bank"},
    {"year": 2015, "value": 137.69, "source": "FRED/World Bank"},
    {"year": 2016, "value": 146.31, "source": "FRED/World Bank"},
    {"year": 2017, "value": 164.89, "source": "FRED/World Bank"},
    {"year": 2018, "value": 148.27, "source": "FRED/World Bank"},
    {"year": 2019, "value": 158.57, "source": "FRED/World Bank"},
    {"year": 2020, "value": 194.89, "source": "FRED/World Bank"},
    {"year": 2021, "value": 180.0, "source": "Composite (CEIC/currentmarketvaluation)"},
    {"year": 2022, "value": 155.0, "source": "Composite (CEIC/currentmarketvaluation)"},
    {"year": 2023, "value": 179.5, "source": "Composite (CEIC/currentmarketvaluation)"},
    {"year": 2024, "value": 216.3, "source": "Composite (CEIC/currentmarketvaluation)"},
    {"year": 2025, "value": 225.0, "source": "Composite (CEIC/currentmarketvaluation)"},
    {"year": 2026, "value": 219.0, "source": "Composite (CEIC/currentmarketvaluation)"},
]

buffett_indicator_meta = {
    "source_url": "FRED + CEIC + currentmarketvaluation.com",
    "frequency": "annual",
    "range": "1975-2026",
    "points": 52,
    "note": "2021-2026 values are estimated composite from multiple sources",
    "retrieved": "2026-06-04",
    "confidence": "MEDIUM-HIGH",
}

# ---------------------------------------------------------------------------
# Dataset C: S&P 500 Trailing P/E — annual 1950-2026 (77 points)
# Source: https://www.multpl.com/s-p-500-pe-ratio/table/by-year
# Retrieved: 2026-06-04
# ---------------------------------------------------------------------------
sp500_pe: list[dict] = [
    {"year": 1950, "value": 7.22, "source": "multpl.com/Shiller"},
    {"year": 1951, "value": 7.48, "source": "multpl.com/Shiller"},
    {"year": 1952, "value": 9.97, "source": "multpl.com/Shiller"},
    {"year": 1953, "value": 10.86, "source": "multpl.com/Shiller"},
    {"year": 1954, "value": 10.09, "source": "multpl.com/Shiller"},
    {"year": 1955, "value": 12.56, "source": "multpl.com/Shiller"},
    {"year": 1956, "value": 12.12, "source": "multpl.com/Shiller"},
    {"year": 1957, "value": 13.34, "source": "multpl.com/Shiller"},
    {"year": 1958, "value": 12.49, "source": "multpl.com/Shiller"},
    {"year": 1959, "value": 18.77, "source": "multpl.com/Shiller"},
    {"year": 1960, "value": 17.12, "source": "multpl.com/Shiller"},
    {"year": 1961, "value": 18.60, "source": "multpl.com/Shiller"},
    {"year": 1962, "value": 21.25, "source": "multpl.com/Shiller"},
    {"year": 1963, "value": 17.66, "source": "multpl.com/Shiller"},
    {"year": 1964, "value": 18.77, "source": "multpl.com/Shiller"},
    {"year": 1965, "value": 18.75, "source": "multpl.com/Shiller"},
    {"year": 1966, "value": 17.81, "source": "multpl.com/Shiller"},
    {"year": 1967, "value": 15.31, "source": "multpl.com/Shiller"},
    {"year": 1968, "value": 17.71, "source": "multpl.com/Shiller"},
    {"year": 1969, "value": 17.65, "source": "multpl.com/Shiller"},
    {"year": 1970, "value": 15.76, "source": "multpl.com/Shiller"},
    {"year": 1971, "value": 18.12, "source": "multpl.com/Shiller"},
    {"year": 1972, "value": 18.01, "source": "multpl.com/Shiller"},
    {"year": 1973, "value": 18.09, "source": "multpl.com/Shiller"},
    {"year": 1974, "value": 11.68, "source": "multpl.com/Shiller"},
    {"year": 1975, "value": 8.30, "source": "multpl.com/Shiller"},
    {"year": 1976, "value": 11.82, "source": "multpl.com/Shiller"},
    {"year": 1977, "value": 10.41, "source": "multpl.com/Shiller"},
    {"year": 1978, "value": 8.28, "source": "multpl.com/Shiller"},
    {"year": 1979, "value": 7.88, "source": "multpl.com/Shiller"},
    {"year": 1980, "value": 7.39, "source": "multpl.com/Shiller"},
    {"year": 1981, "value": 9.02, "source": "multpl.com/Shiller"},
    {"year": 1982, "value": 7.73, "source": "multpl.com/Shiller"},
    {"year": 1983, "value": 11.48, "source": "multpl.com/Shiller"},
    {"year": 1984, "value": 11.52, "source": "multpl.com/Shiller"},
    {"year": 1985, "value": 10.36, "source": "multpl.com/Shiller"},
    {"year": 1986, "value": 14.28, "source": "multpl.com/Shiller"},
    {"year": 1987, "value": 18.01, "source": "multpl.com/Shiller"},
    {"year": 1988, "value": 14.02, "source": "multpl.com/Shiller"},
    {"year": 1989, "value": 11.82, "source": "multpl.com/Shiller"},
    {"year": 1990, "value": 15.13, "source": "multpl.com/Shiller"},
    {"year": 1991, "value": 15.35, "source": "multpl.com/Shiller"},
    {"year": 1992, "value": 25.93, "source": "multpl.com/Shiller"},
    {"year": 1993, "value": 22.50, "source": "multpl.com/Shiller"},
    {"year": 1994, "value": 21.34, "source": "multpl.com/Shiller"},
    {"year": 1995, "value": 14.89, "source": "multpl.com/Shiller"},
    {"year": 1996, "value": 18.08, "source": "multpl.com/Shiller"},
    {"year": 1997, "value": 19.53, "source": "multpl.com/Shiller"},
    {"year": 1998, "value": 24.29, "source": "multpl.com/Shiller"},
    {"year": 1999, "value": 32.92, "source": "multpl.com/Shiller"},
    {"year": 2000, "value": 29.04, "source": "multpl.com/Shiller"},
    {"year": 2001, "value": 27.55, "source": "multpl.com/Shiller"},
    {"year": 2002, "value": 46.17, "source": "multpl.com/Shiller"},
    {"year": 2003, "value": 31.43, "source": "multpl.com/Shiller"},
    {"year": 2004, "value": 22.73, "source": "multpl.com/Shiller"},
    {"year": 2005, "value": 19.99, "source": "multpl.com/Shiller"},
    {"year": 2006, "value": 18.07, "source": "multpl.com/Shiller"},
    {"year": 2007, "value": 17.36, "source": "multpl.com/Shiller"},
    {"year": 2008, "value": 21.46, "source": "multpl.com/Shiller"},
    {"year": 2009, "value": 70.91, "source": "multpl.com/Shiller"},
    {"year": 2010, "value": 20.70, "source": "multpl.com/Shiller"},
    {"year": 2011, "value": 16.30, "source": "multpl.com/Shiller"},
    {"year": 2012, "value": 14.87, "source": "multpl.com/Shiller"},
    {"year": 2013, "value": 17.03, "source": "multpl.com/Shiller"},
    {"year": 2014, "value": 18.15, "source": "multpl.com/Shiller"},
    {"year": 2015, "value": 20.02, "source": "multpl.com/Shiller"},
    {"year": 2016, "value": 22.18, "source": "multpl.com/Shiller"},
    {"year": 2017, "value": 23.59, "source": "multpl.com/Shiller"},
    {"year": 2018, "value": 24.97, "source": "multpl.com/Shiller"},
    {"year": 2019, "value": 19.60, "source": "multpl.com/Shiller"},
    {"year": 2020, "value": 24.88, "source": "multpl.com/Shiller"},
    {"year": 2021, "value": 35.96, "source": "multpl.com/Shiller"},
    {"year": 2022, "value": 23.11, "source": "multpl.com/Shiller"},
    {"year": 2023, "value": 22.82, "source": "multpl.com/Shiller"},
    {"year": 2024, "value": 25.01, "source": "multpl.com/Shiller"},
    {"year": 2025, "value": 28.16, "source": "multpl.com/Shiller"},
    {"year": 2026, "value": 29.60, "source": "multpl.com/Shiller"},
]

sp500_pe_meta = {
    "source_url": "https://www.multpl.com/s-p-500-pe-ratio/table/by-year",
    "frequency": "annual",
    "range": "1950-2026",
    "points": 77,
    "historical_mean": 17.90,
    "retrieved": "2026-06-04",
    "confidence": "HIGH",
}

# ---------------------------------------------------------------------------
# Dataset D: S&P 500 Dividend Yield — annual 1950-2026 (77 points)
# Source: https://www.multpl.com/s-p-500-dividend-yield/table/by-year
# Retrieved: 2026-06-04
# ---------------------------------------------------------------------------
sp500_dividend_yield: list[dict] = [
    {"year": 1950, "value": 7.44, "source": "multpl.com/Shiller"},
    {"year": 1951, "value": 6.02, "source": "multpl.com/Shiller"},
    {"year": 1952, "value": 5.41, "source": "multpl.com/Shiller"},
    {"year": 1953, "value": 5.84, "source": "multpl.com/Shiller"},
    {"year": 1954, "value": 4.40, "source": "multpl.com/Shiller"},
    {"year": 1955, "value": 3.61, "source": "multpl.com/Shiller"},
    {"year": 1956, "value": 3.75, "source": "multpl.com/Shiller"},
    {"year": 1957, "value": 4.44, "source": "multpl.com/Shiller"},
    {"year": 1958, "value": 3.27, "source": "multpl.com/Shiller"},
    {"year": 1959, "value": 3.10, "source": "multpl.com/Shiller"},
    {"year": 1960, "value": 3.43, "source": "multpl.com/Shiller"},
    {"year": 1961, "value": 2.82, "source": "multpl.com/Shiller"},
    {"year": 1962, "value": 3.40, "source": "multpl.com/Shiller"},
    {"year": 1963, "value": 3.07, "source": "multpl.com/Shiller"},
    {"year": 1964, "value": 2.98, "source": "multpl.com/Shiller"},
    {"year": 1965, "value": 2.97, "source": "multpl.com/Shiller"},
    {"year": 1966, "value": 3.53, "source": "multpl.com/Shiller"},
    {"year": 1967, "value": 3.06, "source": "multpl.com/Shiller"},
    {"year": 1968, "value": 2.88, "source": "multpl.com/Shiller"},
    {"year": 1969, "value": 3.47, "source": "multpl.com/Shiller"},
    {"year": 1970, "value": 3.49, "source": "multpl.com/Shiller"},
    {"year": 1971, "value": 3.10, "source": "multpl.com/Shiller"},
    {"year": 1972, "value": 2.68, "source": "multpl.com/Shiller"},
    {"year": 1973, "value": 3.57, "source": "multpl.com/Shiller"},
    {"year": 1974, "value": 5.37, "source": "multpl.com/Shiller"},
    {"year": 1975, "value": 4.15, "source": "multpl.com/Shiller"},
    {"year": 1976, "value": 3.87, "source": "multpl.com/Shiller"},
    {"year": 1977, "value": 4.98, "source": "multpl.com/Shiller"},
    {"year": 1978, "value": 5.28, "source": "multpl.com/Shiller"},
    {"year": 1979, "value": 5.24, "source": "multpl.com/Shiller"},
    {"year": 1980, "value": 4.61, "source": "multpl.com/Shiller"},
    {"year": 1981, "value": 5.36, "source": "multpl.com/Shiller"},
    {"year": 1982, "value": 4.93, "source": "multpl.com/Shiller"},
    {"year": 1983, "value": 4.31, "source": "multpl.com/Shiller"},
    {"year": 1984, "value": 4.58, "source": "multpl.com/Shiller"},
    {"year": 1985, "value": 3.81, "source": "multpl.com/Shiller"},
    {"year": 1986, "value": 3.33, "source": "multpl.com/Shiller"},
    {"year": 1987, "value": 3.66, "source": "multpl.com/Shiller"},
    {"year": 1988, "value": 3.53, "source": "multpl.com/Shiller"},
    {"year": 1989, "value": 3.17, "source": "multpl.com/Shiller"},
    {"year": 1990, "value": 3.68, "source": "multpl.com/Shiller"},
    {"year": 1991, "value": 3.14, "source": "multpl.com/Shiller"},
    {"year": 1992, "value": 2.84, "source": "multpl.com/Shiller"},
    {"year": 1993, "value": 2.70, "source": "multpl.com/Shiller"},
    {"year": 1994, "value": 2.89, "source": "multpl.com/Shiller"},
    {"year": 1995, "value": 2.24, "source": "multpl.com/Shiller"},
    {"year": 1996, "value": 2.00, "source": "multpl.com/Shiller"},
    {"year": 1997, "value": 1.61, "source": "multpl.com/Shiller"},
    {"year": 1998, "value": 1.36, "source": "multpl.com/Shiller"},
    {"year": 1999, "value": 1.17, "source": "multpl.com/Shiller"},
    {"year": 2000, "value": 1.22, "source": "multpl.com/Shiller"},
    {"year": 2001, "value": 1.37, "source": "multpl.com/Shiller"},
    {"year": 2002, "value": 1.79, "source": "multpl.com/Shiller"},
    {"year": 2003, "value": 1.61, "source": "multpl.com/Shiller"},
    {"year": 2004, "value": 1.62, "source": "multpl.com/Shiller"},
    {"year": 2005, "value": 1.76, "source": "multpl.com/Shiller"},
    {"year": 2006, "value": 1.76, "source": "multpl.com/Shiller"},
    {"year": 2007, "value": 1.87, "source": "multpl.com/Shiller"},
    {"year": 2008, "value": 3.23, "source": "multpl.com/Shiller"},
    {"year": 2009, "value": 2.02, "source": "multpl.com/Shiller"},
    {"year": 2010, "value": 1.83, "source": "multpl.com/Shiller"},
    {"year": 2011, "value": 2.13, "source": "multpl.com/Shiller"},
    {"year": 2012, "value": 2.20, "source": "multpl.com/Shiller"},
    {"year": 2013, "value": 1.94, "source": "multpl.com/Shiller"},
    {"year": 2014, "value": 1.92, "source": "multpl.com/Shiller"},
    {"year": 2015, "value": 2.11, "source": "multpl.com/Shiller"},
    {"year": 2016, "value": 2.03, "source": "multpl.com/Shiller"},
    {"year": 2017, "value": 1.84, "source": "multpl.com/Shiller"},
    {"year": 2018, "value": 2.09, "source": "multpl.com/Shiller"},
    {"year": 2019, "value": 1.83, "source": "multpl.com/Shiller"},
    {"year": 2020, "value": 1.58, "source": "multpl.com/Shiller"},
    {"year": 2021, "value": 1.29, "source": "multpl.com/Shiller"},
    {"year": 2022, "value": 1.71, "source": "multpl.com/Shiller"},
    {"year": 2023, "value": 1.50, "source": "multpl.com/Shiller"},
    {"year": 2024, "value": 1.24, "source": "multpl.com/Shiller"},
    {"year": 2025, "value": 1.15, "source": "multpl.com/Shiller"},
    {"year": 2026, "value": 1.04, "source": "multpl.com/Shiller"},
]

sp500_dividend_yield_meta = {
    "source_url": "https://www.multpl.com/s-p-500-dividend-yield/table/by-year",
    "frequency": "annual",
    "range": "1950-2026",
    "points": 77,
    "historical_mean": 3.15,
    "retrieved": "2026-06-04",
    "confidence": "HIGH",
}

# ---------------------------------------------------------------------------
# Dataset H: US Household Debt / GDP and Federal Debt / GDP
# Household: FRED series HDTGPDUSQ163N
# Federal:   FRED series GFDEGDQ188S (also cross-ref Macrotrends)
# Retrieved: 2026-06-04
# ---------------------------------------------------------------------------
us_debt_ratios: list[dict] = [
    {"year": 1980, "household_debt_gdp_percent": 33.0, "federal_debt_gdp_percent": 33.0, "source": "FRED/Macrotrends"},
    {"year": 1990, "household_debt_gdp_percent": 47.0, "federal_debt_gdp_percent": 53.0, "source": "FRED/Macrotrends"},
    {"year": 2000, "household_debt_gdp_percent": 64.0, "federal_debt_gdp_percent": 56.0, "source": "FRED/Macrotrends"},
    {"year": 2007, "household_debt_gdp_percent": 98.4, "federal_debt_gdp_percent": 61.0, "source": "FRED/Macrotrends"},
    {"year": 2008, "household_debt_gdp_percent": 92.0, "federal_debt_gdp_percent": 72.0, "source": "FRED/Macrotrends"},
    {"year": 2009, "household_debt_gdp_percent": 90.0, "federal_debt_gdp_percent": 87.0, "source": "FRED/Macrotrends"},
    {"year": 2019, "household_debt_gdp_percent": 76.0, "federal_debt_gdp_percent": 106.0, "source": "FRED/Macrotrends"},
    {"year": 2020, "household_debt_gdp_percent": 79.0, "federal_debt_gdp_percent": 125.0, "source": "FRED/Macrotrends"},
    {"year": 2024, "household_debt_gdp_percent": 71.0, "federal_debt_gdp_percent": 121.4, "source": "FRED"},
    {"year": 2025, "household_debt_gdp_percent": 68.0, "federal_debt_gdp_percent": 122.6, "source": "FRED"},
]

us_debt_ratios_meta = {
    "source_url": "FRED HDTGPDUSQ163N (household) + GFDEGDQ188S (federal) / Macrotrends",
    "frequency": "annual (irregular sampling)",
    "range": "1980-2025",
    "points": 10,
    "note": "Key historical inflection points selected; quarterly FRED data available at source",
    "retrieved": "2026-06-04",
    "confidence": "HIGH",
}
