Juan Alday Why C Wins In Finance
read summary →TITLE: Juan Alday: Why C++ Wins in Finance CHANNEL: Citadel Securities DATE: 2026-04-28 ---TRANSCRIPT--- Thanks everyone for being here. Today I want to talk about why C++ wins in finance. Why almost everybody in the market uses this language. And there’s a couple of reasons. But instead of that, let’s address one normal situation. What happens on a day-to-day to everyone. Take this number for example. Totally made up. Lawyers happens, and this is a number, that I just came up with. You have 30 microseconds to do a trade. Something comes in your pipeline. You have two micros to just decide what to do. You check your risk for five macros, and then, sure, you want to hit it, so you have another three macros. You’re hitting a market in Chicago so approximately 6000km. Speed of light, 20 nanos. So that’s your budget. 30. If you missed by 10 nanos, someone else gets the fill. You’ll get zilch. And you start either losing money or not making money. And this is what happens daily, billions and billions of times. And it’s not about your average speed. And now this is the 99.9. This is, like, your worst thing. This is how you need to deal all the time. Constantly. And there are very few languages that can give this to you. And one constant is that in those situations, the choice of computing language is not academic. It’s not an experiment. It is practical, and it has to work all the time. And that is why most people go to C++. But with this thing, you know, there are a lot of things that we like about C++. We have… First of all, it’s a language that gives you control and abstraction at the same time. And that is a great feature. And everybody has struggled with other languages that have garbage control and whatnot. And the worst thing that can happen is that at, you know, 11, after some economic number release, you get a garbage collector five milliseconds in the middle of a hot bath, and you lose millions and millions of dollars. So having absolutely no garbage control and no garbage collection is great. But then you have memory layout because one of the things that C++ gives you is full control over your cache lines, over, NUMA cores. You name it. You have it all. So not only you have control over your execution path, you have full control and visibility of your data path. But then you want to talk to the kernel. But you don’t want to ask permission to the OS. You’re going to go directly to your network cards. You want to say, “Hey, I want to talk to my NIC directly.” You can also do that. And there’s no OS that you need to like, you know, give it permission to do this. And last but not least, you have very predictable codegen, and you’re not going to have suddenly one just telling you, well, I need to reevaluate what your hard path is doing. And here you go. This is a “new code.” Whatever you compile, whatever you get is what’s going to run every single time, predictable 100% of the time. And these are all great features that we have had in C++ for many years. And we got complacent. We got complacent because we learned that with C++, it was more important to put the how and the what. We started handcrafting for loops and gotos in our code and loop and rollings and things that were really scientific, if you will, and DAF devices whatnot. But then something happened. C++ started to learn. C++ started to evolve in a way where not only you need to say what do you mean you mean what you say. Each generation has done the same thing, which is a feature of the language. You start transforming manual behavior, and you make it into a language feature. Take concepts, for example. We used to have all this obscure template machinery, all this SFINAE nonsense, where we just had unconstrained templates and we just beg for mercy every time we coded them. And now we have very clear behavior and intent in our type system, and we know precisely what we’re dealing with. And this was for C++20. But then we had in 2023, we started getting ranges. And ranges gave us something amazing, which is that we’re no longer doing for loops. Now we’re doing transformations iteratively over a very wide variety of ranges of data. So now we control more of the why rather than the how. And now for 26, we’re going to get std::execution, where the same thing is going to happen for async operations, where we’re going to start pipelining and controlling not only our async pipelines, but we’re going to control also how we’re canceling. Errors are going to be part of the type system, if you will. And this is awesome. I think that this is something that is fundamental to C++. But one of the things that we still haven’t addressed until now, and that’s my segue into execution, is concurrency. Concurrency was always left at the mercy of the gods of, like, networking and threading and whatnot. And we all have seen experts that for many years had their own recipes for this. Throw a couple of threads here, a couple of mutexes, a lot of queues. Now we have lock for queue, so everything is a lock for queue. And this gave us a lot of very complex situation like races under very bursty load, when suddenly there’s an increasing volume, consoles that were left behind hundreds of thousands of orders or the typical machine bouncing a process at 3 in the morning. Suddenly, there’s a deadlock, and you get a call and you need to connect to a system and try to fix it manually. And you end up just nuking the process and starting a new one, which is terrible. And the worst thing is the overall, “Oh, I’m going to hope for the best.” This is my strategy for increasing, like, load. We no longer have that. Now we’re going to start pipelining our processes, as you can see here, and start controlling where, how, why and more importantly, what happens when we want to cancel or we want to stop. Everything is integrated, and fundamentally, this is part of the overall trajectory of C++ as a language. We started getting rid of the loop unrolling code, even though you can still do it if you want because we realized that the compiler does it better for me. We stopped doing all this SFINAE tricks that we used to like because we had nothing better. We went to a place where concepts express clearly our requirements, With ranges, we stopped doing our for loops, and now we see that this is better. We have data transformation. It’s clear. We just tell the system what we want to achieve, not how to do it. And all this ad hoc nonsense machinery for threading and pipelines and whatnot, that is gone with structure concurrency. So the language, if we need to put into two sentences what it does, it’s telling us to stop coding the mechanics and start expressing intent. Because C++ is not just the best language for what we do. Today, it’s the best language for the foreseeable future. I think that every single generation of the language, every single version, gives us better tools and a better way to have more fun coding and less fun suffering. It’s the nature of the beast. And this is my segue into passing the torch to Gašper, who’s going to talk about execution. Because, again, that’s the last frontier, at least for me.