Historical stock data

Download historical stock prices and volume for backtesting

Specify symbols, date range, daily or intraday interval, raw or adjusted OHLCV, event joins, and CSV or Parquet-ready output. Every export reports session coverage and source rights before market rows are delivered.

OHLCV
price and volume schema
2 clocks
effective and known-at time
CSV / Parquet
analysis-ready shapes
Explicit
coverage and rights state
Definition

Historical stock data is a series of past prices and trading volumes. A backtest-ready dataset also needs a security identity, a trading-session calendar, adjustment rules, source lineage, and a way to distinguish a true zero from a record that was never collected.

Dataset specification

Specify symbols, dates, interval, adjustments, joins, and output format.

The builder makes symbols, time range, adjustment view, event alignment, coverage, and source rights part of the export contract.

Historical dataset
Preview of the export specification
Symbols
AAPL, MSFT, NVDA
Range
2020-01-01 / 2025-12-31
Interval
1 trading day
Price view
Raw + adjusted
Event joins
Earnings + SEC filings
Output
Parquet-ready records
Serving requires a permitted market-history source.RIGHTS CHECK
How DataCedar handles it

What you can query, which fields are returned, and how availability is reported.

01

Define the export

Select symbols, date range, timeframe, adjusted or unadjusted values, and an output shape. The request is saved as a reproducible dataset specification instead of disappearing behind a download button.

02

Audit every session

Expected sessions are compared with delivered rows. Partial, missing, delayed, and rights-restricted states remain distinct so a gap cannot silently become a zero-volume day.

03

Attach the company timeline

Earnings events, SEC filings, facts, public news references, and macro observations can be joined to the same stable security identity and known-at cutoff.

04

Replay from raw evidence

Permitted source responses are hashed and preserved before normalization. A normalized dataset can be rebuilt without changing its source trail or contacting the provider again.

Data surface

What the schema is built to carry.

Open, high, low, close, and volume
Adjusted and unadjusted values
Expected-session coverage ledger
Ticker and issuer identity
Earnings and filing event windows
Cursor API plus tabular exports
Raw-object hash and retrieval run
Rights class on served records

Product boundary: DataCedar is not a real-time consolidated SIP feed. Historical bars are publicly served only from a dataset whose terms permit the requested use; validation-only market records never become public merely because an endpoint exists.

API example

Historical bars by symbol

GET /v3/stocks/{symbol}/bars
Request
curl "https://api.datacedar.com/v3/stocks/AAPL/bars?timeframe=1Day&start=2025-01-01&end=2025-03-31&limit=100" \
  -H "X-API-Key: $QUARTERTRACE_API_KEY"
Representative response
{
  "data": [{
    "symbol": "AAPL",
    "session": "2025-01-02",
    "open": 248.93,
    "high": 249.10,
    "low": 241.82,
    "close": 243.85,
    "volume": 55740731,
    "adjustment": "raw",
    "license_class": "public_or_redistributable"
  }],
  "coverage": { "status": "complete" },
  "pagination": { "next_cursor": null }
}

Examples document the public contract and may use illustrative values or redacted identifiers. Availability fields and rights filters are authoritative for the active environment.

Research workflow

Four steps from API key to a validated dataset.

01

Choose

Specify the securities, elapsed sessions, bar interval, adjustment view, and optional event window.

02

Check

Inspect stream rights, first and last available sessions, and expected-versus-actual row counts before analysis.

03

Export

Use REST JSON directly or shape the response as CSV or Parquet-ready records without dropping provenance fields.

04

Reproduce

Save the query, cutoff, source run, and schema version beside the model result.

Field guide

How to evaluate historical stock data before a backtest

01

Price history is not the same as research history

A charting download is optimized to draw a chart. A research dataset must explain which security each row represents, which sessions should exist, how corporate actions were handled, and whether the row was actually available to your strategy.

DataCedar keeps the bar, coverage record, retrieval run, and security identity separable but joinable. That makes it possible to investigate an outlier without treating the vendor's final table as unquestionable truth.

  • Record the exchange calendar and timezone.
  • Keep raw and adjusted views distinguishable.
  • Store volume with the same session key as price.
  • Retain the source and retrieval time used for the run.
02

Adjustments must be an explicit model decision

Split- and dividend-adjusted series are useful for return calculations, while raw prices are often needed to reconstruct the price an investor actually saw. Mixing the two creates discontinuities that can look like trading signals.

The export contract therefore identifies its adjustment view. Event studies can use adjusted returns while still retaining raw observations for inspection, and a future correction does not silently rewrite a previously versioned experiment.

  • Never infer an adjustment policy from the values.
  • Version corporate-action inputs.
  • Recalculate derived returns after any source correction.
03

Coverage belongs in the result, not in a footnote

A missing row can mean a market holiday, a halted security, an unavailable source, a failed ingestion run, or a licensing restriction. Those states have different analytical meanings.

DataCedar compares actual rows with an expected-session ledger and reports coverage independently from the data array. A strategy can fail closed on incomplete samples or deliberately document the exception.

  • Reject unexplained gaps before fitting a model.
  • Test delisted and renamed securities separately.
  • Save the coverage snapshot with the research artifact.
Comparison

Historical download versus a reproducible dataset

Both may contain the same closing price. Only one preserves enough context to defend the experiment later.

Missing sessionsBlank rows or undocumented omissionsExpected, actual, and status recorded
AdjustmentsOften implicit or latest-onlyNamed adjustment view and lineage
Security identityCurrent ticker used as the keyIssuer and symbol history remain linkable
EventsSeparate calendar to reconcileKnown-at earnings and filings on one timeline
ReproductionRedownload and hope it matchesQuery, source run, schema, and raw hash retained
Before you rely on it

A practical validation checklist.

  1. 01The requested market-history source is permitted for your use
  2. 02The date range contains only available, elapsed sessions
  3. 03The adjustment view matches the return calculation
  4. 04Coverage is complete or exceptions are documented
  5. 05Symbol changes and delistings are not filtered away
  6. 06Known-at cutoffs are applied to joined events
  7. 07The query and schema version are saved with the output

Questions, answered.

DataCedar uses a tabular OHLCV model suitable for CSV and Parquet-ready exports. Availability still depends on a market-history source whose rights permit public serving for the requested account and use.

Create a free API key for filings, facts, earnings events, news links, and macro data.

Explorer is $0 with no card and a 1 request/second limit. Market history and transcript text appear only when an eligible source is active for the account.

Open DataCedar