> ## Documentation Index
> Fetch the complete documentation index at: https://docs.davidhf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Synthetic stock-market infrastructure for AI agents.

David is a **synthetic financial data API**. It generates deterministic, internally consistent public-company "worlds" and serves them through clean, REST endpoints that mirror the shape of real market-data APIs: prices, financial statements, earnings, filings, news, ownership, and macro data.

Every response is **synthetic and scenario-scoped**. Instead of querying one fixed history of the real market, you pick a *scenario* (a self-contained market world with its own companies, price paths, fundamentals, and news flow) and then query that world exactly like you would a real data vendor. David builds and curates the scenarios; you pull data from them.

<Card title="Jump to the Quickstart" icon="rocket" href="/quickstart" horizontal>
  Pick a scenario and pull your first prices in under five minutes.
</Card>

## Why synthetic data

Real market history is a single, finite, and heavily-studied path. That makes it a poor foundation for training and evaluating financial AI agents:

* **Leakage.** Models memorize the one real future instead of reasoning about it.
* **Scarcity.** There is only one 2008, one COVID crash, one dot-com bust.
* **No ground truth.** You can never see the hidden state that *caused* a price move.

David solves this by generating an unlimited supply of realistic-but-counterfactual markets. Because David authors the world, it knows the hidden truth behind every price, earnings surprise, and headline, so you can build clean train/validation/test/holdout splits, run point-in-time backtests without lookahead, and stress agents against crises that never happened.

<Info>
  David is built for **financial agents**: backtesting harnesses, research copilots, RL training loops, and evaluation suites. It is not a feed of real, licensed market data.
</Info>

## What you get

David ships a complete market-data surface across a single, consistent scenario:

<CardGroup cols={2}>
  <Card title="Stock prices" icon="chart-line" href="/api-reference/prices">
    Daily OHLCV with adjusted close, plus point-in-time and market-wide snapshots.
  </Card>

  <Card title="Financial statements" icon="file-invoice-dollar" href="/api-reference/financial-statements">
    Income statements, balance sheets, and cash-flow statements, normalized, as-reported, and segmented.
  </Card>

  <Card title="Financial metrics" icon="calculator" href="/api-reference/financial-metrics">
    Valuation, margin, return, and leverage ratios, plus a market-wide metrics snapshot and screener.
  </Card>

  <Card title="Earnings & guidance" icon="bullhorn" href="/api-reference/earnings">
    Consensus, actuals, surprises, earnings calendars, KPI guidance, and non-GAAP reconciliations.
  </Card>

  <Card title="SEC-style filings" icon="folder-open" href="/api-reference/filings">
    10-Q / 8-K filings and item-level text, linked back to the events that generated them.
  </Card>

  <Card title="News & analyst notes" icon="newspaper" href="/api-reference/news">
    Company and market news with sentiment, entities, and event lineage.
  </Card>

  <Card title="Insider & institutional" icon="users" href="/api-reference/insider-trades">
    Form 4–style insider trades, 13F-style institutional holdings, and index-fund constituents.
  </Card>

  <Card title="Macro & rates" icon="building-columns" href="/api-reference/macro">
    Macro tape, central-bank policy rates, corporate actions, and an event timeline.
  </Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Choose a scenario">
    David generates and curates the scenarios. [Browse the library](/api-reference/scenarios) and pick a `scenario_id` that fits your task.
  </Step>

  <Step title="Query the world">
    Pass that `scenario_id` to any data endpoint, `/prices`, `/financials`, `/news`, `/earnings`, and so on.
  </Step>

  <Step title="Reason point-in-time">
    Use `as_of`, `start_date`, and `end_date` to enforce visibility. David never reveals data before its release date, so agents can't peek at the future.
  </Step>
</Steps>

The library already contains **720 ready-made scenarios** spanning 80+ market themes (war energy shocks, contested elections, AI IPO manias, regional-bank credit crunches, Fed pivots, and more), so you can start querying immediately. Scenario generation is handled by David, not by API consumers.

## Design principles

* **Deterministic.** The same seed and configuration always produce the same world, bit for bit. Scenarios are reproducible and replayable.
* **Internally consistent.** Accounting identities hold, OHLC invariants hold, prices react to earnings, and news repeats the numbers in the structured records. Every scenario ships a [validation report](/api-reference/scenarios#validation-report).
* **Point-in-time first.** Data carries release dates and visibility windows so you can build leakage-free backtests.
* **Familiar.** Endpoints, parameters, and response shapes follow real market-data conventions, so existing tooling ports over with minimal changes.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Authenticate, pick a scenario, and pull your first prices.
  </Card>

  <Card title="Understand scenarios" icon="layer-group" href="/concepts/scenarios">
    The core abstraction behind every David response.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    API keys, accounts, and rate limits.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/overview">
    Every endpoint, parameter, and response field.
  </Card>

  <Card title="Python SDK" icon="python" href="/sdk/python">
    Install `david-data` and pull data in a few lines.
  </Card>
</CardGroup>
