# Generated by tools/build_contracts.py from tools/algoseek_catalog.py -- do not edit by hand.
# Open Data Contract Standard v3.2.0 (https://bitol-io.github.io/open-data-contract-standard/).
apiVersion: v3.2.0
kind: DataContract
id: urn:alphaswarm:datacontract:algoseek:us-equities-daily-ohlc-adjusted
name: AlgoSeek US Equities Daily OHLC Adjusted
version: 0.1.0
status: draft
domain: market-data
tags:
- algoseek
- licensed-data
- equity
- us
- daily_bar
description:
  purpose: One row is one security on one trading day with algoseek-logic OHLCV and VWAP values from SIP
    trades, delivered both raw and backward-adjusted for corporate actions. Used for bias-controlled,
    continuous daily price series across splits, dividends and other capital changes.
  usage: Backtesting, execution and microstructure research, feature engineering for US equities.
  limitations: 'Delivered as recorded from the source feed: AlgoSeek does not remove crossed or locked
    quotes, bad prints, or out-of-sequence packets unless contracted to. Consumers own cleaning. Sample
    channel: S3 CSV (sample_channel s3/cloud_storage, eq_daily_ohlc_adj_tradedate.csv, 100 rows, all 2023-08-02);
    this dataset does not ship an ArdaDB sample (its unadjusted sibling does). The JSON preview is identical
    to the CSV. Empty cells = no qualifying trade: in the sample Open/Close are empty on 2 rows, High/Low
    on 6 rows, FINRA volume (and its Adj) on 6 rows; the matching *Adj cells are empty too. High/Low can
    be empty while Open/Close are populated (e.g. AACT: open 10.175, close 10.18, no High/Low). Low <=
    Open,Close <= High is NOT guaranteed: among the 94 sample rows with all four raw prices present, 12
    have High below max(Open, Close) and 13 have Low above min(Open, Close) (Open/Close use primary-exchange
    auctions; High/Low exclude FINRA, odd lots, extended-hours and special-price trades). Backward adjustment:
    *Adj values for a past date are expressed in the terms of the latest corporate-event state, so they
    change when a later event occurs (per the Adjustment Factors guides algoseek rebuilds when a new event
    arrives); the OHLC guide states no restatement policy or as-of date. Guide v1.1.0 (2026-02-09) began
    including the partial-liquidation event in price adjustment.'
  authoritativeDefinitions:
  - type: businessDefinition
    url: https://algoseek.com/dataset/us-equities-daily-ohlc-adjusted/
  - type: implementation
    url: https://algoseek.com/data-docs/equity-market-data/algoseek.US.Equity.algoseek.Daily.OHLC.Adjusted.Guide.pdf
  - type: implementation
    url: https://algoseek.com/docs/rest-api/reference
context:
  instructions: Times are local US Eastern clock times (DST-aware), not UTC. Treat TRADE NB / NBBO-flagged
    rows as the backtest-grade subset. Cancellations reference earlier trades and can arrive hours later,
    so aggregate only after the session closes. Prices are unadjusted unless the dataset name says Adjusted;
    join us-equities-*-adjustment-factors on SecId for adjustment.
  verifiedStatements:
  - id: vs1
    question: What time zone are the timestamps in?
    answer: US Eastern local time with daylight saving (the guides label it EST/ET).
  - id: vs2
    question: Are prices adjusted for splits and dividends?
    answer: Only in datasets whose name contains Adjusted; all others are as traded.
  constraints:
  - id: c1
    constraint: 'Licensed vendor data: never export raw rows to a tenant-local destination or include
      them verbatim in a public artifact; serve only through entitlement-checked platform reads.'
  - id: c3
    constraint: Do not treat the vendor's `Ticker` as a stable identity across time; join on an AlgoSeek
      security key (SecId or ASID, which are distinct) or the platform symbol mapping.
