Datasets:
ticker stringclasses 609
values | date stringdate 2019-07-01 00:00:00 2019-07-31 00:00:00 | ts_interval listlengths 41 32.1k | features listlengths 369 289k | n_steps int32 41 32.1k |
|---|---|---|---|---|
MCD | 2019-07-10 | [1562745921,1562745950,1562746016,1562746027,1562746241,1562746248,1562746250,1562746259,1562746262,(...TRUNCATED) | [211.69000244140625,212.08999633789062,null,null,222.99000549316406,100.0,100.0,25.0,1.0,209.0099945(...TRUNCATED) | 12,563 |
BHGE | 2019-07-29 | [1564405448,1564406410,1564406654,1564406745,1564406768,1564406769,1564406771,1564406805,1564406806,(...TRUNCATED) | [24.579999923706055,24.579999923706055,null,null,26.0,700.0,200.0,3.0,1.0,24.59000015258789,24.57999(...TRUNCATED) | 10,497 |
DOCU | 2019-07-17 | [1563369186,1563369470,1563369497,1563369532,1563369948,1563370081,1563370084,1563370180,1563370200,(...TRUNCATED) | [53.099998474121094,53.599998474121094,null,null,53.79999923706055,500.0,400.0,20.0,1.0,53.099998474(...TRUNCATED) | 4,695 |
WY | 2019-07-01 | [1561978801,1561978908,1561978911,1561978912,1561986098,1561986354,1561987681,1561987782,1561987785,(...TRUNCATED) | [24.670000076293945,26.5,26.5,26.5,29.0,1000.0,1000.0,0.0,0.0,24.670000076293945,26.5,26.5,26.5,27.2(...TRUNCATED) | 14,827 |
VMW | 2019-07-23 | [1563879601,1563882055,1563882056,1563885535,1563885930,1563886682,1563886936,1563886942,1563887007,(...TRUNCATED) | [173.3699951171875,184.6604766845703,null,null,186.22999572753906,200.0,100.0,21.0,2.0,173.369995117(...TRUNCATED) | 7,890 |
ADP | 2019-07-01 | [1561984265,1561984278,1561984412,1561984511,1561984523,1561984587,1561984593,1561984915,1561985027,(...TRUNCATED) | [165.39999389648438,166.99000549316406,null,null,167.0800018310547,100.0,400.0,26.0,1.0,165.39999389(...TRUNCATED) | 10,487 |
LLY | 2019-07-22 | [1563800342,1563800453,1563800522,1563800524,1563800671,1563800683,1563801599,1563801634,1563801768,(...TRUNCATED) | [106.5,108.80000305175781,null,null,108.80000305175781,100.0,100.0,1.0,1.0,106.5,106.91739654541016,(...TRUNCATED) | 12,019 |
AEM | 2019-07-24 | [1563973536,1563973552,1563973783,1563974230,1563974427,1563974429,1563974431,1563974457,1563974939,(...TRUNCATED) | [53.20000076293945,54.029998779296875,null,null,57.599998474121094,500.0,200.0,5.0,2.0,53.2000007629(...TRUNCATED) | 11,788 |
NWL | 2019-07-12 | [1562936341,1562936344,1562936432,1562936570,1562936596,1562936609,1562936618,1562936643,1562936668,(...TRUNCATED) | [14.5,14.640000343322754,null,null,15.020000457763672,1500.0,1100.0,2.0,1.0,14.5,14.787272453308105,(...TRUNCATED) | 6,376 |
WP | 2019-07-12 | [1562930277,1562930417,1562932580,1562937378,1562937380,1562937630,1562937639,1562937920,1562938182,(...TRUNCATED) | [119.0,130.0,null,null,0.0,100.0,0.0,0.0,0.0,119.0,130.0,null,null,0.0,100.0,0.0,0.0,0.0,119.0,130.0(...TRUNCATED) | 9,228 |
Market-1T — 1 Hz, July 2019 (pre-shuffled demo)
⚠️⚠️ Pre-release. This dataset and its accompanying code are a work in progress and not yet final. Contents, schema and splits may change without notice. Do not depend on it yet.
A single month of 1 Hz US equity market observations, globally pre-shuffled, published in two formats. This is the demo split of the Market-1T release: it is small enough to train on immediately and shuffled on disk so a plain sequential pass is already well mixed.
12,783 observations, 21 trading days (2019-07-01 → 2019-07-31).
Why pre-shuffled
Random-access reads against a Hub-hosted Lance dataset cost roughly 11 Hub API requests per observation, against a free-tier quota of 1000 requests per 5-minute window — about 90 observations per 5 minutes, some three orders of magnitude short of what training needs. Sequential CDN range reads are not rate-limited.
Shuffling the observations on disk means a sequential stream is already well-mixed, so you can pretrain straight off the Hub on a free account with no shuffle buffer and no download.
Contents
| Path | Format | Size | Use |
|---|---|---|---|
parquet/shard_*.parquet |
zstd parquet, 7 shards | ~1.3 GB | streaming, no download |
jul2019.lance/ |
zstd Lance | ~1.4 GB | download once, fastest training |
Both hold the same 12,783 observations in the same shuffled order.
Schema
One row per (date, ticker) observation:
| Column | Type | Meaning |
|---|---|---|
ticker |
string |
Symbol |
date |
string |
YYYY-MM-DD |
ts_interval |
list<int32> |
Seconds from midnight ET, sparse |
features |
list<float32> |
Row-major, length n_steps * 9 |
n_steps |
int32 |
Rows, so features reshapes to (n_steps, 9) |
Feature order: bid_price, vwap_all, high, low, ask_price, bid_size, ask_size, volume, n.
Sparsity — nothing is pre-filled
Only seconds that actually carry data are stored (mean ~13.3k rows against a 23,400-second session, ≈57% density; gaps run to ~3.5 hours, some NaNs are retained). The dense 1 Hz grid and any forward/zero fill is reconstructed lazily at load time, so the fill policy stays yours to choose rather than being baked into the artifact.
Usage
Stream it — no download
Plain datasets; one row per (date, ticker) observation:
import numpy as np
from datasets import load_dataset
ds = load_dataset("fin-ai-lab/Market-1T-1Hz-2019-07-demo", split="train", streaming=True)
row = next(iter(ds))
features = np.asarray(row["features"], np.float32).reshape(row["n_steps"], 9)
print(row["ticker"], row["date"], features.shape) # -> (n_steps, 9)
Stream it as training batches
The reference code turns each observation into augmented views. Nothing is downloaded — these are sequential CDN reads:
from torch.utils.data import DataLoader
from market_jepa.training.hf_stream_dataset import HFStreamMarketDataset
from market_jepa.training.utils import collate_bucketed
dataset = HFStreamMarketDataset(
source="fin-ai-lab/Market-1T-1Hz-2019-07-demo",
data_files="parquet/*.parquet",
augmentations=[{"name": "random_resized_crop"}],
date_start="2019-07-01",
date_end="2019-07-31",
)
loader = DataLoader(dataset, batch_size=64, collate_fn=collate_bucketed)
Workers are handed whole shards, so num_workers above 7 (the shard count
here) leaves the extras idle; train.py caps it for you.
Download once, then train — fastest
from huggingface_hub import snapshot_download
from market_jepa.training.lance_dataset import LanceMarketDataset
path = snapshot_download("fin-ai-lab/Market-1T-1Hz-2019-07-demo", repo_type="dataset")
dataset = LanceMarketDataset(
uri=f"{path}/jul2019.lance",
augmentations=[{"name": "random_resized_crop"}],
date_start="2019-07-01",
date_end="2019-07-31",
)
loader = DataLoader(
dataset, batch_size=64, shuffle=True, num_workers=4,
collate_fn=collate_bucketed,
multiprocessing_context="spawn", # Lance's Rust runtime is fork-unsafe
)
A full training run
git clone https://github.com/fin-ai-lab/towards_financial_world_modeling
cd towards_financial_world_modeling && uv sync
uv run train.py mode=lejepa backbone=transformer \
data_source.kind=hf_stream \
data_source.repo=fin-ai-lab/Market-1T-1Hz-2019-07-demo
The default date windows already split this month into train (10,353 obs,
07-01→07-25) and eval (2,430 obs, 07-26→07-31). They are independent of the
dataset itself, so the data on disk and the data actually trained on need not be
the same — override dataset.{train,eval,eval_train}_date_{start,end} to change
the split.
random_resized_crop is the only supported augmentation.
Related
fin-ai-lab/Market-1T-1Hz-2019-08-demo— the same, for August 2019fin-ai-lab/Market-1T-1Hz-2019H2-2020— the full 18-month unshuffled corpus
Source and terms
Derived from Polygon.io 1 Hz snapshots, aggregated to (date, ticker)
observations and filtered to liquid tickers. This is a derived, aggregated
artifact rather than a redistribution of raw tick data, but redistribution terms
for the underlying feed still apply — confirm your own entitlement with
Polygon.io before relying on this data, and treat the license above as
provisional pending that review.
- Downloads last month
- 68