US Equity Industry Standard Daily OHLC Adjusted Guide                                                


US Equity Industry Standard Daily OHLC Adjusted Guide

version 1.0 (Apr 2022)

CONTACT US

We are here to help you do great things with our market and reference data. For questions, feedback, and other concerns, you may reach our team of experts using the following contact information:

 

algoseek customer support

support@algoseek.com

(+1) 646 583 1832

algoseek sales

sales@algoseek.com

(+1) 646 583 1832

TABLE OF CONTENTS

INTRODUCTION        3

EXCHANGE MARKET HOURS        4

DATA ORGANIZATION AND FILE FORMAT        4

CORPORATE EVENTS        7

APPENDIX B. OHLCV CALCULATIONS FROM TRADE EVENTS        8

APPENDIX C. ALGOSEEK VS INDUSTRY STANDARD LOGIC        11


INTRODUCTION

This guide describes the Daily OHLC Adjusted data calculated using Industry Standard logic available for US Equities.

The dataset is based on Industry Standard logic for selecting Open/High/Low/Close trades from the Trades of the Securities Information Processor (SIP) data, also known as the “Consolidated Feed” for all listed stocks, ETNs, ETFs, ADRs, and funds. This dataset contains OHLCV data adjusted by corporate events along with raw data.

For all information about corporate events applied to adjust the data and implemented logic for adjusting, see the ‘Corporate Events’ section.

There are two data aggregation options for this dataset that provide exactly the same data fields:

tradedate: one CSV file with data for all symbols per trading day

secid: one CSV file with data for all trading days per Security ID - a unique security identifier used by algoseek that remains unchanged when the ticker changes

EXCHANGE MARKET HOURS

The US Stock Market trading hours are split into the pre-market, market, and post-market hours.

Pre-Market Hours: 04:00:00 to 09:30:00 (excluding)

Market Hours: 09:30:00 to 16:00:00 (excluding)

Post-Market Hours: 16:00:00 to 20:00:00

Note: Occasionally, trade events are recorded several minutes after 20:00.

Market Holidays and Early Closes

The stock market is closed for trading on most US holidays. For reference, algoseek publishes a list of historical holiday,s which is available at s3://us-equity-market-holidays/holidays.csv (direct download link: https://us-equity-market-holidays.s3.amazonaws.com/holidays.csv).

Markets sometimes close early at 13:00:00 on the day before holidays such as Independence Day and Thanksgiving. You can download algoseek’s early close date and time list from AWS S3 storage at s3://us-equity-market-holidays/earlycloses.csv (or use a direct link us-equity-market-holidays.s3.amazonaws.com/earlycloses.csv).

DATA ORGANIZATION AND FILE FORMAT

algoseek provides Equity market data in plain-text CSV files. The first row of the CSV file is a fixed header, and then rows of data corresponding to individual events (see Table 3). By default, the dataset is organized either by trading day or by secid.  It means, for example, that all daily Open/Close data for Mar 3, 2020, are stored in a separate CSV file under a tradedate aggregation. For the secid-based aggregation, all data for the security with an ID 33449 (AAPL) for a single year is stored in a separate CSV file.

Table 3 below summarizes the name,  description, and data type for each data field (column). The Field order below is for SecId-based aggregation. For tradedate-based data aggregation, the “TradeDate” is the first column and “SecId” is the second.

Table 3: CSV File Fields Schema

Field

Type (Format)

Description

TradeDate

string (yyyymmdd)

Trading date in yyyymmdd format

Ticker

string

Symbol name

SecId

integer

algoseek unique Security ID

Open

decimal

Primary exchange opening trade (see section “Opening Trade Identification”)

High

decimal

Highest trade price from any exchange or Trade Reporting Facility (TRF)

Low

decimal

Lowest trade price from any exchange or Trade Reporting Facility (TRF)

Close

decimal

Primary exchange closing trade (see section “Closing Trade Identification”)

MarketHoursVolume

integer

Total trading volume during regular market hours only

