# Point-in-time research

This guide focuses on using Arche in research and backtest pipelines where historical correctness matters more than present-day convenience.

## Research goal

You want a dataset that answers:

- what was known on the rebalance date
- which filing's statement produced that answer
- whether the same request can be re-run later without drift

## Dataset inputs

A reproducible research job should preserve at least:

- the company identifier, such as `cik`
- the query boundary, such as `as_of=2024-03-31`
- any fiscal filters or statement-type filters
- the returned `accession_id` values

## Query pattern

Representative point-in-time request:

```http
GET /v1/edgar/as-of/2024-03-31/financials/0000320193
```

Common pattern:

1. resolve or pre-store the company identifier
2. compute the research boundary for each decision date
3. request point-in-time financials at that boundary
4. persist both the returned data and the request inputs

## Reading a few statements

To read only the statements you need, use the page route. It applies the same as-of rule as the
full route and returns the same `snapshot_hash`:

```http
GET /v1/edgar/as-of/2026-10-06/financials/0000320193/page?statement_type=INCOME_STATEMENT&fiscal_year_from=2023&fiscal_year_to=2023&fiscal_period=FY&limit=20
```

Each statement comes back with its filing and its figures in `values`, one decimal string per
metric code. With `detail=true` it also carries its facts, where each figure came from and its
`quality` block: completeness, reconciliation results, data quality and mapping. Page with
`limit` and `offset`: `matched_count` says how many statements match the filters, and
`selected_count` how many you can page through, which is one per statement type when
`latest_only=true`. The reconciliation and data-quality summaries for the whole snapshot come only from the full route, with `detail=true`.

## Choosing the boundary

A date includes every filing the SEC dated on or before it. A timestamp with an offset includes
every filing the SEC accepted at or before that instant.

Apple's FY2023 10-K was accepted at 6:08 pm Eastern on 2023-11-02 and dated 2023-11-03.
`as-of/2023-11-02` excludes it and `as-of/2023-11-03` includes it. To model a trade at the close,
use `as-of/2023-11-02T16:00:00-04:00`.

```http
GET /v1/edgar/as-of/2023-11-02T16:00:00-04:00/financials/0000320193
```

## Reproducibility rules

- Prefer `as_of` routes over latest-state routes when generating historical features.
- Do not backfill later restated values into earlier model snapshots.
- Record exact request parameters together with your model run metadata.

> **Tip:** Arche is most valuable when you treat retrieval semantics as part of the experiment definition,
> not just a transport detail.

## Next steps

- [Restatement drift](https://docs.arche.fi/guides/restatement-drift): Show how restatements change historical results when data is not queried point-in-time.
- [Rebuild a historical view](https://docs.arche.fi/guides/rebuild-historical-view): Reconstruct what a company statement looked like on a specific date.
- [Company resolution and statement retrieval](https://docs.arche.fi/guides/company-resolution-and-statement-retrieval): Resolve an issuer, fetch statements, and move from identifier lookup into analysis.
