# 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-industry-standard-daily-ohlc-adjusted
name: AlgoSeek US Equities Industry Standard 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 industry-standard OHLCV and VWAP values, delivered
    both raw and backward-adjusted for corporate actions. Used for continuous, comparable daily price
    histories 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_ind_std_adj.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. Raw columns (Open ... DailyVWAP) and adjusted columns (*Adj) are delivered together; raw
    values are unadjusted. Adjusted volumes are whole shares. Backward adjustment: values for past dates
    are expressed in the terms of the latest corporate-event state, so *Adj values for a historical date
    change when a later event occurs (per the Adjustment Factors guides, algoseek rebuilds when a new
    event arrives); the OHLC guide itself states no restatement policy or as-of date. Sample evidence:
    OpenAdj differs from Open on 6 of 100 rows (e.g. AA: 34.4250 -> 34.3236, ratio 0.99705) and volumes
    differ on 1 row (AAON 285,855 -> 190,570); ratios for the same ticker/date differ from the algoseek-logic
    adjusted sample (AA 0.98360), so the two samples were generated as of different dates or event sets.'
  authoritativeDefinitions:
  - type: businessDefinition
    url: https://algoseek.com/dataset/us-equities-industry-standard-daily-ohlc-adjusted/
  - type: implementation
    url: https://algoseek.com/data-docs/equity-market-data/algoseek.US.Equity.Daily.OHLC.Industry.Standard.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_IND_STD_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.'
  - 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?aggregation_logic=industry_std&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_industry_standard_daily_ohlc_adjusted
  physicalName: eq_daily_ohlc_ind_std_adj
  physicalType: file
  logicalType: object
  businessName: US Equities Industry Standard Daily OHLC Adjusted
  description: One row is one security on one trading day with industry-standard OHLCV and VWAP values,
    delivered both raw and backward-adjusted for corporate actions. Used for continuous, comparable daily
    price histories 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 price: first TRADE NB event from 09:30 ET, else first TRADE (Appendix B). Table
      3 text wrongly says primary-exchange open.'
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank if no valid trade after 09:30 ET (Appendix B); none empty in sample
    - property: evidence
      value: guide+sample
  - name: High
    logicalType: number
    physicalType: decimal (csv text)
    description: Highest qualifying trade price from 09:30 ET on any exchange or TRF (flag include/exclude
      lists), else highest TRADE NB; opening/closing trades count.
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; none empty in sample
    - property: evidence
      value: guide+sample
  - name: Low
    logicalType: number
    physicalType: decimal (csv text)
    description: Lowest qualifying trade price from 09:30 ET on any exchange or TRF (flag include/exclude
      lists), else lowest TRADE NB; opening/closing trades count.
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: unstated; none empty in sample
    - property: evidence
      value: guide+sample
  - name: Close
    logicalType: number
    physicalType: decimal (csv text)
    description: 'Closing price: last TRADE NB event of the day, else last TRADE; since 2026-02-23 NASDAQ-listed
      names use the official NASDAQ close when volume thresholds are met.'
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank if no valid trade after 09:30 ET (Appendix B); none empty in sample
    - 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; none empty in sample
    - 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; none empty in sample
    - 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; none empty in sample
    - 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; none empty in sample
    - 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; none empty in sample
    - 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; none empty in sample
    - 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; none empty in sample
    - 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; none empty in sample
    - 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 (the ind-std guide's table mislabels
      it DailyVWAP).
    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_ind_std_adj
- property: vendorSampleUrl
  value: https://as-metadata-services-assets.s3.amazonaws.com/sample_data/cloud_storage/eq_daily_ohlc_ind_std_adj.csv
- property: assetClass
  value: equity
- property: venues
  value:
  - FINRA TRF
- property: coverage
  value: SIP (Consolidated Feed) trades for listed US stocks, ETNs, ETFs, ADRs and funds (page adds common
    and preferred stocks, warrants and units), with raw and backward-adjusted values 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 listed
    in the guide''s corporate-events table affect price and/or volume; 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: Table 3''s last row is labelled ''DailyVWAP'' but is described as the backward-adjusted
    whole-day VWAP; the sample column is DailyVWAPAdj.'
  - 'Doc discrepancy: Field order: the guide says SecId-aggregated files use TradeDate, Ticker, SecId
    and tradedate-aggregated files put SecId second; the sample (one date, one row per ticker, i.e. tradedate-style)
    is TradeDate, Ticker, SecId.'
  - 'Doc discrepancy: Table 3 describes Open/Close as the ''Primary exchange opening/closing trade'' and
    points to sections ''Opening Trade Identification'' / ''Closing Trade Identification'' that do not
    exist; Appendices B and C define them as the first/last TRADE NB event from 09:30 (any venue). The
    guide has Appendices B and C but no Appendix A.'
  - 'Doc discrepancy: Bar Notes give sum(TradeSize) = MarketHoursVolume for both MarketHoursVWAP and DailyVWAP,
    although DailyVWAP is whole-day.'
  - 'Doc discrepancy: Guide cites ''individual events (see Table 3)'' for rows, but rows are per-security
    daily bars (text carried over from tick guides).'
  - 'Doc discrepancy: Decimal width: the sample prints Open/High/Low/Close (and Adj) at a fixed 4 decimals
    (122.0000) and VWAPs at 5 (126.75460), unlike the variable-width values of the ArdaDB sibling.'
  - 'Doc discrepancy: Guide has no ''Missing'' column, so null/empty behaviour is undocumented (Appendix
    B says Open/Close are empty if no valid trade after 09:30).'
  - 'Doc discrepancy: No history start date is given in the guide or on the product page.'
contractCreatedTs: '2026-11-02T00:00:00Z'
