QUANTUM PORTFOLIO LAB

Portfolio selection as a QUBO, solved by annealing · experiment run 2026-08-09
QUANTUM-INSPIRED · SIMULATED ANNEALING
What is this? A demo that reformulates a classic Markowitz "pick the best basket of stocks" problem in the exact mathematical form a D-Wave quantum annealer solves — then solves it and checks the answer against the provable optimum. This run used D-Wave's Ocean simulated-annealing sampler locally (quantum-inspired); a run on real Leap quantum hardware is pending account setup.

The experiment in plain English

We took the 36 stocks tracked across this dashboard's portfolios — the quantum names (IONQ, RGTI, QBTS, QUBT, ARQQ, LAES) plus the DC-infrastructure and robotics holdings — pulled 6 months of daily closes (2026-02-09 → 2026-08-07, 124 trading days), and asked: which 3 stocks, held in equal weights, give the best expected return for the least risk?

A QUBO (Quadratic Unconstrained Binary Optimization) encodes a problem as a set of 0/1 yes-no switches with pairwise costs, which is the native input format of a quantum annealer. Here each stock gets one switch ("in the portfolio or not"), returns lower the energy, co-movement between pairs raises it, and a penalty term enforces "exactly 3 picks" — so the lowest-energy state is the best portfolio.

The Answer — Optimal 3-Stock Basket
AMD
Advanced Micro Devices · DC Infra
mean daily ret +0.762%
annualized vol 75.8%
DE
Deere & Co · Robotics
mean daily ret +0.077%
annualized vol 35.9%
PTC
PTC Inc · Robotics
mean daily ret −0.031%
annualized vol 40.0%
+67.8%
Expected annual return*
29.7%
Annual volatility
2.28
Naïve Sharpe
MATCH ✓
vs brute-force optimum

Why this basket is interesting

The annealer didn't just grab the three hottest stocks. MRVL and MU had the highest raw returns (~+0.85–0.97%/day) but are violently volatile and move together with the rest of the AI-semi complex. Instead the optimizer paired one high-return engine (AMD) with two low-volatility stabilizers (DE, PTC) whose day-to-day moves barely correlate with it. PTC even has a slightly negative 6-month mean return — it earns its slot purely by cancelling out risk. That's mean-variance optimization working as intended: covariance matters as much as return.

Verification: because 36-choose-3 is only 7,140 combinations, we also checked every possible basket by brute force. The annealer's answer matched the exact global optimum.

Solver details

Solver
dwave-samplers SimulatedAnnealingSampler (Ocean SDK) — quantum-inspired, local
Hardware run
pending — D-Wave Leap account signup blocked in this environment; will re-run on LeapHybridCQMSampler
Problem size
36 binary variables · 630 quadratic couplings · cardinality K=3 via penalty
Objective
max μTx/K − q·xTΣx/K², q = 5 (risk aversion)
Anneal
4,000 reads × 5,000 sweeps, β 0.1 → 2×10⁶ · 24.9 s wall time
Feasible reads
4,000 / 4,000 satisfied the exactly-3 constraint
Brute force
7,140 combinations in 0.05 s — same answer
Data
yfinance daily closes, 2026-02-09 → 2026-08-07 · cost: $0.00
Full Universe — 6-Month Stats (highlighted = selected)
TickerSectorMean Daily RetAnn. Vol
MRVLDC Infra+0.968%96.7%
MUDC Infra+0.849%96.2%
AMDDC Infra+0.762%75.8%PICKED
COHRDC Infra+0.533%93.9%
AMATRobotics+0.494%70.5%
ARQQQuantum+0.464%125.7%
CGNXRobotics+0.430%69.3%
IONQQuantum+0.364%98.2%
LRCXDC Infra+0.353%73.3%
VRTDC Infra+0.352%75.3%
GLWDC Infra+0.340%87.5%
TERRobotics+0.315%87.2%
ANETDC Infra+0.302%59.7%
GEVDC Infra+0.228%53.8%
AVGODC Infra+0.224%47.7%
ASMLDC Infra+0.218%52.8%
RGTIQuantum+0.213%101.9%
QBTSQuantum+0.210%110.5%
MPWRDC Infra+0.200%62.0%
ETNDC Infra+0.186%44.5%
APHDC Infra+0.174%46.2%
NVDADC Infra+0.163%38.6%
QUBTQuantum+0.138%91.2%
ABBNYRobotics+0.135%37.1%
ROKRobotics+0.089%36.5%
DERobotics+0.077%35.9%PICKED
TDYRobotics+0.055%26.3%
EMRRobotics+0.023%36.1%
FANUYRobotics+0.022%55.7%
HONRobotics+0.009%29.9%
SNPSRobotics−0.008%42.3%
PTCRobotics−0.031%40.0%PICKED
LMTRobotics−0.039%30.3%
AVAVRobotics−0.177%82.6%
ISRGRobotics−0.180%39.9%
LAESQuantum−0.205%85.9%

Why none of the quantum stocks made the cut

Slightly awkward for a quantum-computing demo: the optimizer looked at the quantum-sector tickers and passed. ARQQ has strong 6-month returns (+0.46%/day) but 126% annualized volatility — the risk penalty at q = 5 prices that out. The quantum names also correlate heavily with each other, so they can't hedge one another. Lower the risk aversion and they start appearing; that's the knob to play with in the next run.

Honest caveats (read before taking any of this seriously)

Toy scale. 36 assets choose-3 has 7,140 combinations — a laptop brute-forces it in 50 ms. Annealers only get interesting when the combinatorics explode (hundreds of assets, lot-size and turnover constraints), where exhaustive search dies. This demo proves the pipeline, not a quantum advantage.

Simulated, not quantum (yet). This run used classical simulated annealing from D-Wave's Ocean SDK — the same QUBO would submit unchanged to real Leap hardware once the account exists.

*Expected return is extrapolated history. "+67.8% annual" just annualizes an unusually hot 6-month window for AI-adjacent stocks. Past returns are not a forecast. Equal weights, no transaction costs, no shorting, single period.

Not investment advice. Research demo for the dashboard. Nobody should trade on this.

⚠️ Experimental research page — quantum-inspired optimization demo. Historical statistics only; not a recommendation to buy or sell any security. Source data & solver artifacts: quantum-lab/results.json.