• Finance

JPMorgan: Quantum Portfolio Optimization with QAOA

JPMorgan Chase

JPMorgan's quantum computing research team applied the Quantum Approximate Optimization Algorithm (QAOA) to portfolio selection problems, benchmarking it against classical methods on current NISQ hardware.

Key Outcome
QAOA matched classical solution quality on small instances (up to 60 assets). Identified that quantum advantage in finance requires error-corrected hardware. Published multiple peer-reviewed papers establishing methodology for finance use cases.

The Problem

Portfolio optimization is a classic combinatorial problem: given N candidate assets, select K to maximize expected return for a given risk tolerance. With N=60 and K=20, there are over 4 trillion possible portfolios. Classical methods (mean-variance optimization, integer programming) handle this well, but the problem scales hard.

The quantum question is whether QAOA - a variational quantum algorithm designed for combinatorial optimization - can find better solutions faster as hardware improves.

QAOA Formulation

JPMorgan formulated portfolio selection as a QUBO problem. Each binary variable x_i = 1 means asset i is in the portfolio.

The objective: maximize expected return minus risk penalty, subject to selecting exactly K assets.

from qiskit import QuantumCircuit
from qiskit.circuit import Parameter
from qiskit_aer import AerSimulator
import numpy as np

# QAOA parameters
n_assets = 10   # number of candidate assets
n_select = 3    # portfolio size
p_layers = 2    # QAOA depth

# Build QAOA circuit
def qaoa_circuit(gamma, beta, cost_terms, mixer_terms):
    n = n_assets
    qc = QuantumCircuit(n, n)

    # Initial state: equal superposition
    qc.h(range(n))

    for layer in range(p_layers):
        # Cost unitary
        for (i, j, weight) in cost_terms:
            qc.rzz(2 * gamma[layer] * weight, i, j)
        for (i, weight) in [(i, 1.0) for i in range(n)]:
            qc.rz(2 * gamma[layer] * weight, i)

        # Mixer unitary
        for i in range(n):
            qc.rx(2 * beta[layer], i)

    qc.measure(range(n), range(n))
    return qc

# Run with classical optimizer (COBYLA)
from scipy.optimize import minimize

def objective(params):
    gamma = params[:p_layers]
    beta = params[p_layers:]
    qc = qaoa_circuit(gamma, beta, cost_terms, mixer_terms)
    sim = AerSimulator()
    result = sim.run(qc, shots=1000).result()
    counts = result.get_counts()
    # Evaluate expected cost
    return expected_cost(counts, portfolio_returns, risk_matrix)

result = minimize(objective, x0=np.random.rand(2*p_layers), method='COBYLA')

Portfolio Constraints as Penalties

The key challenge: QAOA naturally handles unconstrained optimization. Portfolio selection has a hard constraint (select exactly K assets). JPMorgan encoded this as a penalty term added to the objective:

Penalty = lambda * (sum(x_i) - K)^2

Choosing lambda large enough forces the constraint but increases the problem’s energy landscape complexity, making QAOA harder to optimize.

Results

JPMorgan tested QAOA on instances with 7-60 assets using IBM quantum hardware and simulators. Key findings:

  • For small instances (7-10 assets), QAOA with p=3 layers matched or approached the classical optimum
  • On noisy hardware, error mitigation was necessary for meaningful results
  • As N grew, QAOA required exponentially more circuit depth to maintain solution quality
  • Classical solvers (Gurobi) solved the same instances in milliseconds

The conclusion: QAOA does not yet offer practical advantage for portfolio optimization. But the methodology is established, and the team identified what hardware improvements would change the picture.

What Quantum Finance Needs

JPMorgan’s research identified three thresholds for practical quantum advantage in portfolio optimization:

  1. Error correction: Logical qubits to eliminate noise
  2. Gate depth: QAOA needs p=10-20 layers to beat classical methods on large instances
  3. Qubit connectivity: Full connectivity between all asset qubits (hard with current hardware topology)

Current estimates put practical advantage at 5-10+ years out, contingent on fault-tolerant hardware.

Other JPMorgan Quantum Research

JPMorgan has published on several other quantum finance applications:

  • Monte Carlo speedup: Quantum amplitude estimation gives a quadratic speedup for option pricing integrals
  • Machine learning: Quantum kernel methods for credit risk classification
  • Fraud detection: Quantum support vector machines tested on transaction data

The Monte Carlo application is considered closer to practical advantage than combinatorial optimization, because it requires fewer qubits and shallower circuits.

Framework

All JPMorgan quantum research uses Qiskit. Their papers are available on arXiv under the JPMorgan Chase quantum computing group.

Learn more: Qiskit Reference