Trying out the new D-Wave Advantage on the stock picking problem

Jeffrey Cohen, October 6, 2020: Updated October 8, 2020

We presented our research at the D-Wave Systems QUBITS 2020 conference in late September. We embedded and solved our 64 stock optimization problem on the D-Wave System 2000Q quantum annealing computer using three different embedding strategies. We launched a production market offering to select efficient stock portfolios from 60 stocks based on this technology, found here.

Image for post
Image for post
This is the recording we presented at D-Wave Systems Qubits in September 2020

During the conference, we learned about the D-Wave Advantage, with 5,760 functioning qubits, with the theoretical capacity to solve a 180 stock problem, with fully connected vertices, or cliques. We heard from expert colleagues that we should expect to solve ~120–125 right away.

Image for post
Image for post
D-Wave System Advantage 1.1 — system details

So, we got to work. This article discusses our progress and challenges.

Since our last Medium article, we scale up our classical application to 2,955 stocks at one time, including data validation and loading, in under one hour. This is approximately 10⁹⁰⁰ portfolios to search. We add a custom or ‘bespoke’ simulated bifurcator to our classical technologies. We tune our solvers for greater speed. This application runs well and provides efficient portfolios.

However, we need a way to run quantum portfolios larger than 64 stocks.

We read about the D-Wave Advantage system and update our configuration files to find it. We search for ‘dwave.conf’ on the iMAC and change one line to read: ‘solver = Advantage_system1.1’.

The new D-Wave system does require a wait before every program run, from 10 to 20 minutes. Over the past two days, wait times have been 5–15 minutes per run. The new system is busy.

We start running stock portfolios.

180 stocks: no embedding found

165 stocks: no embedding found

150 stocks: no embedding found

135 stocks: no embedding found

128 stocks: We find an embedding, but need to tune our ‘chain strength’ parameter to find valid portfolios of size 10 assets. This changes the biases, or stock values, stored on the qubits, and then changes them back when we receive our answer. We did not adjust any other parameters.

We tune the scaling of the QUBO and now successfully run 132, 134, 136 stocks consistently, and 138 stocks (1 of 5 attempts). To find attractive stock portfolios we do need to use the D-Wave System Problem Inspector and adjust our chain strengths.

Our run of 136 stocks required some adjustments to the chain strengths, which reduced the biases loaded on the qubits, and made an overall successful run more likely.

Image for post
Image for post
This is the linear view of the stocks loaded onto the qubits, and how they inter-connect
Image for post
Image for post
This is how our 136 stock problem maps onto the new Pegasus architecture
Image for post
Image for post
This is what the qubits look like that hold stocks — each has a bias

We are seeing very large chain lengths, some as high as 35 qubits. We will continue to adjust and tune for this too, as well as annealing time. Of course, we will search for many different sized portfolios.

Image for post
Image for post
D-Wave Systems Inspector — one chain of qubits for one stock

So, how did the D-Wave quantum annealer perform? We had it focus on portfolios with only 10 stocks versus all other methods searching ~all 128 sized portfolios. The quantum annealer scored better (picked better portfolios) than the ‘speeded up’ bespoke simulated annealer, custom simulated bifurcator, TABU multi-start sampler, and the ‘all asset’ average solution. Of course, we can slow down those other solvers to do better.

Here we share our raw systems output on a somewhat random set of 136 stocks. CQNS values are better when more negative (lower is better). We pick 5 stocks out of 136, and we set the D-Wave System to pick the best 68 out of 136, which it did.

Raw results from an October 8, 2020 run of 136 stocks, including quantum annealing

The D-Wave Systems Advantage system did a good job picking stocks out of the search space we provided it, beating out the TABU sampler in absolute terms. Remember we only let it search for 68 stock solutions, whereas the others can search from one to 135 stocks.

For those that follow Chicago Quantum, you know that we recruited a new solver to the team, a custom coded simulated bifurcator. This method is fairly new, and we like the results it provides. It does well when the other models do poorly, ensuring we have valid and attractive portfolios to work with.

Image for post
Image for post
Custom Chicago Quantum Simulated Bifurcator — early release

Here is an important chart that shows the randomly selected CQNS values (lower is better) by number of stocks in a portfolio. You can see that the best and worst portfolios are the smallest ones, and diversification removes true advantage from this formulation.

Image for post
Image for post
Monte Carlo results for 136 stocks — assets chosen vs. CQNS score

Note: We now use the ‘true’ CQNS scoring model. It has to be slightly adjusted to build the QUBOs for three of our heuristic solvers. We run those solvers, then re-score the resulting solutions using the ‘true’ CQNS algorithm. This ensures consistent scoring, but does not significantly impact solution quality.

We also removed one of our market indices, the Wilshire 5000 (^W5000), as it has been tracking the S&P 500 (^GSPC) closely.

During our scale-up work, we needed a way to determine if solutions were better than average at a glance. We do this by adjusting the CQNS Power parameter to set the ‘all in’ (e.g., 128 stocks) solution CQNS score to zero.

We still have plenty of system time in the next few days to test and explore the new solver. Stay tuned for more updates.

Image for post
Image for post

Next Steps: We can run

YouTube video posted by D-Wave.

Papers and articles found on Research Gate.

Jeffrey Cohen, President, US Advanced Computing Infrastructure Inc.

Chicago Quantum (SM)

Jeffrey Cohen, President of US Advanced Computing Infrastructure, Inc., & founder of Chicago Quantum (SM). We use quantum algorithms & our quantum platform

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store