29
Applications of Quantum Annealing in Computational Finance Dr. Phil Goddard Head of Research, 1QBit D-Wave User Conference, Santa Fe, Sept. 2016

Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

  • Upload
    others

  • View
    4

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Applications of Quantum Annealing in Computational FinanceDr. Phil GoddardHead of Research, 1QBitD-Wave User Conference, Santa Fe, Sept. 2016

Page 2: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

• Where’s my Babel Fish?

• Quantum-Ready Applications for Computational Finance

• Tools and Resources

2

Outline

Page 3: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Where’s my Babel Fish?

Page 4: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Where’s my Babel Fish?

• k-Coloring • Connected Dominating Set• Job Shop Scheduling

• Graph Similarity• Graph Partitioning

4

• Portfolio Optimization

• Asset Allocation• Risk Management

• Option Pricing

1

1

2

2 3

3 2

31

Job 1Job 2Job 3

1 1

2 2

33

2

3

1

0 1 2 3 4 5 6time

0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3-0.2

0

0.2

0.4

0.6

0.8

1

1.2Mean-Variance-Efficient Frontier

Risk (Standard Deviation)

Expe

cted

Ret

urn

Page 5: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Is that a QUBO?

5

𝑥 ∈ 0,1 &

𝑄 ∈ ℝ&×&

min-

𝑥.𝑄𝑥

𝑥 ∈ ℝ&𝑄 ∈ ℝ&×&

Weightofassetsinportfolio

Covariancematrix

Page 6: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Quantum-Ready Applicationsfor Computational Finance

Page 7: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

• A Multi-Period Optimal Trading Strategy

• Quantum-Ready Hierarchical Risk Parity (QHRP)

• Real-Time Optimization Framework

• Tax Loss Harvesting

7

Applications for Computational Finance

Page 8: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Optimal Trading Trajectories

8

Page 9: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

• The optimal trading trajectory problem

• The mathematical formulation

• Considerations in using the quantum annealer

• Experimental Results

9

A Multi-Period Optimal Trading Strategy

Page 10: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

The Optimal Trading Trajectory Problem

• Managers of large portfolios typically need to optimize their portfolios over a multiple period horizon.

• A sequence of single-period optimal positons is rarely multi-period optimal.

• Rebalancing the portfolio to align with each single period optimal weight is typically prohibitively expensive.

10

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 2 4 6 8 10 12

OptimalWeight

TimeofRebalance

Single-periodOptimalWeight --- Multi-periodOptimalWeight

Page 11: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Practical Considerations

11

• Friction: Transaction costs prevent portfolio managers from monetizing much of their forecasting power

• Market Impact: The sale or purchase of large blocks of a given asset may result in temporary and/or permanent price movements

• Constraints: Some positions can only be traded in blocks (e.g. real-estate, private offerings, fixed lot sizes,…), thus requiring integer solutions

2 4 6 8 10 12 14-0.04

-0.02

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14Efficient Frontier

Risk

Retu

rn

Basic ConstraintsTrading Constraints

Page 12: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Mathematical Formulation• The multi-period integer optimization problem may be written as

• To solve, the problem must be converted to standard QUBO form:

12

𝑤 = argmax5 6 𝜇8.𝑤89:;<9=>

−𝛾2𝑤8

.Σ8𝑤89C>D

− Δ𝑤8.Λ8Δ𝑤8GC9:H;HJ>;>,;:KL.CKLNH;

− Δ𝑤8.Λ8O Δ𝑤8L:9K.CKLNH;

.

8PQ

s.t.:

∀𝑡:6𝑤U,8 ≤ 𝐾&

UPQ

; ∀𝑡, ∀𝑛:𝑤U,8 ≤ 𝐾O

mean-varianceportfolio optimization

transactioncostandmarketimpacts

min-𝑥.𝑄𝑥

𝑥 ∈ 0,1 &, 𝑄 ∈ ℝ&×&

Page 13: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Bit Encoding• The integer variables of the optimization problem 𝑤Z must be recast to the binary variables used by the

