Skip to main content

Official Python SDK for the Valuein US Core Fundamentals dataset — SEC EDGAR financials via API.

Project description

Valuein Financial Data Essentials (FDE)

PyPI version Python 3.11+ License

Institutional-grade SEC fundamental data. Point-in-Time accurate, survivorship-bias free.

Standardized US Core Fundamentals (10-K, 10-Q, 8-K) from 1990 to present. 20,000+ active and delisted entities. ~105M facts. Zero look-ahead bias.


Installation

# Set your API key (get one at valuein.biz)
export VALUEIN_API_KEY="your_api_key"

# Install
uv add valuein-sdk
# or: pip install valuein-sdk

Quickstart

from valuein_sdk import ValueinClient

client = ValueinClient()  # reads VALUEIN_API_KEY from env

# Run any SQL against the data warehouse
df = client.query("""
    SELECT s.symbol, f.report_date, fa.standard_concept, fa.numeric_value
    FROM security s
    JOIN filing f  ON s.entity_id = f.entity_id
    JOIN fact fa   ON f.accession_id = fa.accession_id
    WHERE s.symbol = 'AAPL' AND s.is_active = TRUE
    ORDER BY f.report_date DESC
    LIMIT 20
""")
print(df)

That's it. No downloads — DuckDB streams only the rows your query needs from Cloudflare R2.


Core Concepts

Point-in-Time (PIT) Backtesting

Every fact has a filing_date (when the SEC received the filing) and a report_date (the fiscal period end). Always filter by filing_date <= your_trade_date to avoid look-ahead bias.

# Correct PIT backtest — only use data the market had on 2024-01-15
df = client.query("""
    SELECT fa.standard_concept, fa.numeric_value
    FROM fact fa
    JOIN filing f ON fa.accession_id = f.accession_id
    JOIN security s ON f.entity_id = s.entity_id
    WHERE s.symbol = 'MSFT'
      AND f.filing_date <= '2024-01-15'   -- ← PIT gate
    ORDER BY f.report_date DESC
    LIMIT 10
""")

Available Tables

Table Description
entity Legal company entities (CIK, name, sector, SIC)
security Ticker symbols with date ranges (valid_from, valid_to, is_active)
filing SEC filing metadata (form type, filing date, report date)
fact Standardized financial facts (standard_concept, numeric_value, unit)
taxonomy_guide Human-readable definitions of all standard concepts
index_membership Historical S&P 500 and other index membership

Pre-built SQL Templates

40+ ready-to-run templates for common quant workflows:

df = client.run_template(
    "01_fundamentals_by_ticker",
    ticker="NVDA",
    form_types=["10-K"],
    metrics=["Revenues", "NetIncomeLoss"],
    start_date="2020-01-01",
    end_date="2026-01-01",
)

See valuein_sdk/queries/ for the full list (Altman Z-score, DuPont, TTM, FCF, and more).


API Reference

client = ValueinClient(api_key="...", gateway_url="...")  # gateway_url optional

client.query(sql)                    # Run arbitrary DuckDB SQL → DataFrame
client.get(table)                    # Download full table → DataFrame
client.run_template(name, **kwargs)  # Run a named .sql template → DataFrame
client.tables()                      # List available table names
client.me()                          # Token details (plan, status, email)
client.manifest()                    # Snapshot metadata (current data date)

Resources


⚠️ For educational and research purposes only. Not financial advice.

Apache-2.0 License — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

valuein_sdk-0.2.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valuein_sdk-0.2.0-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file valuein_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: valuein_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for valuein_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 95f6a1cd79eb9532cf4ee6995211b8eeb6cdda31111ba161b48df0e568ffb002
MD5 576fa87678e4f8546b5e6af078e5bf43
BLAKE2b-256 c76fda65a0c5148a48ec4e2fcdb6f1c8c372cf34476177537e9b395641999b0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for valuein_sdk-0.2.0.tar.gz:

Publisher: publish.yml on valuein/quants

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file valuein_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: valuein_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 40.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for valuein_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a7309253739c6f85e8b614f0d0ce9072133a3b2b7439526d12e29c007aa6595
MD5 6f5ce2918886130eae786e24ae9b5b25
BLAKE2b-256 f5f0ac3ed340caa7dae2fc38fd54c67347bcb17c068e7689bf126a6041b6701c

See more details on using hashes here.

Provenance

The following attestation bundles were made for valuein_sdk-0.2.0-py3-none-any.whl:

Publisher: publish.yml on valuein/quants

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page