MarketHoursFinraVolume

integer

FINRA/TRF trading volume during regular market hours only (normal trade day is 09:30:00 to 16:00:00 ET).  FINRA/TRF represents off-exchange trading.

DailyVolume

integer

Total trading volume for the whole day (includes pre, regular, and post-market)

DailyFinraVolume

integer

FINRA/TRF trading volume for the whole day (includes pre-, regular, and post-market)

MarketHoursVWAP

decimal

Volume weighted average price during regular market hours, normally between 09:30:00 and 16:00:00 ET plus the Opening and Closing Cross (which may be after 16:00:00 ET).

DailyVWAP

decimal

Volume weighted average price for the whole day including pre, regular, and post-market trades.

OpenAdj

decimal

Backward adjusted price of opening trade

HighAdj

decimal

Backward adjusted trade with the highest price

LowAdj

decimal

Backward adjusted trade with the lowest price

CloseAdj

decimal

Backward adjusted price of closing trade

MarketHoursVolumeAdj

integer

Backward adjusted total trading volume during regular market hours only

MarketHoursFinraVolumeAdj

integer

Backward adjusted FINRA/TRF trading volume during regular market hours only

DailyVolumeAdj

integer

Backward adjusted total trading volume for the whole day

DailyFinraVolumeAdj

integer

Backward adjusted FINRA/TRF trading volume for the whole day

MarketHoursVWAPAdj

decimal

Backward adjusted volume weighted average price during regular market hours

DailyVWAP

decimal

Backward adjusted volume weighted average price for the whole trading day

Bar Notes

MarketHoursVWAP and DailyVWAP: Market hours volume weighted average price (VWAP) is calculated as

sum(TradePrice x TradeSize) / sum(TradeSize)

where

sum(TradeSize) = MarketHoursVolume

Open/High/Low/Close with Limited Trades or Single Trade

Some stocks may only have a single trade during the entire day. For example, with a single trade at 12:00:00 ET then,

Open = High = Low = Close = 12:00:00 Trade price

FINRA/TRF vs Exchange Trades

FINRA Trade Reporting Facility (TRF) allows for reporting of trades that do not take place on an exchange, this includes Dark Pools, Broker-Dealer internal trading, Over the Counter (OTC), etc.

CORPORATE EVENTS

Table 4: Corporate Event’s effect on Price and/or Volume

Corporate Event

Affects Price

Affects Volume

Bonus issue in the same class

Yes

Yes

Bonus issue in a different class

Yes

No

Capital Reduction

Yes

Yes

Consolidation

Yes

Yes

Distribution

Yes

No

Cash Dividend

Yes

No

Script dividend in the same class

Yes

Yes

Script dividend in a different class

Yes

No

De-merger

Yes

No

Entitlement in the same class

Yes

No

Entitlement in a different class

Yes

No

Capital Return

Yes

No

Rights in the same class

Yes

No

Rights in a different class

Yes

No

Security Swap

Yes

Yes

Reclassification

Yes

Yes

Any subdivision (by any stock split, stock dividend, reclassification, recapitalization, or otherwise) or combination (by the reverse stock split, reclassification, recapitalization, or otherwise) of the Class A Common Stock.

Yes

Yes


APPENDIX B. OHLCV CALCULATIONS FROM TRADE EVENTS

This section describes Industry Standard logic for daily bar calculations based on events from the Trade Only dataset. Please also refer to the Equity Trade Only Guide for more details on data fields and condition flags used.

In this section, Market hours refer to 9:30:00 (including) - 16:00:00 (excluding) for regular trading days and to 9:30:00 (including) - 13:00:00 (excluding) when there was an early close.

Filtering

Opening/Closing Trade

The Opening/Closing Trade is calculated from trades events based on the following logic:

The first (last) event starting from 09:30 am with TRADE NB EventType. If no event has TRADE NB type, the first (last) event with TRADE EventType is chosen instead.

The field is empty if no valid trades after 09:30 am are recorded.

