Please download and read our paper on the arXiv. https://arxiv.org/abs/2007.01430
Portfolio Optimization of 40 Stocks Using the D-Wave Quantum AnnealerJeffrey Cohen, Alex Khan, Clark Alexander
Abstract: We investigate the use of quantum computers for building a portfolio out of a universe of U.S. listed, liquid equities that contains an optimal set of stocks. Starting from historical market data, we look at various problem formulations on the D-Wave Systems Inc. D-Wave 2000Q(TM) System (hereafter called DWave) to find the optimal risk vs return portfolio; an optimized portfolio based on the Markowitz formulation and the Sharpe ratio, a simplified Chicago Quantum Ratio (CQR), then a new Chicago Quantum Net Score (CQNS). We approach this first classically, then by our new method on DWave. Our results show that practitioners can use a DWave to select attractive portfolios out of 40 U.S. liquid equities.
July 1, 2020 update:
We plan to publish our article on arXiv later this week. Should be a good, practical and academic article relevant to financial services, stock market investors, and quantum annealing users.
Current title draft:
Demonstrating Quantum Advantage in Portfolio Optimization Using DWave’s Quantum Annealer
Jeffrey Cohen, Alex Khan and Clark Alexander
We optimize a portfolio classically & with a DWave Systems annealing quantum computer. As we push the quantum annealer to do more (affine transformations and tuning), we apply new classical methods (and the race continues).
We investigate the use of quantum computers for the building a portfolio out of a universe of U.S. listed, liquid equities that contains an optimal set of stocks. Starting from historical market data, we look at various problem formulations on the DWave annealing quantum computer to find the minimum risk portfolio, an optimized portfolio based on the Markowitz formulation and the Sharpe Ratio, a simplified Chicago Quantum Ratio (CQR), then a new Chicago Quantum Net Score (CQNS). We approach this problem in multiple ways; solving it classically, then by our method on an annealing quantum computer at the current stage of maturity. Our results show that practitioners can use a DWave annealing quantum computer to select attractive portfolios out of 40 U.S. liquid equities.
We recently added a genetic algorithm that provides one portfolio out of 1.1T in ~30 seconds, and plan to add a simulated annealer to the classical mix. On the other hand, we are using a DWave computer model (2000Q) first released in 2017.
Please watch a brief preview below:
Comments and questions welcome!
We achieved quantum advantage in portfolio optimization (in R&D mode) using a DWave quantum annealer
Over the past 3-4 months, our portfolio team (Jeffrey Cohen, Alex Khan, Clark Alexander and associate Professor Terrill Frantz) has focused on moving from classical computation of portfolio optimization to running that same code on a quantum computer. We have been running on the DWave system for a few months, and finally feel comfortable with how to operate it, tune it, speak to it in its own language, and achieve results we can verify and feel confident in sharing.
I am proud to announce that last night we achieved that milestone. We were able to optimize a set of 40 assets and select a (group of) portfolios that are best to invest in for someone who cares about minimizing risk and maximizing return, or about balancing those metrics.
We will be publishing our results.
Three things to share:
1. We learned a great deal about how to formulate a problem for a quantum annealer. You see, quantum computers don't multiply nor divide. They are not Microsoft Excel. You have to think differently to use them.
2. Quantum computing time, and our own time, is precious. We used just a little each month, and learned how to simulate quantum annealers very well. We could run a 'quantum computing' problem in simulation mode, exactly matching the quantum energy levels, using Python for up to 24 assets in seconds, 28 assets (268m) in a 1-3 minutes, and 32 assets (4.2b) in just over a day on a 48GB RAM server. We could not achieve brute force classically with 40 assets...we would lose too much time.
On a quantum computer, 32 assets takes just a few seconds. 40 Assets classically was beyond our reach.
3. We are having fun doing this. We have Google Hangouts meetings for hours, code Python and DWave into the late night, dig into the math, physics, and economics when needed to crack a problem, and I think this has given us a better understanding of the equities markets. If you check our company's Twitter handle, @chicago_quantum, you will see posts on money flows that are well beyond our comprehension when we started this effort.
We will publish our findings in a technical way (arXiv or a publication - call us Physics Review, American Banker, McKinsey Quarterly, and Harvard Business Review), and in non-technical ways (e.g., YouTube videos, Medium Articles, LinkedIn, and Tweets). Thank you, Jeffrey Cohen.
Alex Khan, Clark Alexander Ph.D., and I completed our work on classical portfolio optimization. We can run classical jobs for a long time that optimize more than 32 assets at one time. We can run, brute force, 32 assets in a portfolio on an aged laptop, and can make progress towards completing 40 assets in one go. We stopped that run, which requires over 1 trillion portfolios analyzed, as our server was producing enough heat to keep our furnace redundant. We have developed a concept and associated workflow that allows us to analyze hundreds of assets and create superior portfolios.
We ran the Sharpe Ratio, and created our own 'proprietary' classical formulation which we call the Chicago Quantum Ratio. We achieve similar portfolio optimization results with cleaner math that should run better on a quantum computer.
Since April 10 we have been running different formulations of the problem (with 20 assets) as a QUBO on D-Wave Systems using solver DW_2000Q_5, which is a 2030 qubit system. We continue to run different formulations of the QUBO (or Binary Quadratic Model, BQM), to replicate the optimal portfolios as selected from using the Sharpe Ratio, and the Chicago Quantum Ratio.
- we started with one sample, random, portfolio and achieved acceptable results
- running a second sample, also random, that has significant negative correlations between stocks
- setting up a third random sample...
Our goal is to replicate or deliver equivalent results to our brute-force solvers, then...then increase the problem size that can be run on a quantum system.
As always, please reach out to us for more information, to work with us, or to join the team.
Clients are always welcome!
Thank you, Jeffrey Cohen, President US Advanced Computing Infrastructure, Inc., on behalf of our team.
Strategic IT Management Consultant with a strong interest in Quantum Computing. Consulting for 29 years and this looks as interesting as cloud computing was in 2010.