# A Quantum Algorithm for Pricing Asian Options on Valuation Trees

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Problem and Algorithm

#### General Idea

## 3. Quantum Programming

#### 3.1. Qubits

#### 3.2. Quantum Circuits

#### 3.3. Measurement

#### 3.4. Arithmetics with Amplitudes

## 4. Quantum Algorithm

#### 4.1. Encoding the Paths

#### 4.2. Encoding the Probabilities

#### 4.3. Encoding the Payoff

#### 4.4. Encoding the Positive Part

#### 4.5. Concatenate Circuits and Resulting Computation

#### 4.6. Amplitude Estimation and Quantum Speed-Up

#### 4.7. Dividing the Circuit into Subcircuits to Reduce Depth

## 5. Results

#### Application to Binomial Model

## 6. Discussion

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Bernard, Carole, and Wenbo V. Li. 2013. Pricing and hedging of cliquet options and locally capped contracts. SIAM Journal on Financial Mathematics 4: 353–71. [Google Scholar] [CrossRef]
- Blank, Carsten, Daniel K. Park, and Francesco Petruccione. 2021. Quantum-enhanced analysis of discrete stochastic processes. NPJ Quantum Information 7: 1–9. [Google Scholar] [CrossRef]
- Brassard, Gilles, Peter Hoyer, Michele Mosca, and Alain Tapp. 2000. Quantum amplitude amplification and estimation. AMS Contemporary Mathematics Series 305: 53–68. [Google Scholar] [CrossRef][Green Version]
- Chakrabarti, Shouvanik, Rajiv Krishnakumar, Guglielmo Mazzola, Nikitas Stamatopoulos, Stefan Woerner, and William J. Zeng. 2021. A Threshold for Quantum Advantage in Derivative Pricing. Quantum 5: 463. [Google Scholar] [CrossRef]
- Cox, John C., Stephen A. Ross, and Mark Rubinstein. 1979. Option pricing: A simplified approach. Journal of Financial Economics 7: 229–63. [Google Scholar] [CrossRef]
- Egger, Daniel J., Jakub Mareček, and Stefan Woerner. 2021. Warm-starting quantum optimization. Quantum 5: 479. [Google Scholar] [CrossRef]
- Grover, Lov, and Terry Rudolph. 2002. Creating Superpositions that Correspond to Efficiently Integrable Probability Distributions. Available online: https://arxiv.org/abs/quant-ph/0208112 (accessed on 13 November 2022).
- Holmes, Adam, and Anne Y. Matsuura. 2020. Efficient quantum circuits for accurate state preparation of smooth, differentiable functions. Paper presented at the 2020 IEEE International Conference on Quantum Computing and Engineering (QCE), Denver, CO, USA, October 12–16; pp. 169–79. [Google Scholar] [CrossRef]
- Koppe, Jonas, and Mark-Oliver Wolf. 2022. An amplitude-based implementation of the unit step function on a quantum computer. arXiv arXiv:2206.03053. [Google Scholar] [CrossRef]
- Korn, Ralf, Elke Korn, and Gerald Kroisandt. 2010. Monte Carlo Methods and Models in Finance and Insurance. Boca Raton: CRC Press. [Google Scholar]
- Kubo, Kenji, Koichi Miyamoto, Kosuke Mitarai, and Keisuke Fujii. 2022. Pricing multi-asset derivatives by variational quantum algorithms. arXiv arXiv:2207.01277. [Google Scholar]
- Martin, Ana, Bruno Candelas, Ángel Rodríguez-Rozas, José D. Martín-Guerrero, Xi Chen, Lucas Lamata, Román Orús, Enrique Solano, and Mikel Sanz. 2021. Toward pricing financial derivatives with an ibm quantum computer. Physical Review Research 3: 013167. [Google Scholar] [CrossRef]
- Miyamoto, Koichi, and Kenji Kubo. 2021. Pricing multi-asset derivatives by finite difference method on a quantum computer. arXiv arXiv:2109.12896. [Google Scholar] [CrossRef]
- Montanaro, Ashley. 2015. Quantum speedup of monte carlo methods. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Science 471: 20150301. [Google Scholar] [CrossRef] [PubMed][Green Version]
- Möttönen, Mikko, Juha J. Vartiainen, Ville Bergholm, and Martti M. Salomaa. 2004. Quantum circuits for general multiqubit gates. Physical Review Letters 93: 130502. [Google Scholar] [CrossRef] [PubMed][Green Version]
- Pezzagna, Sébastien, and Jan Meijer. 2021. Quantum computer based on color centers in diamond. Applied Physics Reviews 8: 011308. [Google Scholar] [CrossRef]
- Plesch, Martin, and Časlav Brukner. 2011. Quantum-state preparation with universal gate decompositions. Physical Review A 83: 032302. [Google Scholar] [CrossRef][Green Version]
- Preskill, John. 2018. Quantum Computing in the NISQ era and beyond. Quantum 2: 79. [Google Scholar] [CrossRef]
- Rebentrost, Patrick, Brajesh Gupt, and Thomas R. Bromley. 2018. Quantum computational finance: Monte Carlo pricing of financial derivatives. Physical Review A 98: 022321. [Google Scholar] [CrossRef][Green Version]
- Rendleman, Richard J., and Brit J. Bartter. 1979. Two-state option pricing. The Journal of Finance 34: 1093–110. [Google Scholar] [CrossRef]
- Sajid, Anis, Abby Mitchell, Héctor Abraham, AduOffei, Rochisha Agarwal, Gabriele Agliardi, Merav Aharoni, Vishnu Ajith, and Ismail Yunus Akhalwaya. 2021. Qiskit: An open-source framework for quantum computing. [Google Scholar] [CrossRef]
- Shende, Vivek V., Stephen S. Bullock, and Igor L. Markov. 2006. Synthesis of quantum-logic circuits. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 25: 1000–10. [Google Scholar] [CrossRef][Green Version]
- Stamatopoulos, Nikitas, Daniel J. Egger, Yue Sun, Christa Zoufal, Raban Iten, Ning Shen, and Stefan Woerner. 2020. Option pricing using quantum computers. Quantum 4: 291. [Google Scholar] [CrossRef]
- Stamatopoulos, Nikitas, Guglielmo Mazzola, Stefan Woerner, and William J. Zeng. 2022. Towards quantum advantage in financial market risk using quantum gradient algorithms. Quantum 6: 770. [Google Scholar] [CrossRef]
- Vazquez, Almudena Carrera, and Stefan Woerner. 2021. Efficient state preparation for quantum amplitude estimation. Physical Review Applied 15: 034027. [Google Scholar] [CrossRef]
- Woerner, Stefan, and Daniel J. Egger. 2019. Quantum risk analysis. NPJ Quantum Information 5: 15. [Google Scholar] [CrossRef][Green Version]
- Zhang, Xiao-Ming, Man-Hong Yung, and Xiao Yuan. 2021. Low-depth quantum state preparation. Physical Review Research 3: 043200. [Google Scholar] [CrossRef]
- Zoufal, Christa, Aurélien Lucchi, and Stefan Woerner. 2019. Quantum generative adversarial networks for learning and loading random distributions. NPJ Quantum Information 5: 103. [Google Scholar] [CrossRef]