servers:
- server: algoseek-s3
  type: s3
  environment: vendor
  description: AlgoSeek flat-file delivery (the layout the schema below describes).
  location: s3://${ALGOSEEK_S3_BUCKET_EQ_DAILY_OHLC_ADJ}/
  format: csv
  encoding: UTF-8
  customProperties:
  - property: layout
    value: 'The guide describes plain-text CSV with a fixed header row and two aggregation options with
      identical fields: ''tradedate'' = one file with all symbols per trading day, ''secid'' = one file
      with all trading days for one SecId (e.g. SecId 33449 / AAPL, one year per file). Compression and
      bucket/key path are not stated. The published sample is named eq_daily_ohlc_adj_tradedate.csv (tradedate
      aggregation).'
  - property: compression
    value: gzip
  - property: header
    value: true
  - property: entitlement
    value: Bucket access is granted per subscription; bucket names arrive with license provisioning.
- server: algoseek-rest-api
  type: api
  environment: vendor
  description: AlgoSeek Datasets REST API (X-API-KEY header; JSON, CSV or gzipped CSV). Returns AlgoSeek's
    normalized API layout, which differs from the flat-file columns in this contract's schema.
  location: https://api.algoseek.com/v1/data/us-equity/daily-ohlc/:identifier?adjusted=true
  customProperties:
  - property: auth
    value: X-API-KEY header issued by AlgoSeek
  - property: columnsEndpoint
    value: https://api.algoseek.com/v1/meta/datasets/{dataset_id}/columns
  - property: statusEndpoint
    value: https://api.algoseek.com/v1/meta/datasets/{dataset_id}/status
  - property: responseFormats
    value:
    - json
    - csv
    - csv_gzip
  - property: pagination
    value: offset + limit; tick endpoints take trade_date and identifier (Ticker or ASID) in the path
