← ClaudeAtlas

fundamental-and-macro-datalisted

Company fundamentals and macro series with correct point-in-time semantics. TRIGGER - 10-K, 10-Q, 8-K, 13F, Forms 3/4/5, filings, EDGAR, XBRL, accession number, CIK, "which CIK is this ticker", ticker-to-CIK mapping, edgartools; parsing an income statement or balance sheet out of a filing; revenue, EPS or balance-sheet history as it was known on a past date; restatements; earnings dates; or CPI, GDP, payrolls, unemployment, interest rates, FRED, ALFRED, data vintages and revisions. Load before joining ANY fundamental or macro series to prices: the obvious join is a look-ahead bug, and the SEC frames API cannot be made point-in-time. SKIP for price and OHLCV vendors (market-data-sourcing) and Chinese filings (china-ashare-data).
howard-lynn-ye/fin-skills · ★ 1 · Data & Documents · score 77
Install: claude install-skill howard-lynn-ye/fin-skills
# Fundamentals and macro data Both halves of this domain share one failure: **the obvious join is a look-ahead bug.** Fundamentals are published months after the period they describe and are then rewritten; macro series are revised for years. Sections 2 and 5 are the ones that change your results. ## 1. SEC EDGAR — the two hard rules ```python HDR = {"User-Agent": "Your Company you@example.com"} # REQUIRED — no UA → HTTP 403 ``` ✅ Empirically confirmed: no User-Agent → **403**; any UA → 200. The header is enforced for *presence*, not content — but sending a fake browser UA is a policy violation and gets IPs blocked. ✅ **Rate limit: 10 requests/second**, quoted from the SEC webmaster FAQ. | Endpoint | Detail | |---|---| | `data.sec.gov/submissions/CIK##########.json` | Zero-padded 10-digit CIK. `filings.recent` caps at ~1,000; older paginate via `filings.files[]` | | `data.sec.gov/api/xbrl/companyfacts/CIK##########.json` | AAPL = **3.8 MB**, 503 us-gaap tags. Fact fields: `start, end, val, accn, fy, fp, form, filed, frame` | | `data.sec.gov/api/xbrl/companyconcept/CIK##########/us-gaap/<Tag>.json` | Single tag, same fact schema | | `data.sec.gov/api/xbrl/frames/us-gaap/<Tag>/USD/CY2023.json` | 🚨 **not point-in-time — see §2.3** | | `efts.sec.gov/LATEST/search-index?q=…&forms=10-K` | Full-text search. ✅ **Coverage starts 2001** — it does *not* reach 1994–2000 filings | | `sec.gov/files/company_tickers.json` | 10,412 rows. 🚨 **A current snapshot — survivorship-biased**