Metadata-Version: 2.5
Name: quantset
Version: 0.1.1
Summary: Build AI hedge funds, autonomous trading agents & quant backtests in Python: 90,000+ global stocks (67 countries, 64yr history), reconciled SEC EDGAR XBRL financials, 4,899 ETF look-throughs, Wall Street consensus estimates, 40-factor point-in-time screener, crypto, FX & macro curves.
Project-URL: Homepage, https://quantset.dev
Project-URL: Documentation, https://quantset.dev/docs/quickstart
Project-URL: Live API Playground, https://quantset.dev/docs/api
Project-URL: Switch from yfinance, https://quantset.dev/docs/switch/yfinance
Project-URL: Switch from FMP, https://quantset.dev/docs/switch/fmp
Project-URL: MCP for Claude & Cursor, https://quantset.dev/docs/agents
Project-URL: Repository, https://github.com/quantset/quantset-python
Project-URL: Issues, https://github.com/quantset/quantset-python/issues
Author-email: QuantSet <hello@quantset.dev>
License: MIT
Keywords: analyst-estimates,backtesting,crypto-api,earnings-calendar,etf-holdings,fmp-alternative,forex-api,market-data,mcp,pandas,polars,quantitative-finance,stock-market-api,stock-screener,treasury-yields,yfinance-alternative
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Provides-Extra: pandas
Requires-Dist: pandas>=2; extra == 'pandas'
Provides-Extra: polars
Requires-Dist: polars>=1; extra == 'polars'
Provides-Extra: test
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# QuantSet — Build AI Hedge Funds, Autonomous Trading Agents & Quant Backtests in Python

**Power your AI hedge fund, autonomous equity research agents, systematic backtesters, and multi-asset trading platforms with institutional market data—without broken `yfinance` scrapers, `429` IP bans, or $24,000/yr terminal contracts.**

