Quantum Qube

Using statistical learning to generate trading simulations

Published 12 JAN 2024

 

Quantum Qube was founded in March 2023 by a small group of individuals with a combined physics and financial background. Their aim was to formalise work started in 2016, simulating trading markets to better model financial markets with a focus on increasing returns and decreasing risk. Recognition of their early research has resulted in them being invited to be part of the NVIDIA Inception program.

Modelling the Trading Markets using Statistical Learning

Project Background

Traditionally, market analysis for trading is often carried out using the Capital Asset Pricing Model (CAPM) - a financial simulation that calculates the expected rate of return for an asset or investment. CAPM achieves this by calculating the expected return on both the market and a risk-free asset, and the asset's correlation or sensitivity to the market, however there are some limitations to the CAPM, such as making unrealistic assumptions and relying on a linear interpretation of risk versus return. The Quantum Qube research team wanted to develop a better way of modelling the return versus risk relationship and so they looked to simulate the trading market.

Traders follow systematic rules, always doing the same processes based on the same metrics, but it is the combined actions of these individuals as a group that influence the market. In theory the more traders that could be simulated, the more realistic the virtual market generated would be.

Project Approach

Simulation began in 2016, using CPU-based calculations in MATLAB, but performance was slow, so it was recoded into C and then C++. However, it was the realisation that GPUs rather than CPUs might hold the key to significant performance increases. The entire code was repurposed into CUDA from the ground up, without the use of pre-configured frameworks or libraries such as TensorFlow or PyTorch. This approach was taken to devise a research and testing platform based around a propriety GPU core best suited to the unique computational needs of the business. Additionally, coding directly in the hardware language offered a processing advantage and the ability of real-time programmes being introduced at a future time.

The initial work was carried out on servers with standalone NVIDIA A100 GPUs - whilst the system did contain four cards, they were not linked so the processes were coded to work on a single GPU.

The later stages of research were conducted on a virtual GPU (vGPU) cluster, offering the greater performance of combined cards - firstly Pascal-based P100 GPUs, then Volta-based V100 and finally Ampere-based A100 GPUs. The above diagram references the performance benchmarks that could be expected relative to each other.

Project Results

This evolution in compute power from CPU to NVIDIA Pascal series GPU, through Volta and Ampere-based GPUs generated an exponential growth in the traders being simulated. This in turn allowed for the application of a Genetic Algorithm (GA) on these traders to create Qubes, where each Qube represents a virtual trading environment. The greater number of Qubes generated equates to a greater market simulation and thus more insight and predictability of behaviour.

The below diagram illustrates the trading Qubes generated per second on the evolving hardware and the resulting Qube volumes available for the GA to simulate with and learn from.

Although the hardware evolution was key to the performance and speed of the simulation system, it was the move to a vGPU cluster that offered further benefits. Using a Docker container at a hyperscaler delivered much greater performance, but there were challenges with GPU availability and support response time. Indeed, obstacles were often overcome in-house prior to the hyperscaler providing assistance. A later transition to the Scan Cloud service maintained the system performance but addressed the support issues with almost 24/7 access to data scientists and engineers, resolving most issues within 30 minutes. This created an environment for minimal time to results and opportunities to further improve performance as new and more powerful NVIDIA GPUs become available.

The Scan Partnership

Scan were introduced to Quantum Qube through the NVIDIA Inception program as greater parallel compute power was required for their research. Scan offered a range of vGPUs for Quantum Qube to trial, including valuable feedback on utilisation and optimisation of the code. The results were achieved over a three day period moving between GPUs with simple onboarding and data transfer using Docker containers.

“Even on a Friday or Saturday night at 10pm, I always got someone from Scan who had the right answer. If I needed something, it was done for me. It's the biggest difference. I'm not even talking about the fact that I enjoy working with the Scan guys. Every time I needed someone, they were there - a small team of about 10 people. It's was always nice with the hyperscaler, but you know you're talking about a big company because it's never two times the same person and it's very impersonal.”

Experienced Technical Expertise

Philippe Huber

Director, Quantum Qube


Next Steps

The Quantum Qube research team is keen to evaluate the performance of the NVIDIA H100 GPU cards within the Scan Cloud environment, with a view to acquire a DGX H100 appliance at a future date.

Related content

Feature Page
Quantum Qube

AI-enhanced investment management.

Read more