How we apply our quantum computing and classical formulations to select two US stock portfolios.

UPDATED: August 3, 2020 with initial portfolio results.

UPDATED: August 18, 2020 with portfolio results

UPDATED: September 16, 2020 with portfolio results

Jeffrey Cohen, President, Chicago Quantum, US Advanced Computing Infrastructure, Inc., July 15, 2020

We construct stock portfolios based on our stock picking formulations from July 10, 2020 data, after the US market close. We pick from a universe of 60 stocks, run them through our classical and quantum algorithms, then select two stock portfolios from the quantum portfolio results. In this Medium article we share our methods, observations, and portfolios selected. Please see our arXiv article for more detailed information on the underlying mathematics and computations.

Our starting point is 60 US, liquid stocks picked alphabetically (tickers a — c, ppal*). We download the adjusted close data from Yahoo Finance on July 10, 2020 and keep it in memory (and .csv files) while we run our code.

We accumulate 3,556 valid quantum portfolios. This means the D-Wave Systems quantum annealing computer reads our data (a symmetrical 60x60 matrix) and returns a set of portfolios with the same number of assets the matrix was built for, or sometimes no matching portfolios. Why? The D-Wave quantum annealing computer has to find our specific portfolio size in a very few number of tries (500 or 1000) out of a large number of choices. A universe of 60 assets gives us a solution space, of 1.15 x 10¹⁸, or 1,152,921,504,606,846,975 possible portfolios to choose from. Our full set of experimental runs (reminder, this is R&D), cost us ~30% of our D-Wave monthly computing budget, or about 20 seconds on the quantum computer.

We cannot use brute force calculations as they take too long. Our current formulation supports MC runs of ~750 million tries before we exceed memory. We run Monte Carlo (MC) simulations of 50,000 random portfolios (across all portfolio sizes) to gain a high-level view of the neighborhood of average portfolio solutions. We plot one Monte Carlo simulation against our quantum portfolios (below). We see our quantum values overwrite almost the entire efficient frontier, which shows us comparability between our CQNS formulation and the classic Sharpe ratio. In areas of higher risk, the CQNS finds higher expected returns for certain levels of risk.

Image for post
Image for post
Plot of classically computed values vs. quantum values — efficient frontier

Finally, we ran our genetic algorithm in two ways. We seed it with 1,028 random portfolios or the 3,556 D-Wave portfolios, and keep all else constant. Both return the same 2-asset portfolios.

Our methodology to analyze and select portfolios starts when we calculate the Sharpe ratio and the Chicago Quantum Ratio for each valid quantum and genetic algorithm portfolio. Our solution space is the quantum selected portfolios, which were generated by minimizing the Chicago Quantum Net Score.

We start with the best five portfolios based on the maximum values of the Sharpe ratio and Chicago Quantum Ratio. This analysis gives us low risk, low return portfolios. None of the five solutions contain the genetic algorithm stocks. We selected the maximum CQR portfolio as our CQR portfolio. It has 6 assets.

We analyze the best (minimum) CQNS scores to select our CQNS portfolio. We see the algorithm, when run on a quantum annealing computer, favored smaller portfolios. We had to look past 429 ordered portfolios (out of 3,556) to see one with > 10 assets (25 then 27 assets). The best four portfolios with no quantum qubit chain breaks (system remains fully connected), have (7–8) assets and the absolute best CQNS portfolio with a 3% chain break had 6 assets. These best CQNS portfolios all contain the two stocks from the genetic algorithm run. We select the best CQR and Sharpe ratios out of the top 4 CQNS portfolios, which has 7 assets.

It is interesting that the CQNS formulation, when run classical, does not favor small stocks, but the D-Wave found its best portfolios in the smaller sized portfolios. In the chart below, you see that average CQNS scores are relatively flat across portfolio sizes > 13, and worse for smaller portfolios. This is an open question in our research.

Image for post
Image for post
Chicago Quantum Net Score average values vs. portfolio size

Our CQNS portfolio has a Sharpe ratio of 4.45706, and CQR of 0.720736, expected annual return of 16.529% and standard deviation of 3.708%. Our CQR portfolio has a Sharpe ratio of 4.95602, CQR of 1.07436, and expected return of 8.573% and standard deviation of 1.730%.

We will periodically track and report the market performance of both the CQNS and CQR portfolios against the universe of stocks we selected them from.

CQNS Portfolio: ADI, AMP, APA, BA, BAC, BHC, BLK

CQR Portfolio: AMZN, ATR, BAC, BMY, CERN, CHRW

GA Portfolio: AMP, APA

Universe: 60 stocks* (below)

In summary, we select two stock portfolios out of the results from a D-Wave Systems quantum annealing computer, out of a universe of 60 stocks. It costs us 20 seconds of quantum computing time. The two stocks selected by the genetic algorithm, AMP and APA, were in all the best CQNS portfolios, which also had relatively higher expected returns and risk. The best Sharpe ratio and CQR portfolios had relatively lower expected returns and risk. The difference between these was 40% to 50%.