**Figure 1.**A visualization of the upcoming algorithm as a quantum circuit model. The horizontal lines represent the used qubits. The black circles show the function’s dependence on the respective qubits. (

**a**) The given valuation tree is mapped to a qubit register, encoding in the qubit states the asset’s path values ${x}_{k}$. The underlying’s path probabilities $f\left({x}_{k}\right)$ are associated with the qubit’s state probabilities. (

**b**) Depending on the path, the payoff $g\left({x}_{k}\right)$ and indicator function $q\left({x}_{k}\right)$ are implemented on different qubits. (

**c**) The functions are combined on a read-out qubit and finally measured.

**Figure 2.**Visualization of the quantum circuit implementing the operator ${\mathcal{F}}_{-}$ for calculating the difference of two functions ${f}_{a},{f}_{b}$ implemented by the operators ${\mathcal{F}}_{a},{\mathcal{F}}_{b}$. Note that both functions ${f}_{a},{f}_{b}$ may also depend on some state register ${|x\rangle}_{k}$ if needed. The last Hadamard application uncomputes the qubit ${|\xb7\rangle}_{a}$.

**Figure 3.**Representation of the quantum algorithm implementing the positive part of the value at maturity for $n=2$. As the ${\mathcal{R}}_{Y}$-gate only rotates about the Y-axis, we can illustrate the employed rotations by showing the relevant 2-dimensional Bloch sphere of the used qubit. The used rotations are shown above, and the corresponding values are shown below. In the last step, the employed gearbox circuit sets a qubit in state |1〉 for angles above $\pi /4$ and in state 0 for angles below $\pi /4$, ultimately implementing the needed function $q\left({x}_{k}\right)$ as shown in Equation (22).

