Monday, August 24, 2009

Putting DWave's 'Orion' to the Test - (Part 1)

I have been steadfastly tracking DWave Systems's progress for approximately two years now, and I was immensely overjoyed when I discovered that they had opened-up the initial trials of their operating system (called Orion) to the general public.

As you probably know (by now), I am always on the hunt for technologies that have the potential to enhance the quantitative aspects of portfolio structuring decisions, and I was thoroughly ecstatic when I found-out that Orion has a facility for portfolio optimization.

Generally, quantitative portfolio structuring decisions, like most optimization problems, are amenable to quantum acceleration, and thus, DWave's operating system should be able to tackle them (this assertion is underpinned by the assumption that Orion is, in its current form robust).

Yesterday, I decided to put DWave's Orion operating system to the test, and to chronicle every minute thing I did in this, and subsequent blog posts.

I started my journey by visiting DWave's Menu of problem types to select the best algorithm to solve portfolio optimization problems. On the menu the choices included:
  • A Binary Quadratic Program (BQP) problem algorithm;
  • An Ising problem algorithm;
  • A Chimera (BQP) problem algorithm;
  • A Chimera (Ising) problem algorithm;
  • A Maximum Satisfiability (MAX-SAT) problem algorithm;
  • A Cardinality SAT problem algorithm;
  • A Weighted Maximum Satisfiability (Weighted MAX-SAT) problem algorithm;
  • A Model Expansion (MX) problem algorithm;
  • A Maximum Independent Set (MIS) problem algorithm, and;
  • A Clique (CLQ) problem algorithm.
I noticed that both the Binary Quadratic Program (BQP) problem algorithm and the Chimera (BQP) problem algorithm resembled the general form of Harry Markowitz's portfolio optimization formula.

Therefore, since I desired simplicity, I decided to settle for the Binary Quadratic Program (BQP) problem algorithm which was in the following form:


Interestingly, this particular problem is an unconstrained binary quadratic programming problem of minimizing a quadratic objective by suitable choice of binary (zero-one) variables.

When expressed in mean-variance portfolio optimization parlance, the binary quadratic programming problem assumes the following form (the equations are from a paper entitled Heuristics For Cardinality Constrained Portfolio Optimization by T.J. Chang, N. Meade, J.E. Beasley and Y.M. Sharaiha):

We'll call this new expression equation 1, which is subject to equation 2, 3 and 4 which follow respectively:


Equation 1
minimizes the total variance (risk) associated with the portfolio whilst Equation 2 ensures that the portfolio has an expected return of R*. Equation 3 ensures that the proportions add to one.

Where:


N is the number of assets available,
μi is the expected return of asset i (i = 1, 2, ...... N),
σij is the covariance between assets i and j (i = 1, 2, ...... N),
R* is the desired expected return.

Then the decision variables are:
wi is the proportion held of asset i (i = 1, 2, ...... N), and is greater than or equal to zero but less than or equal to one.

Stay tuned for the second part of this installation, where I'll convert the optimization problem into a binary quadratic problem, and plug in variables to generate a problem matrix for DWave's Orion to solve.