Note: an event with a zero quantity does apply for Open/Close Price

Daily Highest/Lowest Trade

Daily High/Low is the first event satisfying all the conditions below:

The trade with the highest (lowest) price starting from 09:30 am is chosen for which the following two conditions are met:

If no trades apply for the condition above, the largest (smallest) price with TRADE NB (if available) starting from 09:30 am is chosen instead.

Note: we take into account Opening/Closing Trade when calculating Highest/Lowest Trade

Table 5: Flags for Trade Events to be Included During Daily High/Low Calculations

Bit Mask Position

Flags

0

tRegular

5

tIntermarketSweep

6

tOpeningPrints

7

tClosingPrints

14

tOutOfSequence

21

tCross

29

tTradeThroughExempt

Table 6: Flags for Trade Events to be Excluded During Daily High/Low Calculations

Bit Mask Position

Flags

1

tCash

2

tNextDay

3

tSeller

9

tDerivativelyPriced

10

tFormT

13

tExtendedHours

18

tStockOption

20

tAveragePrice

22

tPriceVariation

23

tRule155

24

tOfficialClose

25

tPriorReferencePrice

26

tOfficialOpen

27

tCapElection

31

tOddLot

Volume

All events are accounted unless any of the flags from Table 7 are present. For MarketHoursFinraVolume and DailyFinraVolume columns, only events from FINRA Exchange are accounted.

Table 7: Flags for Trade Events to be Excluded During Volume Calculations

Bit Mask Position

Flags

24

tOfficialClose

26

tOfficialOpen


APPENDIX C. ALGOSEEK VS INDUSTRY STANDARD LOGIC

algoseek

Industry Standard

Filtering

  • Exclude any trade with Price = 0
  • Exclude any trade with Quantity = 0
  • Exclude Trade Cancel events
  • Exclude any trade with Price = 0
  • Exclude any trade with Quantity = 0
  • Exclude Trade Cancel events
  • Exclude the original trade that was canceled later

Open/Close

By priority (from the Primary Exchange):

The first/last event with tOfficialOpen/tOfficialClose flag

The first/last event with tOpeningPrint/tClosingPrint flag

The Regular Open/Close:

  • not an Open/Close event (tOpeningPrints, tClosingPrints, tOfficialClose and tOfficialOpen flags)
  • not having tExtendedHours flag set
  • the largest volume between 09:30:00/16:00:00 (13:00:00 for an Early Close) (including) and 09:40:00/16:05:00 (13:05:00 for an Early Close) (including)

Regular First/Last:

  • not an Open/Close event (tOpeningPrints, tClosingPrints, tOfficialClose and tOfficialOpen flags)
  • not having either of the following flags set: tDerivativelyPrices, tStockOption, tAveragePrice, tRule155
  • not having tOddLot flag set
  • not having tExtendedHours flag set
  • the event time is within market hours

The first/last event starting from 09:30 am with TRADE NB EventType. If no event has TRADE NB type, the first/last event with TRADE EventType is chosen instead.

Note: an event with a zero quantity does apply for Open/Close

High/Low

  • not an Open/Close event (tOpeningPrints, tClosingPrints, tOfficialClose and tOfficialOpen flags)
  • not having either of the following flags set: tDerivativelyPrices, tStockOption, tAveragePrice, tRule155
  • not having tOddLot flag set
  • not having tExtendedHours flag set
  • the exchange is not FINRA
  • the event with the largest price within market hours

The trade with the highest (lowest) price starting from 09:30 am is chosen for which the following two conditions are met:

  • At least one flag from Table 5 is present
  • None of the flags from Table 6 is present

If no trades apply for the condition above, the largest (smallest) price with TRADE NB (if available) starting from 09:30 am is chosen instead

Note: we take into account Opening/Closing Trade when calculating Highest/Lowest Trade

Volume

  • not having either of the following flags set: tOfficialOpen, tOfficialClose
  • not having either of the following flags set: tOfficialOpen, tOfficialClose