r/highfreqtrading

Research infra: Does a table format really add any significant value if you can just sync a predictable Parquet layout to local NVMe?

Hey everyone,

I’m looking at data -> research workflows for Mid-Frequency Trading (MFT) ML pipelines using Python (Ray, Polars).

A common industry trend is using table formats like Apache Iceberg or Delta Lake on object storage (S3). However, if you already enforce a highly static, predictable directory layout (e.g., ⁠equities/exch=.../year=.../⁠ with <50 optimized Parquet files per leaf), I'm struggling to see the value.

In a high-performance research environment, it seems far more practical to treat object storage strictly as a cold source of truth, sync the required historical partitions directly onto the compute nodes' local NVMe scratch disks, and run active Python training loops entirely on local NVMe.

If you are caching a predictable folder structure down to local NVMe anyway, does an object-store table format buy us anything substantial, or is it just added complexity?

For those working on Quant Platform or QR Infrastructure teams: Do you actually query Iceberg/Delta tables directly from cloud storage during active research, or do you use the "Cloud Archive -> Local NVMe Hot Compute" pattern?

Thanks!

reddit.com
u/bitterpopsicle — 3 days ago

Trexquant C++ Developer Interview Experience and Expected Questions?

Hi everyone,

I have an upcoming interview for a C++ Developer position at Trexquant and wanted to ask if anyone here has gone through their interview process recently.

I'd really appreciate any insights on:

  • What technical topics should I focus on?
  • How deep do they go into modern C++ (C++17/C++20), STL, templates, memory management, multithreading, and concurrency?
  • Are there any data structures and algorithms or competitive programming style questions?
  • What kind of coding problems can I expect?
  • How many interview rounds are there, and what does each round typically cover?

If you've interviewed there recently, sharing your experience or any sample questions would be extremely helpful.

Thanks in advance!

reddit.com
u/blurryface12345 — 5 days ago
▲ 9 r/highfreqtrading+8 crossposts

Data ingestion and avoiding lookahead bias is a massive headache, so I built an open-source CLI agent to automate my backtesting setup.

It takes a plain-English strategy idea, generates validated Python using your own LLM key, and runs a historical backtest.

I just added Binance support today.

My biggest challenge right now is the automated safety checks—it currently scans the AST for lookahead flaws before executing.

The tool is free and open source locally at finnyai.tech, with an optional $10/mo tier for managed hosting.

If anyone here builds automated validation for strategy code, how do you handle edge cases and LLM data hallucinations?

u/Awkward_Weather5721 — 9 days ago

I am a C++ Middleware engineer for Linux embedded systems with 5yrs of experience. I want to break into HFT as Low-Latency C++ dev. Is it a good idea to try getting into HFT after 5 years? Can you guide me according to my situation on what to learn, what projects to create, open-source projects ?

reddit.com
u/Key-Sun581 — 12 days ago

Quoting on illiquid markets

I am building a market making engine for illiquid markets (from few to say 50 trades an hour). It shows positive returns, after testing for the last 2 weeks. And I have a few questions I was thinking:

All the MM theory (such as Avellaneda Stoikov framework) are targeting high volume, low spread markets. Any good papers/frameworks built for illiquid market? What is the main difference?

From my point of view there are 3 types of events: small single market trade, huge single market trade, and huge informed (not single) trade. The last one is toxic, the first two are good ones. I am failing to distinguish them, and usually it's already too late.

Earlier I experimented with hand crafted quoting algorithms, but apparently the most effective one is simply quote at the top (with some exceptions like filters for OB imbalance, skip small levels etc) and eat the spread. I think the right approach is to quote at multiple levels, so I will earn more on rare events - huge trade arrivals. I failed to find some standard way to do so, or the way that will at least beat single level quoting.

Any ways to avoid toxic orders without losing much volume?

How to distinguish uninformed huge trade vs informed huge trade? Should I immediately sell if the price dropped or should I hope it will return back (uninformed single trade)?

reddit.com
u/Unhappy_Barracuda459 — 14 days ago

Implemented an HNSW Vector Database in C++ with AVX2 SIMD (99.3% Recall@10 on SIFT1M) , Seeking architectural feedback on concurrency model