**[QuantSet](https://quantset.dev)** gives Python quants, AI agent builders, and trading systems **90,000+ global stocks across 67 countries** (64 years of survivorship-checked US daily OHLCV back to **1962**; S&P 500 to **1927**), **127M+ reconciled SEC EDGAR XBRL facts (`10-K`, discrete quarterly `10-Q`, `Form 13F`, `Form 4` w/ Rule 10b5-1 insider flags, segments & debt walls)**, **4,899 ETF look-through holdings (`175k+` N-PORT constituents)**, **Wall Street consensus estimates & price targets**, a **40+ factor point-in-time stock screener**, **734 crypto pairs**, **42 FX currencies**, **hourly & 5-minute intraday bars**, and **live U.S. Treasury / TIPS / FRED macroeconomic curves**—all in one fast, typed Python SDK with `.to_df()` Pandas & Polars support.

Zero signup required to try: works **immediately out of the box** on benchmark US, London, Tokyo, India, ETF, index, macro, and crypto symbols (`mw_demo`).

**[Live Playground](https://quantset.dev/docs/api)** · **[60-Second Quickstart](https://quantset.dev/docs/quickstart)** · **[vs. yfinance](https://quantset.dev/docs/switch/yfinance)** · **[1-Line FMP Migration](https://quantset.dev/docs/switch/fmp)** · **[7 Buyside Agent Skills](https://github.com/quantset/skills)**

---

## Install & Run in 15 Seconds (No API Key Needed to Start)

```sh
pip install "quantset[pandas]"   # or: pip install "quantset[polars]" / pip install quantset
```

```python
import quantset as qs

# 1. Batch quotes across New York, London, Tokyo & Crypto in one call
quotes = qs.quotes(["NVDA", "AAPL", "global:SHEL.L", "global:1301.T", "crypto:BTCUSDT"]).to_df()

# 2. 64-year split & dividend verified daily OHLCV -> Pandas/Polars DataFrame
prices = qs.prices("NVDA", limit=250).to_df()

# 3. Wall Street forward EPS/Revenue consensus + discrete quarterly SEC 10-Q income statements
est = qs.estimates("NVDA", metric="eps").to_df()
inc = qs.income(["NVDA", "AAPL"], period="quarterly", limit_per_instrument=8).to_df()
```

Unlock all **90,000+ global symbols**, 64-year backtest histories, and full-market factor screening with a `$19` Starter Pack or `$39/mo` Developer plan at **[quantset.dev/pricing](https://quantset.dev/pricing)**.

---

## What You Can Build With QuantSet

### 1. Autonomous AI Hedge Funds & Multi-Agent Valuation Desks
Feed LangGraph, CrewAI, AutoGen, or custom Claude/OpenAI agents clean, hallucination-free fundamental context, Wall Street consensus bars, and SEC filing citations:

```python
with qs.Client() as client:
    # One-call AI Agent Context Pack: snapshot multiples, 4Y financials, top 13F hedge-fund holders, peers & news
    context = client.get("context", ticker="us:NVDA")

    # Audit C-suite Form 4 open-market insider buying vs. pre-scheduled Rule 10b5-1 sales + 13F whales
    insiders = client.get("sec/insider-transactions", ticker="us:NVDA", limit=50)
    whales = client.get("institutional-ownership", ticker="us:NVDA", limit=25)
```

### 2. Zero-Lookahead Point-in-Time Factor Screening & Backtesting
Screen across 40+ valuation, quality, momentum, and shareholder-yield factors (`ROIC`, `EV/FCF`, `EV/EBITDA`, `FFO`, `SMA-200`, net buyback share shrinkage) pinned to an exact historical `as_of` date so your backtest never suffers from lookahead bias:

```python
with qs.Client() as client:
    # Find high-ROIC compounders actively cannibalizing their own share count
    winners = client.screener(
        min_roic=20,
        max_ev_to_fcf=25,
        max_share_count_change_1y=-2,
        limit=50,
    ).to_df()

    # Pull dividend-reinvested total return, max drawdowns & S&P 500 benchmark alpha
    tr = client.get("total-return", ticker="us:AAPL", limit=250)
    dd = client.get("drawdowns", ticker="us:AAPL", limit=250)
```

### 3. Multi-Asset Portfolio Risk & 4,899-ETF Look-Through Engines
Unpack any of 4,899 ETFs down to their exact Form N-PORT underlying stock weights—or flip it around to see every ETF holding a specific stock—plus true USD correlation matrices:

```python
with qs.Client() as client:
    # Which ETFs have the highest portfolio weight in NVDA right now?
    etf_crowding = client.get("etf-exposures", ticker="us:NVDA", limit=25).to_df()

    # Cross-asset USD correlation & volatility matrix across US equities, global stocks & crypto
    corr = client.get("analytics/correlations", tickers=["us:NVDA", "global:SHEL.L", "crypto:BTCUSDT"])
```

---

## Why Quants & AI Teams Switch Off `yfinance` & Legacy Feeds

- **Zero `429 Too Many Requests` or cookie/crumb bans on AWS & GitHub Actions:** Deterministic REST contract with explicit `X-RateLimit-Remaining` and `Retry-After` headers.
- **Every US Financial Figure Reconciles to SEC EDGAR XBRL:** Carries `form` (`10-K`/`10-Q`), SEC `accession`, public filing date (`available_at` for point-in-time backtests), and direct `sec.gov` highlight citations.
- **True Discrete Quarters (Never YTD 10-Q Cash-Flow Traps):** Automatically separates Q2/Q3 year-to-date cash flows into true discrete 3-month quarters (`period_basis: "discrete_quarter"`).
- **3-Way Evidence-Checked `adj_close` & Zero Fake Zeros:** Splits and dividends are cross-checked against actual price gaps. Unreported line items return `None` (`null`)—never silently coerced to `0`.
- **1-Line Drop-In FMP Migration:** Moving off Financial Modeling Prep? Swap the base URL and keep your existing `/stable/` or `/v3/` paths and camelCase field names unchanged.

---

## Full Method Reference (`qs.*` & `client.*`)

| Domain | Built-in SDK Methods |
| --- | --- |
| **Global Quotes, 64Y History & Intraday** | `instruments`, `quotes`, `prices`, `price_history`, `intraday`, `snapshot`, `get("market-session", ticker="NVDA")` |
| **40-Factor Stock Screener & Peer Comps** | `screener`, `fundamentals`, `get("peers", ticker="NVDA")`, `get("context", ticker="NVDA")` |
| **Quant Returns, Alpha & Correlations** | `get("total-return", ticker="NVDA")`, `get("drawdowns", ticker="NVDA")`, `get("analytics/correlations", ...)` |
| **Wall Street Consensus, Targets & Earnings** | `estimates`, `earnings`, `get("analyst-consensus", ticker="NVDA")`, `get("analyst-ratings", ticker="NVDA")`, `get("calendar/earnings")` |
| **4,899 ETFs, Splits, Dividends & Buybacks** | `etf_holdings`, `get("etf-exposures", ticker="NVDA")`, `corporate_actions` |
| **Macro, Treasury/TIPS Curves & 42 FX Pairs** | `treasury_yields`, `macro_series`, `macro`, `fx` |
| **SEC XBRL Statements, Segments & Insiders** | `income`, `balance_sheet`, `cash_flow`, `sec_facts`, `get("segments", ticker="NVDA")`, `get("debt-maturities", ticker="NVDA")`, `get("insider-activity", ticker="NVDA")`, `get("institutional-ownership", ticker="NVDA")` |

---

## Snapshot-Pinned Pagination & Error Handling

- `price_history("NVDA", start="2020-01-01", limit=500, max_pages=10)` automatically paginates and returns oldest-first ascending bars pinned to one immutable `snapshot_id`.
- HTTP errors raise `qs.QuantsetError` (subclass of `httpx.HTTPStatusError`) with `exc.code`, `exc.detail`, `exc.field`, `exc.candidates`, and `exc.retry_after`.

## Links

- **Website & API Keys:** [quantset.dev](https://quantset.dev)
- **Interactive API Reference:** [quantset.dev/docs/api](https://quantset.dev/docs/api)
- **7 Buyside Skills for Claude Code & Cursor:** [github.com/quantset/skills](https://github.com/quantset/skills)
- **Full LLM Contract (`llms-full.txt`):** [api.quantset.dev/llms-full.txt](https://api.quantset.dev/llms-full.txt)
