Experienced  · 

Navigating performance challenges as a C# Software Engineer at Optiver

Daniele Albanese

When we think of market making, we often associate it with low-latency C++ applications. However, many other technologies and programming languages play a crucial role in establishing Optiver as a leading global trading firm, among them being C#.

At Optiver, our success is largely attributed to our people. While trading is heavily automated, it is still driven by human decisions. To facilitate this, we developed a wide range of applications and GUIs that traders use to make informed trading decisions. These applications and GUIs are primarily written in C#.

In this blog post, we delve into the unique challenges our C# engineers face and the techniques they employ to balance responsiveness, performance, and usability in this fast-paced global trading environment.

The unique challenges of an ever evolving trading environment

Trading is an extremely fast-paced environment that requires constant and relentless innovation. As markets moved from pit trading to electronic trading at the speed of light, the amount of data generated and the resulting performance requirements have skyrocketed.

Our C# engineers must create performant GUIs that can handle large amounts of data, particularly during busy and volatile market conditions. These GUIs must be reliable and responsive to enable traders to quickly make informed decisions. Any unresponsive or crashing applications in this fast-paced environment could lead to significant monetary loss.

As markets continue to evolve, so do our trading strategies and GUIs. Our C# engineers must be flexible and capable of navigating the diverse technical challenges that arise. This requires not only a deep understanding of the language, but also the ability to make strategic decisions regarding its implementation. This results in fast and continuous iteration cycles as we keep innovating and expanding our trading operations.

Go beyond the language

At Optiver, we firmly believe that proficiency in a single programming language, such as C#, does not define who you are as an engineer. While expertise in a chosen language is required, what sets apart a great, performance-oriented engineer is their drive to go beyond the confines of that language.

Creating a performant application involves much more than just writing fast code. It requires interacting with the operating system correctly, understanding the hardware on which you’re running, and efficiently using the network resources at your disposal. You have to be ready to debug complex systems that extend beyond your application, ensuring that the entire stack operates efficiently.

Leveraging problem-solving and technical expertise

While our C# engineers work in tandem with a wide variety of teams, one of their main counterparts are traders. Traders constantly monitor the market and devise new strategies, so they approach our engineers with open-ended challenges. Optiver’s engineers must thoroughly understand these real-world trading problems and translate them into performant software solutions that seamlessly integrate into our systems. This process requires a comprehensive understanding of C#, creative problem-solving skills, system architecture knowledge, and the ability to translate high-level problems into practical solutions.

While trading and engineering work together closely, it is up to our engineers to develop innovative solutions that balance our strict performance requirements with elegantly simple and sustainable software solutions. These solutions must be not only performant for today’s demands but also for tomorrow’s.

Real-life example: 4x performance improvements

Over the years, one of the main trading GUIs started to show signs of a slowdown. The first step to identify the causes of this slowdown involved extensive monitoring and debugging of the application to pinpoint bottlenecks, rather than blindly undertaking a complete rewrite of the entire interface.

When the GUI was first created, it needed to handle significantly less market data as Optiver traded only a couple thousand instruments. Over time, Optiver’s trading volume grew significantly, encompassing hundreds of thousands of instruments, all of which streamed their data into the GUI. The GUI’s performance optimizations were initially focused on application-specific methods, like simple multi-threading, instead of a comprehensive view of the entire system.

The solution, both simple and elegant, drew inspiration from the concept of foveated rendering used in the graphics rendering space. Even though a trader interacted with only a portion of all instruments on the GUI at any given time, the application consistently updated the prices of all subscribed instruments. This approach led to a host of unnecessary UI updates and processing of data that the trader would never see.

To solve this issue, one of our C# engineers proposed the creation of a separate, centralized backend that would handle data subscription. However, the GUI would only receive processed data that was visible to the trader. As the trader interacted with the GUI, for instance scrolling through option strikes, the backend would stream in the required data, and unsubscribe from anything that moved out of view. This process is transparent to the trader and greatly reduces the load on the GUI, making it massively more responsive. The graphs below demonstrate this improvement.

On the left, we can see the CPU usage of the GUI before this update, and on the right, after the update.

The significance of this improvement cannot be overstated. It not only improved the performance of the GUI itself, but it also freed up more CPU resources for numerous other apps, between 20 to 40, that traders run simultaneously. There were no more complaints about slowdowns or crashes, allowing the traders to focus on executing successful trades instead of wrestling with software issues.

We saw an even more drastic improvement when it came to RAM consumption, which reduced significantly due to loading much less data. To achieve this level of performance increase, it was crucial that the engineer didn’t view the GUI in isolation. Instead, they stepped outside of this sphere, viewed the system as a whole, and optimised the entire problem, not just the GUI.

This real-life example is a testament to the way our engineers approach problem-solving: with an acute focus on performance, a deep understanding of the broader system and a drive to innovate.

As markets evolve and trading strategies become more complex, our C# engineers will continue playing a key role in delivering innovative, reliable and efficient solutions. Their deep technical expertise, coupled with their capacity to translate real-world trading challenges into high-performance software, will continue to empower our traders and fuel Optiver’s success.

Apply now

Are you ready to apply your C# expertise in a high-performance trading environment?

ExperiencedLife at Optiver

Related Articles

  • Machine Learning at Optiver
    Experienced, Life at Optiver

    Machine learning opportunities in capital markets

    Solving problems at scale The allure of “problems at scale” is significant for researchers aspiring to transition from academia to the private sector. At Optiver, we are constantly scaling up in every dimension – adding more features, models, financial exchanges on which we trade; and expanding our range of products, asset classes and geographic colocations. […]

    Learn more
  • Experienced, Life at Optiver, Technology

    Behind the scenes: Engineering Optiver’s global trading network

    Optiver's global trading network is a marvel of engineering, ensuring rapid and reliable data transmission essential for electronic trading. Network Engineer Ryan Bennett reveals how dedicated fibre optic cables and meticulous route planning maintain Optiver's competitive edge. Despite challenges like geographical hurdles and fibre cuts, the network's resilience and continuous improvement keep Optiver at the forefront of trading innovation.

    Learn more
    Europe, Global
  • Experienced, Meet the team

    A finance role unlike others

    As a leading proprietary trading firm, Optiver works to make markets more efficient, transparent and stable across the globe. While our commitment to provide liquidity is continuous and our aim is to be a stabilising force, financial markets and our operations are dynamic. For the Finance Team, this requires continuous improvements in finance processes to stay aligned with evolving market conditions and business strategies.

    Learn more
  • Competition, Experienced

    Advent of Code 2023: Clean Code Challenge

    In December last year, Optiver proudly entered its third year as a sponsor of Advent of Code. This annual event, structured like an advent calendar, offers tech enthusiasts from around the world the chance to test and showcase their creative programming skills with a new festive-themed puzzle each day. Our sponsorship reinforces our commitment to fostering technical innovation and a culture of continuous learning.

    Learn more
    Europe, Global
  • Experienced, Life at Optiver

    Risk and reward within a dynamic trading firm: Insights from Optiver’s CRO Europe

    In business, risk management is often thought of as a of back-office support function—the department generally responsible for steering a company away from pitfalls and worse-case scenarios with cautionary, arms-length advice. Not at Optiver. In our high-stakes trading firm environment, it’s a core discipline that directly impacts the success of daily trading operations. As Optiver […]

    Learn more