Recently I'm working on a vector database from scratch in C++ to better understand how modern vector database works. I just finished benchmarking against SIFT1M dataset (1M vectors, 128 dim) and wanted to share the performance and design choices and get feedback.

Core architecture details-

  • Instead of vector<vector<float>> , used 64 Byte aligned allocator to maximise L1/L2 cache locality.
  • implemented AVX2 FMA SIMD intrinsics for distance computation (L2, dot product, cosine).
  • Implemented HNSW graph for Aproximate nearest neighbor, elminating O(n) linear search.

SIFT1M Benchmark Results (single threaded, Intel i5-13420H, compiler flags ( -O3 -march=native -ffast-math)

  • Recall@10: 99.30%
  • Recall@100: 98.26%
  • Throughput: 2,215 queries/sec
  • Tail Latency (p99): 654 microseconds
  • Build time: ~13 min.

To establish a baseline, I benchmarked my implementation head-to-head against hnswlib on the same machine using identical parameters (M=32, ef_construction=400, ef_search=200).

  • Throughput: 2,215 QPS vs hnswlib's 2,745 QPS (~19% slower).
  • Recall@10: 99.30% vs hnswlib's 99.88%.

Right now, my implementation optimised for single thread traversal and I prioritized read-throughput first using a global shared_mutex. My next major task is concurrent writes. I'm looking into fine-grained spinlocks per node, but I want to ensure strict lock ordering to avoid deadlocks and TOCTOU conditions.

For concurrent insertions into HNSW, would you lean toward per-node spinlocks, lock striping, or another approach?

github repo link -> https://github.com/randomfunction/vector_database/tree/main

reddit.com
u/PerrythePlatypus51 — 12 days ago
▲ 2 r/highfreqtrading+1 crossposts

I tried processing 10 Million HFT ticks/day on a Free 1GB RAM Cloud Server. It crashed immediately. Here’s how I rebuilt it to use just 125MB of RAM.

Hey everyone,

I’ve been working on a personal project to build a zero-lag High-Frequency Trading (HFT) ingestion pipeline. I wanted to see if I could handle institutional-level data velocity on the absolute cheapest hardware possible: an "Always Free" 1GB RAM micro-instance.

The Failure 💥 Initially, I spun up a Go websocket client + QuestDB. The moment the market opened (peaking at 1,000+ ticks/sec), QuestDB chewed through all 1GB of RAM, and the server locked into an Out-Of-Memory (OOM) kernel panic death loop. I couldn't even SSH in.

The Re-Architecture 🛠️ I had to drop heavy time-series databases and optimize every single layer. Here is what I built:

  1. Go Ingestion: Bypassed JSON parsing entirely. Wrote a Go collector to unpack Level-5 Binary byte-streams directly from the exchange.
  2. The Shock Absorber: Dropped Kafka. Used NATS for Pub/Sub. It handles the firehose backpressure perfectly and idles at just 20MB RAM.
  3. Stream Processing (Python): Instead of querying a DB, I wrote an in-memory state machine. It computes 14 ML features live (like MTF candle sizes and Anti-Spoofing Orderbook Imbalances) without any disk I/O.
  4. Direct Parquet Writing: Built a micro-batcher using PyArrow. Once 5,000 ticks buffer in RAM, it flushes directly to a compressed .parquet file.

The Result 🚀 The entire pipeline runs without dropping a single tick, compressing 10 Million+ daily data points into ML-ready datasets, all while maxing out at 125MB RAM. I also pipe the NATS stream directly to a React frontend via WebSockets for a live, zero-database UI.

I wrote a detailed technical deep-dive covering the whole architecture on Medium if anyone is dealing with similar compute constraints: 🔗 [hft]

You can also see the live dashboard streaming here (Best viewed during Indian Market Hours 9:15 AM - 3:30 PM IST): 🔗 http://92.4.70.154:8080/god_mode.html

Would love to hear if anyone has tackled similar memory constraints or has suggestions to improve this architecture!

https://preview.redd.it/4m6gdd8cd09h1.png?width=2846&format=png&auto=webp&s=f1b50ffc00ca70ba63b44d29a0c0fc6c00d5562f

u/Interview-Cracker-AI — 13 days ago