💎 Valuein — Community, Docs, and Discovery Hub
This repository is the public home for Valuein's SEC EDGAR fundamentals data product. It is the place to:
- Find documentation (methodology, data catalog, compliance, SLA, Excel guide)
- Run examples and notebooks that connect to our live data
- Open support tickets, bug reports, and feature requests
- Discover our distribution channels — the Python SDK, the MCP server, the Excel template, and the REST API
The source code for the SDK, MCP server, and data pipeline lives in dedicated repositories. This repo is the front door.
📦 The Data Product
Survivorship-bias-free, point-in-time US fundamentals sourced from SEC EDGAR:
- 12M+ filings (10-K, 10-Q, 8-K, 20-F + amendments), 1990–present
- 108M+ facts across 10,000+ active and delisted US entities
- 11,966 XBRL tags normalized to ~150 canonical
standard_conceptvalues - Cloud Parquet on Cloudflare R2 — stream with DuckDB, no local downloads
Why it's different
| Feature | Why it matters |
|---|---|
| 🕒 Point-in-Time (PIT) | Every fact carries filing_date and knowledge_at — no look-ahead bias in backtests |
| ⚖️ Survivorship-bias free | Delisted, bankrupt, acquired companies included |
| 📊 Standardized concepts | 11,966 raw XBRL tags mapped to canonical names (both are on the fact table) |
| 🚀 DuckDB native | Millisecond analytics via httpfs against remote Parquet |
| ☁️ Zero-setup | pip install and query — no database provisioning, no large downloads |
🚚 Distribution Channels
We deliver the same underlying data through five interfaces so it lands wherever you already work.
| Channel | For | How to get it |
|---|---|---|
| Python SDK | Quants, engineers, data scientists | pip install valuein-sdk · PyPI |
| MCP Server | AI agents (Claude, Cursor, Codex, etc.) | https://mcp.valuein.biz/mcp · see MCP Discovery |
| Excel / Power Query | Financial analysts, CPAs, researchers | Excel setup guide |
| Web Dashboard | Non-technical users, retail, executives | valuein.biz |
| REST API | B2B partners, third-party integrations | https://data.valuein.biz — contact us for the integration guide |
All channels authenticate with the same Stripe-issued API token and share the same tier model.
💳 Plans & Access
| Plan | Coverage | Data | Price | Get Access |
|---|---|---|---|---|
| Sample | S&P 500 · last 5 years · active + inactive | Public, read-only | Free | No registration — works out of the box |
| S&P 500 | S&P 500 · full history · active + inactive | Full Parquet access | Free | Register |
| Pro | Full US universe · all core fundamentals | Full Parquet access | $200 / month | Subscribe |
| Pro (Annual) | Same as Pro · 20% discount | Full Parquet access | $1,920 / year | Subscribe |
One token unlocks the SDK, MCP, Excel, and REST API — no per-channel billing.
⚡ Quickstart — Python SDK
1. Install
pip install valuein-sdk
2. Query real data without a token (Sample tier, no registration):
from valuein_sdk import ValueinClient
with ValueinClient() as client:
print(client.me()) # {plan, status, email, createdAt}
print(client.manifest()) # snapshot metadata
print(client.tables()) # loaded table names
print(client.get_schema("fact")) # column → DuckDB type
df = client.query("SELECT COUNT(*) FROM entity")
print(df)
3. Unlock the full dataset — add a token, no code changes needed:
echo 'VALUEIN_API_KEY="your_token_here"' >> .env
4. Production pattern — context manager, typed errors, pre-built SQL templates:
from valuein_sdk import ValueinClient, ValueinError
with ValueinClient() as client:
try:
df = client.run_template(
"fundamentals_by_ticker",
ticker="AAPL",
start_date="2020-01-01",
end_date="2024-01-01",
form_types=["10-K", "10-Q"],
metrics=["TotalRevenue", "NetIncome", "OperatingCashFlow"],
)
print(df)
except ValueinError as e:
print(f"SDK error: {e}")
🗂️ Data Model Essentials
Full schema in docs/schema.json and docs/data_catalog.md.
| Table | Description | Records |
|---|---|---|
references | Start here. Flat join of entity + security + index_membership. One row per security with is_sp500, is_active, sector, exchange. Replaces 3-table joins. | ~7K |
entity | Company metadata | 19K+ |
security | Ticker history (SCD Type 2) | 7K+ |
filing | Filing metadata (10-K, 10-Q, 8-K, 20-F + amendments) | 12M+ |
fact | Financial statement facts — raw concept + canonical standard_concept on every row | 108M+ |
valuation | Two-stage DCF + DDM intrinsic values per entity per period | 19K+ |
taxonomy_guide | 2026 US GAAP Taxonomy Guide | 11,966 |
index_membership | Historical index entry/exit dates | 8K+ |
Key joins
references.cik → entity.cik
security.entity_id → entity.cik
filing.entity_id → entity.cik
fact.entity_id → entity.cik
fact.accession_id → filing.accession_id
index_membership.security_id → security.id
Date columns — which to use when
| Column | Table | Use for |
|---|---|---|
report_date / period_end | filing / fact | Fiscal calendar alignment |
filing_date | filing | PIT backtest filter — when the SEC received the filing |
knowledge_at | fact | Millisecond-precision PIT for intraday research |
For cross-company backtests, always filter by
filing_date <= trade_date. Usingreport_dateintroduces look-ahead bias.
Canonical standard_concept names
Query fact.standard_concept with canonical names like 'TotalRevenue', 'NetIncome', 'OperatingCashFlow', 'CAPEX', 'StockholdersEquity' — not raw XBRL tags ('Revenues', 'NetIncomeLoss', 'Assets'). The full canonical list lives in docs/data_catalog.md.
DuckDB query patterns that pay off
Start from references — zero joins for cross-company filters:
SELECT symbol, name, sector
FROM references
WHERE is_sp500 = TRUE AND is_active = TRUE AND sector ILIKE '%technology%'
LATERAL for the latest filing per company:
JOIN LATERAL (
SELECT accession_id FROM filing
WHERE entity_id = r.cik AND form_type = '10-K'
ORDER BY filing_date DESC LIMIT 1
) f ON TRUE
Pivot multiple concepts in one fact scan:
SELECT
MAX(CASE WHEN standard_concept = 'TotalRevenue' THEN numeric_value END) AS revenue,
MAX(CASE WHEN standard_concept = 'StockholdersEquity' THEN numeric_value END) AS equity
FROM fact
WHERE standard_concept IN ('TotalRevenue', 'StockholdersEquity')
GROUP BY accession_id
Cash flow items: use
COALESCE(derived_quarterly_value, numeric_value)— Q2/Q3 10-Qs report YTD, this column isolates the quarter. CAPEX sign varies by filer — alwaysABS(capex).
🐍 Examples in this Repository
All examples work against the SDK published on PyPI. The Sample tier runs without a token.
Python scripts (examples/python/)
| Script | Level | What it shows |
|---|---|---|
getting_started.py | Beginner | First query, token check, entity counts by sector |
usage.py | Reference | Every public SDK method demonstrated |
entity_screening.py | Beginner | Screen by sector, SIC code, active vs inactive |
financial_analysis.py | Intermediate | Revenue trends, margins, peer comparison |
pit_backtest.py | Intermediate | Correct PIT discipline, restatement impact |
survivorship_bias.py | Intermediate | Delisted companies, index membership, bias quantification |
production-ready.py | Advanced | Service pattern for FastAPI / Celery / Airflow integrations |
Run any example:
# Sample tier — no token needed
python examples/python/getting_started.py
# Paid tier
VALUEIN_API_KEY=xxx python examples/python/pit_backtest.py
Jupyter notebooks (examples/notebooks/)
| Notebook | Open in Colab |
|---|---|
| Quickstart | |
| Fundamental Analysis | |
| PIT Backtest | |
| Survivorship Bias |
🛡️ Error Handling
The SDK exposes typed exceptions so your code can react appropriately to each failure mode:
from valuein_sdk import (
ValueinClient,
ValueinAuthError, # HTTP 401/403 — invalid or expired token
ValueinPlanError, # HTTP 403 — endpoint requires a higher plan
ValueinNotFoundError, # HTTP 404 — table or endpoint does not exist
ValueinRateLimitError, # HTTP 429 — includes .retry_after (seconds)
ValueinAPIError, # HTTP 5xx — includes .status_code
)
with ValueinClient() as client:
try:
df = client.query("SELECT * FROM fact LIMIT 1000")
except ValueinAuthError:
print("Check your VALUEIN_API_KEY — it may be expired or invalid.")
except ValueinPlanError:
print("This query requires a higher-tier plan. Upgrade at valuein.biz.")
except ValueinRateLimitError as e:
print(f"Rate limited. Retry allowed in {e.retry_after}s.")
except ValueinAPIError as e:
print(f"Gateway error (status {e.status_code}).")
📊 Excel Integration
Stream SEC fundamentals straight into Excel via Power Query — no Python, no scripts.
Requirements: Microsoft 365 (build 16.0.17531+) and an active API token.
Quick path:
- Get the template — follow the download link in
docs/excel-guide.md - Open in Excel — enable editing and content
- Paste your token into the START HERE sheet
- Click
Data > Refresh All
The workbook ships with 8 pre-configured sheets: Income Statement, Balance Sheet, Cash Flow, Entities, Securities, Filings, Index Membership, and the Data Dictionary. The full walkthrough — including token setup, Named Ranges, refresh troubleshooting, and the Power Query M-language internals — is in docs/excel-guide.md.
On Excel 2019 or earlier, Parquet.Document() is unavailable; email support@valuein.biz for CSV exports.
🤖 MCP Discovery — AI Agents
Valuein's MCP server exposes SEC EDGAR fundamentals to any MCP-capable AI agent (Claude, Cursor, Codex, and the wider agent ecosystem).
- Endpoint:
https://mcp.valuein.biz/mcp(Streamable HTTP, MCP spec 2025-11-25) - Auth:
Authorization: Bearer <your_api_token>— the same token used by the SDK and Excel - Manifest:
server.jsonin this repo is the source of truth for the registry listing - Registry: registry.modelcontextprotocol.io — search for
io.github.valuein/mcp-sec-edgar
Tools exposed
| Tool | Description | Available in |
|---|---|---|
search_companies | Ticker / name / CIK lookup | All plans |
get_sec_filing_links | Direct links to 10-K, 10-Q, 8-K, 20-F on SEC EDGAR | All plans |
get_company_fundamentals | Annual (all plans) or quarterly + extended history (Pro) | Free → Pro |
get_financial_ratios | Margins, returns, leverage, efficiency ratios | Pro |
get_dcf_inputs | Raw inputs for two-stage DCF + DDM models | Enterprise |
Configure in an AI client
Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"valuein": {
"url": "https://mcp.valuein.biz/mcp",
"headers": { "Authorization": "Bearer YOUR_VALUEIN_API_KEY" }
}
}
}
Any MCP-compliant client that supports Streamable HTTP remotes will work with the same URL + Bearer token.
📚 Documentation
Everything in docs/ is kept in sync with the production data.
| Document | What's in it |
|---|---|
docs/METHODOLOGY.md | Sourcing, PIT architecture, restatement handling, XBRL normalization |
docs/COMPLIANCE_AND_DDQ.md | Data provenance, MNPI policy, PIT integrity, security, SLA summary |
docs/SLA.md | Uptime targets, data freshness, support response times, SLA credits |
docs/excel-guide.md | Full Excel / Power Query setup walkthrough |
docs/data_catalog.md | Canonical standard_concept names and definitions |
docs/DATA_CATALOG.xlsx | Same catalog as a workbook — columns, types, sample values |
docs/schema.json | Machine-readable table + column schema |
💬 Support & Community
GitHub Issues is the primary support channel. Four templates cover the common cases:
| I want to… | Open |
|---|---|
| Report incorrect or suspicious data | Data Quality Report |
| Request a feature, concept, or dataset | Feature Request |
| Report an outage or degraded service | Service Outage |
| Ask a general question | General Question |
For private or contractual matters (DPAs, procurement, DDQs, enterprise SLAs): support@valuein.biz.
Contributions — examples, notebook improvements, documentation fixes — are welcome. See CONTRIBUTING.md for the workflow and style guide.
📄 License & Disclosure
Apache 2.0. See NOTICE for attribution.
This repository is provided for research and educational purposes. It is not investment advice. No warranty of fitness for any particular trading, investment, or regulatory purpose is implied.
