Ask HN: My software has moved trillions of dollars. AMA
6 points by logotype 3 months ago | 27 comments- logotype 3 months agoBefore it all started, back in the early 2010s, I read about High Frequency Trading, and it sounded super interesting. I wanted to understand how it worked. Without knowing anything about it, I thought I could simply get a Xilinx dev board and start using Verilog to build a hardware appliance for fast trades. Little did I know that a cheap dev board with limited logic gates wasn’t even enough to fit an Ethernet IP, let alone the challenges of using Verilog. I soon realized that it's probably more suited for electrical engineers (EEs) than software engineers (SWEs).
- logotype 3 months agoAfter that experience, I started rebuilding it using Go, Dart, and other languages. Then TypeScript came along, and eventually, it was rewritten in TS. Traditionally, FIX is written in lower-level languages, but there’s definitely an advantage to using TS, as it allows us to generate FIX messages directly in the browser.
- logotype 3 months agoAnother interesting thing that got me excited about HFT is the microwave networks that connect exchanges in the US. It's not often you can say "because fiber optic is too slow," but for these use cases, it's actually a technical advantage. Every piece of the stack is hyper-optimized!
- Gud 3 months agoWouldn’t it be more accurate to say, lower latency?
Because surely fibre optics beats microwave on speed?
- Gud 3 months ago
- logotype 3 months ago
- logotype 3 months ago
- GianFabien 3 months agoI have written a lot of C code running on Unix supercomputers for fund managers.
Based on my perhaps limited experience, I would have never thought that any VM based language would be accepted for production use. Could you explain how and where your software is being used in the banking world.
- logotype 3 months agoI used to work at the big investment banks for a long time. Around 2015 they began transitioning their native apps to web apps (mostly for high-touch trading), so VM based languages are very much used for initiating trades to various degrees, of course in the majority of the cases the actual FIX message gets created in some back-end running C++ or Java.
But there are exceptions, FIXParser was used to create the actual, real, over-the-wire FIX message to trade a trillion dollars in a couple of minutes by a large financial institution. And this is just one example I heard directly from the people involved. The library does not have any metrics/analytics so I can't actually know how much it's been used in the industry.
- logotype 3 months agoWould love to hear more, what was the C code used for, specifically? What information did it process and how? In real-time or batched?
- GianFabien 3 months agoVery real-time, as in Unix with real-time kernel extensions. Direct dedicated line to the exchange floor, processing trading info to recalculate portfolio positions and extrapolate potential future movements. Traders used this info on one screen and then input their trades on their dedicated terminals.
- logotype 3 months agoVery cool! Is there any metrics you could share at a high level? e.g. what latency (sw/hw)? throughput? what type of protocols/connections was used? what level of concurrency/parallelism? anything else? Cheers
- logotype 3 months ago
- GianFabien 3 months ago
- logotype 3 months ago
- proc0 3 months agoI wasn't expecting TS and HFT in the same sentence. Are you pivoting to something else with TS? Surely it's not for HFT?
- logotype 3 months agoIt began as an exploration into learning about HFT, but later shifted to TS. As far as we know, our clients do not use it for HFT. While we still prioritize performance, we are capable of processing a million trades per second on a single core. This will drastically improve in the near future though :)
- proc0 3 months agoI see, yeah if you need performance then TS is probably not a good choice, but I'm not familiar enough with HFT to know if that's always needed. Maybe that's only in certain subdomains. I've just seen some talks on optimizing HFT with C++, and it sounds like nanosecond performance is the target.
- logotype 3 months agoTS/JS is surprisingly fast these days. FIXParser has been performing at 1-2 microseconds per FIX message for several years. And that's with basic performance optimizations while keeping readable code. With further optimizations using WASM we can reach nanosecond speeds...
- logotype 3 months ago
- proc0 3 months ago
- logotype 3 months agoyour comments on the Frontend Treadmill makes sense. It's sad how FE development has become. I used to build front-end apps without frameworks, super fast and efficient. No need to constantly update dependencies. These days people would laugh at you for not using libraries and frameworks to glue a house of cards together.
- proc0 3 months agoYes the FE is a huge mess for large interactive client apps. I think WASM might be a good alternative with bad SEO as the downside.
- proc0 3 months ago
- logotype 3 months ago
- pavel_lishin 3 months ago... can you say more than the absolute bare minimum you have so far? It's impossible to come up with any decent questions without knowing anything.
edit: wait, is this it? https://fixparser.dev/what-is-fix
- logotype 3 months agohow about you, working in the finance space too?
- logotype 3 months agoyeah that's it :)
- pavel_lishin 3 months agoSo, uh, can you say more about it?
- logotype 3 months agoFIX is a simple protocol, typically consisting of key-value pairs in its most common form. However, that's not the entire picture. The protocol involves a lot of complex logic, including validations and rules. Although it was developed in the 1990s, it remains widely used today.
Basically, the process involves connecting and handshaking through a series of messages, which results in an active FIX session. Once the session is established, you can send bidirectional messages, such as requesting a market data snapshot to receive prices, submitting a new order, or anything in between.
- logotype 3 months ago
- pavel_lishin 3 months ago
- logotype 3 months ago
- sans_souse 3 months agoCan I have some?
- logotype 3 months agoI wish! I got zero from that trillion dollar trade, but just knowing about it is exciting. Such is life :)
- logotype 3 months agoIt makes me wonder how other open-source developers feel when their products are used by big corporations that pay nothing for them but generate tons of cash.
- GianFabien 3 months agoI'd like to understand how an open-source developer could acquire sufficient domain knowledge and expertise to write production quality code without actually working for one of the banks or their vendor organizations. Then any such work would probably be covered by NDAs, etc.
- GianFabien 3 months ago
- logotype 3 months ago
- logotype 3 months ago
- 3 months ago