**Figure 4.**A visual representation of the quantum circuit to price a floating-strike Asian option for $n=3$. For ${|\xb7\rangle}_{g}$ and ${|\xb7\rangle}_{q}$, the probability of measuring them in state |1〉, given the state register is in state $|{x}_{k}\rangle $, is shown at the right-hand side. We abbreviated the ancillary qubit registers needed for the circuit parts G and $G{b}_{{n}_{f}}^{D}$ with ${\mathrm{anc}}_{0}$ and ${\mathrm{anc}}_{1}$, respectively. Note that, as described in Equation (22), the $q\left({x}_{k}\right)$ is approximated.

**Figure 5.**Comparison of different approximation levels D and terms in the Fourier series ${n}_{f}$ when evaluating an Asian option on a quantum computer simulator for different paths of the underlying valuation tree. In (

**a**–

**c**), we compare the circuit result (blue) for ${10}^{7}$ executions to the analytical value (orange) we expect, and we try to approximate the option payoff (green). In (

**d**–

**f**), we present the respective absolute errors of the circuit and analytical results to the option payoff.

**Figure 6.**Histograms of quantum simulator results for full pricing algorithm with state register in uniform superposition, i.e., simultaneous computation of all paths for $n=5$ time steps, gearbox approximation levels D and terms in the Fourier expansion ${n}_{f}$: (

**a**) $D=1,{n}_{f}=4$, (

**b**) $D=2,{n}_{f}=5$, and (

**c**) $D=2,{n}_{f}=8$. 100 circuit results are presented, where each result consists of ${10}^{6}$ circuit executions.

**Table 1.**Required $cX$-gate counts and circuit width (number of used qubits) for a single subcircuit and number of subcircuits used in the presented algorithm with parameters (a) $D=1,{n}_{f}=4$, (b) $D=2,{n}_{f}=5$ and (c) $D=2,{n}_{f}=8$, for a varying number of time steps n.

Parameters | n | Number of Subcircuits | |||||
---|---|---|---|---|---|---|---|

2 | 3 | 4 | 5 | 6 | |||

(a) | $cX$ | 67 | 141 | 243 | 473 | 847 | 8 |

Width | 13 | 15 | 16 | 18 | 19 | ||

(b) | $cX$ | 89 | 187 | 337 | 663 | 1229 | 10 |

Width | 17 | 19 | 20 | 22 | 23 | ||

(c) | $cX$ | 89 | 187 | 337 | 663 | 1229 | 16 |

Width | 17 | 19 | 20 | 22 | 23 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Wolf, M.-O.; Horsky, R.; Koppe, J.
A Quantum Algorithm for Pricing Asian Options on Valuation Trees. *Risks* **2022**, *10*, 221.
https://doi.org/10.3390/risks10120221

**AMA Style**

Wolf M-O, Horsky R, Koppe J.
A Quantum Algorithm for Pricing Asian Options on Valuation Trees. *Risks*. 2022; 10(12):221.
https://doi.org/10.3390/risks10120221

**Chicago/Turabian Style**

Wolf, Mark-Oliver, Roman Horsky, and Jonas Koppe.
2022. "A Quantum Algorithm for Pricing Asian Options on Valuation Trees" *Risks* 10, no. 12: 221.
https://doi.org/10.3390/risks10120221