Menu

How We Compressed 63.5 GB of Financial Tick Data to 5.5 GB
πŸ–ΌοΈ

How We Compressed 63.5 GB of Financial Tick Data to 5.5 GB

DEV CommunityΒ·Parth KhareΒ·6 months ago
#5mCnGIew
#rust#compression#timeseries#parquet#built
Reading 0:00
15s threshold

At AlphaBots, we run an algorithmic trading platform that processes live market data across Indian equity and derivatives markets. Every second, we capture 1-second snapshot data and full tick data across Nifty, BankNifty, and equity instruments. It adds up fast β€” gigabytes of new data every single trading day, compounding.

We store this data for backtesting, strategy validation, and compliance. After a few months of live operation, the storage bill started hurting. Loading large Parquet files for backtesting runs was slow β€” we were spending more time moving data around than actually running strategies.

We tried Parquet's built-in ZSTD. It helped, but not enough. So we built our own compression engine. Here's what we learned.

The Insight: Tick Data Has Exploitable Structure

Financial tick data is not random. It has properties general-purpose compressors ignore:

Prices move in tiny increments. A Nifty futures price might go 22,450.25 β†’ 22,450.50 β†’ 22,450.25. The raw float64 values look different.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.