annealer 𝑥Z .

13

Page 14: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Experimental Procedure and Results• Generate a random problem: number of assets; time horizon; and total investable assets

• Solve using quantum annealer

• Find exact minimum solution using an exhaustive search

• Evaluate performance by how far the quantum solution is from the exact solution

14

• The annealer solution is typically within a small and acceptable margin of error of the exact globally minimal solution.

Page 15: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Quantum-Ready Hierarchical Risk Parity

Page 16: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Quantum-Ready Hierarchical Risk Parity

16

Page 17: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

The Approach

• Use tree structure to reduce connections between assets as well as estimation error

• Instead of minimizing variance via all correlations using all assets at once, solve the minimum variance problem at each node of the tree

• Build the final weight vector by recursively minimizing variance from the bottom of the tree to the top

• Ignore correlations in determining weights, use only in calculating variance of sub-trees

• Effect: Improve out-of-sample realized volatility

• Can also be applied to linear regression

17

𝒘∗ = argmin𝒘

𝒘.�̂�𝒘 𝑠. 𝑡.6𝑤Z = 1�

Z

𝒘𝟐,𝟏∗ = argmin

𝒘𝒘.Σc,Qd 𝒘 𝒘𝟐,𝟐

∗ = argmin𝒘

𝒘.Σc,cd 𝒘

𝒘𝟏,𝟏∗ = argmin

𝒘𝒘.ΣQ,Qd 𝒘

Classical

QHRP

Page 18: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

(Out-of-Sample) Minimum Risk Portfolios

18

• Classical algorithm minimizes in-sample risk, but sometimes missed the point

• In this example, it invests over 50% of the portfolio in just McDonalds, Coca-Cola and Johnson & Johnson

• QHRP provides more diversification

Page 19: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Risk Improvement in SimulationsOut-of-sample volatility is reduced by 20% in simulated examples using 10 assets with 10% volatility each, random shocks, random correlations.

20 %

19

Page 20: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Real-Time Optimization Framework

Page 21: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Real-Time Optimization Framework

21

• Stream Analytics

• Real-Time data signals• Quantum powered analytics

Stock Market

1QBit SDKD-Wave 2X Processor

Post Processing

Trading Signals

GOOG

AAPL

MSFT

SBUX

TSLA

CorrelationGraph

Generator

Time

Page 22: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Real-Time Optimization Framework

22

• Stream Analytics

• Real-Time data signals• Quantum powered analytics

Stock Market

1QBit SDKD-Wave 2X Processor

Post Processing

Trading Signals

GOOG

AAPL

MSFT

SBUX

TSLA

CorrelationGraph

Generator

Time

Page 23: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Real-Time Optimization Framework

23

• Stream Analytics

• Real-Time data signals• Quantum powered analytics

Stock Market

1QBit SDKD-Wave 2X Processor

Post Processing

Trading Signals

GOOG

AAPL

MSFT

SBUX

TSLA

CorrelationGraph

Generator

Time

Page 24: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Tax Loss Harvesting

Page 25: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Tax Loss Harvesting

• Track an index using a subset of the components of the index while selling losses and moving into unowned components

• Integer Quadratic Programming: sell quantities from owned lots; buy new lots (avoiding wash sales)

• Offset gains and income; carry losses forward; create a tax buffer

• Quantum annealer used to find the optimal share quantities to buy and sell to generate the greatest tax benefit while staying within a specified tracking error.

25

Page 26: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Tools and Resources

Page 27: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Tools

1QBit’squantum-readySoftwareDevelopmentKit:Explore: 1qbit.comRegister for Beta Release: qdk.1qbit.com

27

Page 28: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Resources: www.quantumforquants.org

28

Page 29: Applications of Quantum Annealing in Computational Finance · 2019-12-20 · Computational Finance Dr. Phil Goddard Head of Research, 1QBit D -Wave User Conference, Santa Fe, Sept

Phil [email protected]

©20161QBInformationTechnologies.Allrightsreserved.