Skip to main content
ClaudeWave
Skill26.2k repo starsupdated yesterday

sec-edgar

The sec-edgar skill provides free access to U.S. SEC EDGAR filings and financial data without authentication. It resolves stock tickers to CIK identifiers, retrieves recent filings (10-K, 10-Q, 8-K) with document URLs, and extracts XBRL financial metrics using the bundled sec_edgar_client transport. Use this skill for U.S. equity research requiring regulatory filings and standardized financial reporting; it is rate-limited by IP and covers only U.S.-listed companies.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/sec-edgar && cp -r /tmp/sec-edgar/agent/src/skills/sec-edgar ~/.claude/skills/sec-edgar
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# SEC EDGAR

## Overview

The U.S. Securities and Exchange Commission (SEC) publishes free, no-auth JSON endpoints for every reporting company on its EDGAR system: a ticker-to-CIK directory, a recent-filings index, and the full set of XBRL ("companyfacts") financial concepts a company has reported. This skill documents how Vibe-Trading fetches that data through the bundled `sec_edgar_client` transport and the `get_sec_filings` agent tool.

This is the **fetch** skill — it covers how to get filing-index rows, document URLs, and us-gaap metric series out of EDGAR. The separate `edgar-sec-filings` skill is the **methodology** layer (how to read a 10-K, score insider activity, interpret 8-K items); for any actual data retrieval it delegates here.

Scope is the United States only. EDGAR has no coverage of A-shares, HK, or other non-U.S. markets — route those through `tushare` / `yfinance` / `akshare` instead.

> Link convention: every link below that points into `references/` is written with the **skill-name prefix** (`sec-edgar/references/...`). The `read_file` tool resolves paths with `skills/` as the root; dropping the prefix breaks the read. Keep the `<skill-name>/references/...` form when adding new docs.

## Quick Start

Preferred path — the `get_sec_filings` tool (read-only, throttled, returns strict JSON):

```json
{ "ticker": "AAPL", "form": "10-K", "limit": 5 }
```

```json
{ "ticker": "MSFT", "metric": "Revenues", "limit": 8 }
```

The tool resolves the ticker to a CIK, fetches the filing index (optionally filtered by `form`), and — when `metric` is set — also pulls the XBRL series for that us-gaap concept. See `sec-edgar/references/get_sec_filings_tool.md` for the full parameter and envelope contract.

Script path — call the `sec_edgar_client` transport directly when you need raw JSON the tool does not surface (e.g. company address, all units of a concept):

```python
from backtest.loaders.sec_edgar_client import cik_for, get_submissions, get_company_facts

cik = cik_for("AAPL")            # "0000320193", or None if not in the SEC table
submissions = get_submissions(cik)   # recent-filings index + company metadata
facts = get_company_facts(cik)       # all reported XBRL concepts
```

A runnable end-to-end example lives at `sec-edgar/scripts/sec_filings_example.py`.

## Parameter & Format Notes

- **Ticker**: U.S. equity symbol, case-insensitive (`AAPL`, `msft`). Resolved to a CIK via the SEC company-tickers table; an unlisted ticker returns an error envelope (tool) or `None` (`cik_for`).
- **CIK**: the SEC Central Index Key, normalized to a **zero-padded 10-digit** string (`320193` → `"0000320193"`). The submissions and companyfacts endpoints require the padded form; document URLs use the un-padded form.
- **Form**: SEC form type, case-insensitive (`10-K`, `10-Q`, `8-K`, `DEF 14A`, `4`). Omit to return all recent forms.
- **Metric**: an XBRL `us-gaap` concept name (`Revenues`, `NetIncomeLoss`, `Assets`, `StockholdersEquity`). Case-sensitive — these are exact taxonomy element names.
- **Dates**: SEC returns ISO `YYYY-MM-DD` strings (e.g. `2023-09-30`).
- **Return shape**: the tool returns a JSON-string envelope; the client returns decoded JSON (`dict`).