Finally, we have no evidence that any of these portfolios are ‘optimal’ or ‘best’ or likely even in the top 25% of portfolios we could have selected. They were chosen based on prior 12-month performance, which is no guarantee of future results. What we do know is that we use a quantum computer for 20 seconds to look through 1.15 x 10¹⁸ portfolios and we select portfolios that we will track and measure against the universe of stocks they were selected from.

Past Performance Statistics on the portfolios:

Image for post
Image for post
Summary of past performance statistics on the two portfolios

This is still ongoing research for us at Chicago Quantum. This is our first public quantum portfolio selection. This is research and development. This is not meant as investment advice. We will track and report performance of these two stock portfolios against the 60 stocks chosen from. We continue to improve our formulations and our effectiveness in using quantum annealing computers.

  • Our 60 stocks include: AA AAL AAPL ABBV ABT ADBE ADI ADM ADP ADSK AES AFL AIG AJG ALGN ALK ALL ALXN AMAT AMD AMGN AMP AMZN APA ASML ATR ATVI AVGO AXP BA BAC BAX BBY BC BEN BHC BIIB BK BKR BLK BMRN BMY BP BRK-A BSX C CAG CAT CB CCI CDNS CERN CF CHKP CHRW CHTR CL CLF CLR PYPL, and our indices include ^GSPC ^RUT ^W5000 ^IXIC”, and the ^IRX. Data from Yahoo Finance as of 4pm CT on July 10, 2020.

Initial results:

We tracked 5 portfolios from market close July 10, 2020 through market close August 2, 2020. Our two-stock solution (the optimal solution for CQNS) returned 12.20% against a 60-stock benchmark of 3.17%. This is a significant outperformance of the benchmark and S&P 500 market index during the timeframe.

However, our CQNS and CQR portfolios that were based on the selection of portfolios chosen by the D-Wave quantum annealing computer did worse than the 60 stock benchmark. The CQNS portfolio (generalized to 7 stocks) delivered 2.69% and the CQR portfolio (generalized to 6 stocks) delivered 3.08%.

However, both the Chicago Quantum generalized portfolios (not optimal, and selected out of 6 & 7 asset solutions) under-performed the 60 asset universes they were chosen from. One portfolio outperformed the S&P 500, while one achieved equivalent results.

Results on the stock portfolios (hot off the presses)

August 18, 2020 Results (17:30 pm CT — markets closed)

Image for post
Image for post
Updated results as of August 18, 2020 (market close) of 3 portfolios vs. 2 benchmarks

While the markets have increased in the past five weeks by ~ 7%, our Chicago Quantum Ratio portfolio of 6 stocks kept pace with the market while the Chicago Quantum Net Score portfolio of 7 stocks under-performed by ~1.7%.

However, our ideal portfolio which had the best CQNS score out of all 1.15 * 10¹⁸ portfolios, outperformed the market by ~ 7%, or doubled the return.

Our optimistic interpretation of the results is that the CQNS provided a small, optimal portfolio of two stocks that outperformed all relevant benchmarks. In other words, we found the goose that lays golden eggs.

Our realistic interpretation is that three weeks of results on one portfolio selection is not enough to draw conclusions. We might have gotten lucky in the small, optimal CQNS portfolio and unlucky in the more generalized solutions. We plan to expand our footprint and both evaluate more equities (broaden our search), and evaluate more equities at one time (scale up our search).

The second interpretation is that when the CQR and CQNS are generalized (e.g., we select good portfolios pre-selected by the quantum computer), we see good solutions that reflect the population it was drawn from.

Final Results: September 16, 2020

The ideal portfolio of two stocks has not kept up with the markets. It has lost ~ 1% over the two months, or 48 trading days. This is 19% of the 1-year (253 trading days) of historical data. The Chicago Quantum Ratio, which is a formulation related to the Sharpe Ratio, has done the best over this trading period, with a return in excess of the S&P 500 and the 60 stock benchmark.

Market results for July 10 through September 16, showing the ideal CQNS portfolio results have dropped.
Market results for July 10 through September 16, showing the ideal CQNS portfolio results have dropped.

Disclosure: I/we have no positions in any stocks mentioned, except as part of mutual funds, and no plans to initiate any positions within the next 72 hours. I wrote this article myself, and it expresses my own opinions. I am not receiving compensation for it (other than from Medium). I have no business relationship with any company whose stock is mentioned in this article. This article reflects ongoing research and development activity, and is not investment advice. The portfolios are built on quantum annealing hardware by D-Wave Systems, which carries its own risks. Finally, Chicago Quantum is not an investment manager.

For more information on Chicago Quantum (SM), US Advanced Computing Infrastructure, Inc., please visit our website or contact us. Please see our arXiv article, here and our YouTube portfolio optimization playlist here.

Chicago Quantum @2020, US Advanced Computing Infrastructure, Inc., All Rights Reserved.

Image for post
Image for post
Chicago Quantum logo
Image for post
Image for post
Gulfstream G700 — The potential pay-off from a successful portfolio optimization algorithm.

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