schema:
- name: us_equities_daily_ohlc_adjusted
  physicalName: eq_daily_ohlc_adj
  physicalType: file
  logicalType: object
  businessName: US Equities Daily OHLC Adjusted
  description: One row is one security on one trading day with algoseek-logic OHLCV and VWAP values from
    SIP trades, delivered both raw and backward-adjusted for corporate actions. Used for bias-controlled,
    continuous daily price series across splits, dividends and other capital changes.
  dataGranularityDescription: one security (SecId/Ticker) x one trading day
  properties:
  - name: TradeDate
    logicalType: date
    logicalTypeOptions:
      format: yyyymmdd
    physicalType: string (yyyymmdd) (csv text)
    description: Trading date of the bar.
    primaryKey: true
    primaryKeyPosition: 1
    required: true
    partitioned: true
    partitionKeyPosition: 1
    customProperties:
    - property: evidence
      value: guide+sample
  - name: Ticker
    logicalType: string
    physicalType: string (csv text)
    description: Symbol name.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: SecId
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: algoseek unique security id; unchanged when the ticker changes.
    primaryKey: true
    primaryKeyPosition: 2
    required: true
    partitioned: true
    partitionKeyPosition: 2
    customProperties:
    - property: evidence
      value: guide+sample
  - name: Open
    logicalType: number
    physicalType: decimal (csv text)
    description: 'Opening trade on the primary exchange by priority: official open, opening print, regular
      open, regular first; then non-FINRA TRADE NB / TRADE fallbacks.'
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when no qualifying trade
    - property: evidence
      value: guide+sample
  - name: High
    logicalType: number
    physicalType: decimal (csv text)
    description: Highest non-FINRA trade price within market hours; excludes odd lots, extended-hours
      and special-price (average, derivative, stock-option, Rule 155) trades.
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when no qualifying trade
    - property: evidence
      value: guide+sample
  - name: Low
    logicalType: number
    physicalType: decimal (csv text)
    description: Lowest non-FINRA trade price within market hours; excludes odd lots, extended-hours and
      special-price (average, derivative, stock-option, Rule 155) trades.
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when no qualifying trade
    - property: evidence
      value: guide+sample
  - name: Close
    logicalType: number
    physicalType: decimal (csv text)
    description: 'Closing trade on the primary exchange by priority: official close, closing print, regular
      close, regular last; then non-FINRA TRADE NB / TRADE fallbacks.'
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when no qualifying trade
    - property: evidence
      value: guide+sample
  - name: MarketHoursVolume
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Total shares traded during regular market hours only (09:30-16:00 ET; to 13:00 on early
      closes).
    customProperties:
    - property: unit
      value: shares
    - property: evidence
      value: guide+sample
  - name: MarketHoursFinraVolume
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: FINRA/TRF (off-exchange) shares traded during regular market hours.
    customProperties:
    - property: unit
      value: shares
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when there is no FINRA volume
    - property: evidence
      value: guide+sample
  - name: DailyVolume
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Total shares traded for the whole day (pre-, regular and post-market).
    customProperties:
    - property: unit
      value: shares
    - property: evidence
      value: guide+sample
  - name: DailyFinraVolume
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: FINRA/TRF shares traded for the whole day.
    customProperties:
    - property: unit
      value: shares
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when there is no FINRA volume
    - property: evidence
      value: guide+sample
  - name: MarketHoursVWAP
    logicalType: number
    physicalType: decimal (csv text)
    description: Volume-weighted average trade price over regular hours plus the opening/closing cross
      (may print after 16:00 ET).
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: DailyVWAP
    logicalType: number
    physicalType: decimal (csv text)
    description: Volume-weighted average trade price for the whole day including pre- and post-market
      trades.
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: OpenAdj
    logicalType: number
    physicalType: decimal (csv text)
    description: Backward-adjusted opening price.
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when the raw value is empty
    - property: evidence
      value: guide+sample
  - name: HighAdj
    logicalType: number
    physicalType: decimal (csv text)
    description: Backward-adjusted highest-trade price.
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when the raw value is empty
    - property: evidence
      value: guide+sample
  - name: LowAdj
    logicalType: number
    physicalType: decimal (csv text)
    description: Backward-adjusted lowest-trade price.
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when the raw value is empty
    - property: evidence
      value: guide+sample
  - name: CloseAdj
    logicalType: number
    physicalType: decimal (csv text)
    description: Backward-adjusted closing price.
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when the raw value is empty
    - property: evidence
      value: guide+sample
  - name: MarketHoursVolumeAdj
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Backward-adjusted regular-market-hours volume.
    customProperties:
    - property: unit
      value: shares
    - property: evidence
      value: guide+sample
  - name: MarketHoursFinraVolumeAdj
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Backward-adjusted FINRA/TRF regular-market-hours volume.
    customProperties:
    - property: unit
      value: shares
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when the raw value is empty
    - property: evidence
      value: guide+sample
  - name: DailyVolumeAdj
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Backward-adjusted whole-day volume.
    customProperties:
    - property: unit
      value: shares
    - property: evidence
      value: guide+sample
  - name: DailyFinraVolumeAdj
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Backward-adjusted FINRA/TRF whole-day volume.
    customProperties:
    - property: unit
      value: shares
    - property: nullMeaning
      value: unstated; sample (S3 CSV) leaves it empty when the raw value is empty
    - property: evidence
      value: guide+sample
  - name: MarketHoursVWAPAdj
    logicalType: number
    physicalType: decimal (csv text)
    description: Backward-adjusted VWAP over regular market hours.
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: DailyVWAPAdj
    logicalType: number
    physicalType: decimal (csv text)
    description: Backward-adjusted VWAP for the whole trading day.
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  quality:
  - id: row_count_positive
    metric: rowCount
    mustBeGreaterThan: 0
    dimension: completeness
    severity: error
    description: Every delivered partition (trade date, or snapshot) carries at least one row.
  - id: primary_key_unique
    metric: duplicateValues
    mustBe: 0
    arguments:
      properties:
      - TradeDate
      - SecId
    dimension: uniqueness
    severity: error
    description: The declared primary key is unique within each delivered partition (one file or table
      snapshot).
  - id: bar_high_ge_low
    type: sql
    description: High is never below Low in the same row.
    query: SELECT COUNT(*) FROM {object} WHERE High IS NOT NULL AND Low IS NOT NULL AND High < Low
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: open_close_within_range
    type: sql
    description: 'Open and close usually sit inside the high-low range. Only a warning: some AlgoSeek
      aggregations take open/close from a different event set than high/low (seen in the Daily OHLC sample).'
    query: SELECT COUNT(*) FROM {object} WHERE Open > High OR Open < Low OR Close > High OR Close < Low
    mustBe: 0
    dimension: accuracy
    severity: warning
  - id: DailyFinraVolume_non_negative
    type: sql
    description: DailyFinraVolume is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE DailyFinraVolume < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: DailyVolume_non_negative
    type: sql
    description: DailyVolume is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE DailyVolume < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: MarketHoursFinraVolume_non_negative
    type: sql
    description: MarketHoursFinraVolume is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE MarketHoursFinraVolume < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: MarketHoursVolume_non_negative
    type: sql
    description: MarketHoursVolume is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE MarketHoursVolume < 0
    mustBe: 0
    dimension: accuracy
    severity: error