## Reference Docs

- [sec_edgar_client transport](sec-edgar/references/sec_edgar_client.md) — `cik_for`, `get_submissions`, `get_company_facts`, CIK padding, throttle bucket, contact User-Agent.
- [get_sec_filings tool](sec-edgar/references/get_sec_filings_tool.md) — parameters, success/error envelope, `filings[]` and `metric` field shapes.
- [Endpoints & rate limits](sec-edgar/references/endpoints_and_limits.md) — the three public endpoints, secid/CIK rules, fair-access policy, env overrides.
- [Common forms & XBRL concepts](sec-edgar/references/forms_and_concepts.md) — frequently used form types and us-gaap concept names.

## Scripts

- [End-to-end fetch example](sec-edgar/scripts/sec_filings_example.py) — ticker → CIK → recent 10-Ks → a metric series, using the bundled client.

## Notes

- **Free, no API key**: EDGAR is public. The only requirement is a descriptive `User-Agent` carrying a contact address; the client ships a compliant default and honors the `VIBE_TRADING_SEC_UA` override.
- **Rate-limited by IP**: the SEC throttles per source IP and temporarily blocks clients that burst without a contact UA. Every request routes through the shared `backtest.loaders._http` throttle under the `"sec"` host bucket (≈0.12s spacing floor, overridable via `VIBE_TRADING_SEC_MIN_INTERVAL`). Do not bypass the client with raw `requests` loops.
- **United States only**: a non-U.S. symbol will not resolve to a CIK.
- **Transport, not a backtest loader**: `sec_edgar_client` is a thin REST client, not a `DataLoaderProtocol`. There is no `source: "sec_edgar"` backtest mode — EDGAR feeds the `get_sec_filings` tool, not the bar-loading layer.
- **Reporting lag**: filings appear after the company submits; XBRL companyfacts trail the filing. Insider (Form 4) and 13F latency caveats are covered in the `edgar-sec-filings` methodology skill.
- **Research only**: this data supports research and does not constitute investment advice.
vibe-tradingSkill

Professional finance research toolkit — backtesting (7 engines + benchmark comparison panel), factor analysis, Alpha Zoo (452 pre-built alphas across qlib158/alpha101/gtja191/academic), options pricing, 79 finance skills, 29 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 18 market-data sources (tushare, yfinance, okx, akshare, baostock, tencent, mootdx, ccxt, futu, local, eastmoney, sina, stooq, yahoo, plus optional-key finnhub/alphavantage/tiingo/fmp).

adr-hshareSkill

ADR/H-share/A-share cross-listing premium analysis — track pricing gaps between US-listed ADRs, HK-listed H-shares, and A-shares for arbitrage signals, dual-listing valuation, and delisting risk assessment.

akshareSkill

AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Primary fallback for tushare and yfinance.

alpha-zooSkill

Browse and bench the bundled alpha zoos — prebuilt cross-sectional factor libraries (Kakushadze 101, GTJA 191, Qlib 158, Fama-French / Carhart). Use when the user asks "which alphas exist", wants metadata on a named alpha, or wants to run IC/IR on a whole zoo over a universe.

ashare-pre-st-filterSkill

A 股 ST/*ST 风险预测框架 — 基于最新中报/三季报或业绩预告/快报,预测下一财年是否会因营收、利润、净资产、分红不达标而被风险警示,并将新浪监管处罚记录作为独立证据面纳入风险等级。仅适用于 A 股,不预测财务造假。

asset-allocationSkill

Asset allocation theory and optimizer usage — MPT / Black-Litterman / risk budgeting / all-weather strategy, including guides for 4 optimizers and rebalancing rules.

backtest-diagnoseSkill

Diagnose failed or underperforming backtests, locate the root cause, and fix the issue

behavioral-financeSkill

Behavioral finance applications: theories of overreaction and underreaction, behavioral explanations for momentum and reversal, investor sentiment cycles, cognitive-bias checklists, and debiasing quantitative strategies.