elkassabgi commited on
Commit
dac7832
·
verified ·
1 Parent(s): ff81693

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +164 -3
README.md CHANGED
@@ -1,3 +1,164 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - en
5
+ pretty_name: HF Data Library
6
+ tags:
7
+ - finance
8
+ - high-frequency
9
+ - intraday
10
+ - OHLCV
11
+ - market-microstructure
12
+ - financial-econometrics
13
+ - equity
14
+ - ETF
15
+ - realized-volatility
16
+ size_categories:
17
+ - 1B<n<10B
18
+ task_categories:
19
+ - time-series-forecasting
20
+ - tabular-regression
21
+ ---
22
+
23
+ # HF Data Library: High-Frequency U.S. Equity Data
24
+
25
+ [![Website](https://img.shields.io/badge/Website-hfdatalibrary.com-2563eb)](https://hfdatalibrary.com) [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.19501605-blue)](https://doi.org/10.5281/zenodo.19501605) [![License: CC BY 4.0](https://img.shields.io/badge/License-CC_BY_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
26
+
27
+ Free, research-grade collection of OHLCV (Open-High-Low-Close-Volume) data for **1,391 U.S. equities and ETFs**, covering December 2002 through the present (45 tickers extending to January 1991). Data is available in multiple timeframes from 1-minute up to monthly. Updated weekly via automated pipeline.
28
+
29
+ **Maintainer:** Ahmed Elkassabgi, University of Central Arkansas
30
+ **ORCID:** [0000-0002-5926-7493](https://orcid.org/0000-0002-5926-7493)
31
+ **Permanent DOI:** [10.5281/zenodo.19501605](https://doi.org/10.5281/zenodo.19501605)
32
+
33
+ ## Where to download
34
+
35
+ **This Hugging Face repository contains documentation only.** The actual data is hosted at:
36
+
37
+ ➡️ **https://hfdatalibrary.com**
38
+
39
+ Free registration required (email, ORCID, or Google). Data is available as direct downloads (Parquet or CSV) or via REST API at `https://api.hfdatalibrary.com`.
40
+
41
+ ## What's in the dataset
42
+
43
+ - **1,391 tickers** of U.S. equities and ETFs
44
+ - **1.53 billion** 1-minute bars (clean version)
45
+ - **December 2002 – present** (with 45 tickers extending to January 1991)
46
+ - **Weekly automated updates**
47
+
48
+ ### Cleaning versions
49
+
50
+ Two cleaning versions are provided:
51
+
52
+ - **Raw:** as received from the source, no modifications
53
+ - **Clean:** nine-step cleaning pipeline applied (outside-hours removal, OHLC violations, duplicates, Brownlees-Gallo outlier filter, splice-boundary adjustment)
54
+
55
+ A gap-filled version is intentionally **not** distributed — see the accompanying paper for documented biases introduced by LOCF gap-filling. Researchers who need a regular grid can apply LOCF to the Clean version themselves.
56
+
57
+ ### Available timeframes
58
+
59
+ All cleaning versions are aggregated into multiple timeframes:
60
+
61
+ | Timeframe | Description |
62
+ |---|---|
63
+ | 1-minute | Base data (highest resolution) |
64
+ | 5-minute | Aggregated from 1-minute |
65
+ | 15-minute | Aggregated from 1-minute |
66
+ | 30-minute | Aggregated from 1-minute |
67
+ | Hourly | Aggregated from 1-minute |
68
+ | Daily | Open-to-close per trading day |
69
+ | Weekly | Aggregated to trading weeks |
70
+ | Monthly | Aggregated to calendar months |
71
+
72
+ ### Pre-computed academic variables
73
+
74
+ 25 variables computed daily for each ticker in each cleaning version:
75
+
76
+ **Volatility (5):** Realized variance (1-min and 5-min sampling), bipower variation (BNS 2004), Parkinson (1980), Yang-Zhang (2000)
77
+
78
+ **Spreads (2):** Roll (1984) implied spread, Corwin-Schultz (2012) high-low spread
79
+
80
+ **Autocorrelation (3):** First-order return autocorrelation, variance ratio (5-min), variance ratio (10-min)
81
+
82
+ **Jump detection (3):** BNS z-statistic, BNS jump indicators at 1% and 5% levels
83
+
84
+ **Liquidity (4):** Amihud (2002) illiquidity ratio, daily dollar volume, share volume, observed trade count
85
+
86
+ **Data quality (4):** Gap rate, observed bars per day, longest gap, max bars since last trade
87
+
88
+ **Returns (4):** Open-to-close return, overnight return, daily high-low range, intraday return standard deviation
89
+
90
+ ## Data sources
91
+
92
+ - **Pre-March 2022:** PiTrading, derived from the consolidated tape (CTA/UTP)
93
+ - **Post-March 2022:** IEX Exchange HIST
94
+
95
+ ## Quick start (Python)
96
+
97
+ ```python
98
+ import requests
99
+ import pandas as pd
100
+ from io import BytesIO
101
+
102
+ # Register at https://hfdatalibrary.com to get an API key
103
+ API_KEY = "your-key-here"
104
+
105
+ # Get a download token (links expire after 10 minutes)
106
+ r = requests.get(
107
+ "https://api.hfdatalibrary.com/v1/download-token/AAPL",
108
+ params={"version": "clean", "format": "parquet", "timeframe": "1min"},
109
+ headers={"X-API-Key": API_KEY}
110
+ )
111
+ url = r.json()["url"]
112
+
113
+ # Download the file
114
+ data = requests.get(url).content
115
+ df = pd.read_parquet(BytesIO(data))
116
+ print(df.head())
117
+ ```
118
+
119
+ ## File schema
120
+
121
+ Each ticker is a single Parquet (or CSV) file. For 1-minute data:
122
+
123
+ | Column | Type | Description |
124
+ |---|---|---|
125
+ | datetime | datetime64 | Bar timestamp (Eastern Time) |
126
+ | Open | float64 | Opening price (split/dividend adjusted) |
127
+ | High | float64 | Highest price during the bar |
128
+ | Low | float64 | Lowest price during the bar |
129
+ | Close | float64 | Closing price |
130
+ | Volume | int64 | Shares traded |
131
+ | source | string | "pitrading" (pre-2022) or "iex" (post-2022) |
132
+
133
+ Higher timeframes (5-min, 15-min, daily, etc.) follow the same schema but with the `datetime` column resampled to the chosen interval.
134
+
135
+ ## License
136
+
137
+ This dataset is licensed under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/).
138
+
139
+ You are free to share and adapt the material for any purpose, including commercially, provided you give appropriate credit.
140
+
141
+ ## How to cite
142
+
143
+ ```bibtex
144
+ @dataset{elkassabgi2026hfdatalibrary,
145
+ author = {Elkassabgi, Ahmed},
146
+ title = {{HF Data Library: High-Frequency U.S. Equity Data (1-Minute OHLCV)}},
147
+ year = {2026},
148
+ version = {1.0},
149
+ publisher = {Zenodo},
150
+ doi = {10.5281/zenodo.19501605},
151
+ url = {https://hfdatalibrary.com}
152
+ }
153
+ ```
154
+
155
+ ## Links
156
+
157
+ - **Website:** https://hfdatalibrary.com
158
+ - **API:** https://api.hfdatalibrary.com
159
+ - **Documentation:** https://hfdatalibrary.com/pages/docs.html
160
+ - **Data dictionary:** https://hfdatalibrary.com/pages/dictionary.html
161
+ - **Code samples:** https://hfdatalibrary.com/pages/code.html
162
+ - **GitHub:** https://github.com/elkassabgi/hfdatalibrary
163
+ - **Zenodo:** https://zenodo.org/records/19501605
164
+ - **Contact:** aelkassabgi@uca.edu