# Yahoo Finance — URL-Schema & Datenpunkte

Referenz für gezielte `web_fetch`-Calls gegen Yahoo Finance.

## Basis-URLs pro Ticker

Alle relativ zu `https://finance.yahoo.com/quote/<TICKER>`:

| Pfad | Datenpunkte |
|---|---|
| `/` | Snapshot: Kurs, Market Cap, P/E, EPS, Div Yield, 52w-Range |
| `/key-statistics` | Valuation, Profitability, Cash Flow, Balance Sheet Highlights |
| `/profile` | Business Summary, Sektor, Industry, Executives, HQ |
| `/financials` | Income Statement (annual + quarterly) |
| `/balance-sheet` | Assets, Liabilities, Equity (annual + quarterly) |
| `/cash-flow` | Operating/Investing/Financing CF |
| `/analysis` | Analyst Estimates, Revenue/EPS Estimates, Growth Forecasts |
| `/history?period1=...&period2=...` | OHLCV-Daten (Unix-Timestamps) |
| `/holders` | Major Holders, Institutional, Insider Ownership |
| `/sustainability` | ESG-Scores |
| `/calendar/earnings?symbol=<T>` | Earnings-Date, EPS-Estimate |
| `/news` | News-Feed pro Ticker |

## Datenpunkte Übersichts-Seite

Beim Parsen der `/quote/<T>` Seite findest du in der Regel:

### Header-Block
- **Symbol & Name** (z.B. "Apple Inc. (AAPL)")
- **Letzter Kurs** + Tages-Change ($ und %)
- **After-Hours-Kurs** (falls verfügbar)
- **Currency** + **Exchange**

### Summary-Table (rechts)
- Previous Close
- Open
- Bid / Ask
- Day's Range
- 52 Week Range
- Volume / Avg. Volume
- Market Cap
- Beta (5Y Monthly)
- PE Ratio (TTM)
- EPS (TTM)
- Earnings Date
- Forward Dividend & Yield
- Ex-Dividend Date
- 1y Target Est

## Datenpunkte Key Statistics

### Valuation Measures
- Market Cap (intraday)
- Enterprise Value
- Trailing P/E
- Forward P/E
- PEG Ratio (5yr expected)
- Price/Sales (ttm)
- Price/Book (mrq)
- Enterprise Value/Revenue
- Enterprise Value/EBITDA

### Financial Highlights
- **Profitability:** Profit Margin, Operating Margin
- **Management Effectiveness:** ROA, ROE
- **Income Statement:** Revenue (TTM), Revenue Per Share, Quarterly Revenue Growth, Gross Profit, EBITDA, Net Income, Diluted EPS, Quarterly Earnings Growth
- **Balance Sheet:** Total Cash, Total Debt, Debt/Equity, Current Ratio, Book Value Per Share
- **Cash Flow Statement:** Operating CF, Levered Free CF

### Trading Information
- **Stock Price History:** Beta, 52-Week Change, S&P500 52-Week Change, 52 Week High/Low, 50-Day MA, 200-Day MA
- **Share Statistics:** Avg Vol (3mo/10d), Shares Outstanding, Float, % Held by Insiders, % Held by Institutions, Short Ratio, Short % of Float, Short % of Shares Outstanding
- **Dividends & Splits:** Forward Annual Dividend Rate, Forward Annual Dividend Yield, Trailing Annual Dividend Rate, Trailing Annual Dividend Yield, 5 Year Average Dividend Yield, Payout Ratio, Dividend Date, Ex-Dividend Date, Last Split Factor, Last Split Date

## Historical Data — URL-Schema

```
https://finance.yahoo.com/quote/<T>/history?period1=<UNIX>&period2=<UNIX>&interval=1d
```

- `period1` = Start (Unix-Sekunden)
- `period2` = Ende (Unix-Sekunden)
- `interval` = `1d` / `1wk` / `1mo`

Für echte OHLCV-Datendownloads besser `yfinance` Python-Library in `code_execution`:

```python
import yfinance as yf
ticker = yf.Ticker("AAPL")
hist = ticker.history(period="1y", interval="1d")
info = ticker.info  # dict mit allen Metadaten
financials = ticker.financials
balance = ticker.balance_sheet
cashflow = ticker.cashflow
recommendations = ticker.recommendations
holders = ticker.major_holders
institutional = ticker.institutional_holders
actions = ticker.actions  # Dividends + Splits
```

## Symbol-Konventionen

| Markt | Suffix-Beispiel |
|---|---|
| NASDAQ/NYSE (US) | `AAPL`, `MSFT` (kein Suffix) |
| Frankfurt/Xetra | `SAP.DE`, `VOW3.DE` |
| London | `BP.L`, `HSBA.L` |
| Paris | `MC.PA`, `OR.PA` |
| Toronto | `SHOP.TO`, `RY.TO` |
| Hongkong | `0700.HK`, `0005.HK` |
| Tokyo | `7203.T`, `6758.T` |
| Crypto | `BTC-USD`, `ETH-USD` |
| Indizes | `^GSPC` (S&P500), `^DJI` (Dow), `^IXIC` (NASDAQ), `^GDAXI` (DAX) |
| Forex | `EURUSD=X`, `GBPUSD=X` |
| Futures | `GC=F` (Gold), `CL=F` (Crude Oil) |

## Rate-Limiting & Robustheit

- Yahoo blockt bei aggressivem Scraping (>5-10 req/s pro IP)
- **Lösung:** Parallel-Block mit 3-5 Calls, dann Pause, dann nächster Block
- Bei 429-Errors: 60s warten, dann Retry
- User-Agent setzen hilft (web_fetch macht das default)
- HTML-Struktur ändert sich gelegentlich → defensiv parsen

## Alternativen wenn Yahoo blockt

- **Stooq** (`stooq.com`) — historische OHLCV, CSV-Downloads
- **Investing.com** — ähnliche Coverage, eigenes Layout
- **Google Finance** (`google.com/finance/quote/<T>:<EXCH>`) — schlanker
- **TradingView** (`tradingview.com/symbols/<EXCH>-<T>/`) — Charts
- **Finnhub / Alpha Vantage** — APIs mit Free-Tier (Key nötig)