support:
- channel: algoseek-support
  tool: email
  url: mailto:support@algoseek.com
  scope: issues
  description: Vendor support for data defects, missing days, and entitlement problems.
team:
  name: AlphaSwarm data engineering
slaProperties:
- id: update_frequency
  property: frequency
  value: 1
  unit: d
  driver: analytics
- id: retention
  property: retention
  value: license-term
  description: Retention of landed copies is bounded by the AlgoSeek license; purge on termination.
  driver: regulatory
customProperties:
- property: vendor
  value: AlgoSeek
- property: vendorDataGroup
  value: us-equity
- property: vendorDatasetTextId
  value: eq_daily_ohlc_adj
- property: vendorSampleUrl
  value: https://as-metadata-services-assets.s3.amazonaws.com/sample_data/cloud_storage/eq_daily_ohlc_adj_tradedate.csv
- property: assetClass
  value: equity
- property: venues
  value:
  - FINRA TRF
- property: coverage
  value: SIP (Consolidated Feed) trades for all securities listed on US public exchanges (common stocks,
    ETFs, ETNs, ADRs, funds), built with algoseek's Open/High/Low/Close logic, raw and backward-adjusted
    side by side. History start not stated.
- property: timezone
  value: America/New_York
- property: sessionHours
  value: Pre-market 04:00:00-09:30:00 (excl.), market hours 09:30:00-16:00:00 (excl.), post-market 16:00:00-20:00:00
    ET; market hours end 13:00:00 on early-close days; trades occasionally recorded several minutes after
    20:00
- property: priceAdjustment
  value: 'adjusted (backward): raw Open/High/Low/Close/Volume/VWAP columns plus *Adj columns; events in
    the guide''s corporate-events table affect price and/or volume (v1.1.0 includes partial liquidation
    for price); no formula beyond ''backward adjusted'' is given'
- property: licensedData
  value: true
- property: evidenceGrade
  value: vendor-doc
- property: knownIssues
  value:
  - Primary key is inferred; AlgoSeek's guide does not name one.
  - 'Doc discrepancy: Field order: the guide says SecId-aggregated files use TradeDate, Ticker, SecId
    and tradedate-aggregated files put SecId second; the sample (named ..._tradedate.csv, one row per
    ticker for one date) is TradeDate, Ticker, SecId.'
  - 'Doc discrepancy: The guide''s volume section and Table 3 refer to ListedMarketHoursVolume, ListedTotalVolume,
    FinraMarketHoursVolume and FinraTotalVolume, which are Daily TAQ columns and not part of this dataset;
    ''tOpenindPrints'' and ''tDerivativelyPrices'' are typos for tOpeningPrints / tDerivativelyPriced.'
  - 'Doc discrepancy: Product page says ''Files are systematically categorized by date and ticker'' (on
    the unadjusted page) while the guide describes tradedate and secid aggregations; this adjusted page
    does not repeat the sentence.'
  - 'Doc discrepancy: Guide says rows are ''individual events (see Table 1)''; rows are per-security daily
    bars (carried-over text).'
  - 'Doc discrepancy: Guide has no ''Missing'' column; the sample uses empty cells for missing values
    (6 of 100 rows have empty High/Low/FINRA fields) whereas the ArdaDB sibling prints 0.'
  - 'Doc discrepancy: Sample prices print with variable width (''122'', ''128.72''), unlike the fixed-width
    industry-standard adjusted sample.'
  - 'Doc discrepancy: No history start date is given in the guide or on the product page.'
contractCreatedTs: '2026-11-02T00:00:00Z'
