A high-performance C++ utility for converting IEX Transport Protocol (IEX-TP) packet captures into structured HDF5 datasets, suitable for financial analytics, scientific computation, and time-series processing.
| OS / Compiler | GCC 13 | GCC 14 | GCC 15 | Clang 17 | Clang 18 | Clang 19 | Clang 20 |
|---|---|---|---|---|---|---|---|
| Ubuntu 22.04 | |||||||
| Ubuntu 24.04 |
sudo apt install build-essential cmake
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build
cmake --build build --parallel
sudo cmake --install build| Conversion | Time (ms) |
Throughput (M ticks/s) |
Latency (µs/tick) |
Data IN (GiB) |
Data OUT (GiB) |
|---|---|---|---|---|---|
| HDF5 → HDF5 | 1 062 | 57.39 | 0.017 | 1.36 | 1.36 |
| PCAP → HDF5 | 4 873 | 12.51 | 0.079 | 4.87 | 1.36 |
| HDF5 → CSV | 34 607 | 1.76 | 0.567 | 1.36 | 2.32 |
| PCAP → CSV | 36 408 | 1.67 | 0.597 | 4.87 | 2.32 |
| HDF5 → JSON | 56 814 | 1.10 | 0.567 | 1.36 | 6.74 |
| HDF5 → REDIS | 62 307 | 0.98 | 1.022 | 1.36 | 3.50 |
| PCAP → JSON | 65 941 | 0.90 | 1.081 | 4.87 | 6.74 |
| PCAP → REDIS | 69 337 | 0.88 | 1.131 | 4.87 | 3.10 |
Notes:
- These quick‑and‑dirty measurements were taken on burst inputs and don’t reflect real‑world probabilistic sampling under sustained data flow.
- The CSV directory mirrors the HDF5 IRTS layout. Although IEX2H5 can read gzip‑compressed PCAP files and write HDF5 with gzip filters, this chart only compares uncompressed input and output.
- Platform: Linux Mint 22.1 g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 ThinkPad X1 Carbon Gen 12 Intel(R) Core(TM) Ultra 5 125U
steven@gauss:~/projects/iex2h5/build$ iex2h5 --help
IEX2H5 converts IEX TOPS Datasets to HDF5 Format
iex2h5 is a specialized tool for importing IEX TOPS datasets into the HDF5 format,enabling efficient storage and analysis of large-scale financial data. HDF5 is a widelyadopted format for managing hierarchical, structured data and is supported across majorenvironments such as Julia, Python, MATLAB, C++, and Node.js.
This tool allows users to convert captured packet data streams (e.g. IEX DEEP/TOPS) intostructured HDF5 datasets for quantitative analysis, visualization, and integration withscientific, engineering, or trading workflows.
Usage: ./build/iex2h5 [--help] [--version] [--time-interval VAR] [--time-range VAR] [--date-range VAR] [--output VAR] [--rts-path VAR] [--instruments-path VAR] [--trading-days-path VAR] [--gzip VAR] [--convert VAR] [--third-party-licenses] [--benchmark-format VAR] [remaining]...
Positional arguments:
remaining [nargs: 0 or more]
Optional arguments:
-h, --help shows help message
--version Print version information
--time-interval temporal interval in hh::mm::ss format, irts stream is converted into [nargs=0..1] [default: "00:01:00"]
--time-range Time window in UTC, specified as START-END (e.g. 14:30:00-21:00:00). Events outside this range are ignored. [nargs=0..1] [default: "14:30:00-21:00:00"]
--date-range Inclusive trading date range in format START:END (e.g. 2016-12-01:2020-01-01). Use 'today' as a valid END value. [nargs=0..1] [default: "2016-12-01:today"]
-o, --output path to the HDF5 container [nargs=0..1] [default: "./iex.h5"]
--rts-path HDF5 path for regular time index [nargs=0..1] [default: "/time.txt"]
--instruments-path HDF5 path for instrument (symbol) list [nargs=0..1] [default: "/instruments.txt"]
--trading-days-path HDF5 path for trading day index [nargs=0..1] [default: "/trading_days.txt"]
-g, --gzip Compression level (0 = none, 9 = maximum) [nargs=0..1] [default: 1]
-c, --convert Which conversion pipeline to run: rts | irts | none | all [nargs=0..1] [default: "all"]
--third-party-licenses Print license(s) for a third-party library (or 'all | license 01 [, license 02, ...]')
--benchmark-format output format for benchmark line: human or csv [nargs=0..1] [default: "human"]
Examples:
iex2h5 -o ~/iex.h5 -c irts ~/data/202{4,5}-{04,05}-??.pcap.gz # Convert gzipped PCAP files to IRTS (brace expansion and globs supported)
iex2h5 -o rts.h5 --time-interval 00:00:10 -c rts iex.h5 # Load IRTS from HDF5 and convert to RTS matrices at 10-seconds intervals
iex2h5 -o ~/iex.h5 -c irts ~/data/**/*.pcap # Convert plain PCAP files to IRTS tickdata and store in HDF5 format
iex2h5 -o ~/out.csv -c irts ~/data/**/*.pcap # Convert plain PCAP files to IRTS tickdata and store in directory of CSV files
iex2h5 -o rts.h5 --time-interval 00:05:00 -c rts *.pcap.gz # Load IRTS from HDF5 and convert to RTS matrices at 5-minutes intervals
[iex2h5] Market data © IEX — Investors Exchange. Attribution required. See https://iextrading.com
Copyright © 2017–2025 Varga Consulting, Toronto, ON, Canada info@vargalabs.ca
“Data provided for free by IEX. By accessing or using IEX Historical Data, you agree to the IEX Historical Data Terms of Use.”