Simulating the non-Hermitian dynamics of financial option pricing with quantum computers
Swagat Kumar
Colin Michael Wilmott
[
[
Abstract
The Schrödinger equation describes how quantum states evolve according to the Hamiltonian of the system. For physical systems, we have it that the Hamiltonian must be a Hermitian operator to ensure unitary dynamics. For anti-Hermitian Hamiltonians, the Schrödinger equation instead models the evolution of quantum states in imaginary time. This process of imaginary time evolution has been used successfully to calculate the ground state of a quantum system. Although imaginary time evolution is non-unitary, the normalised dynamics of this evolution can be simulated on a quantum computer using the quantum imaginary time evolution (QITE) algorithm. In this paper, we broaden the scope of QITE by removing its restriction to anti-Hermitian Hamiltonians, which allows us to solve any partial differential equation (PDE) that is equivalent to the Schrödinger equation with an arbitrary, non-Hermitian Hamiltonian. An example of such a PDE is the famous Black-Scholes equation that models the price of financial derivatives. We will demonstrate how our generalised QITE methodology offers a feasible approach for real-world applications by using it to price various European option contracts modelled according to the Black-Scholes equation.
keywords:
quantum computing, quantum simulation, imaginary time evolution, Black-Scholes equation
A financial derivative is an options contract whose value derives from an underlying financial asset [1]. An options contract defines an agreement between two parties that entails a right to trade an asset at some specified future date for a fixed price. This right to trade agreement thus creates inherent value, which may in turn be traded in the same manner as the underlying financial asset. Consequently, a financial derivative may be viewed as an instrument, which can be used to either exploit arbitrage opportunities or mitigate risk exposure in the market. For this reason, a fundamental task in quantitative finance is how exactly do we determine the fair price of a financial derivative. Determining the fair price of an option is a highly non-trivial task, which is due in part to the stochastic nature of the parameters that define a derivative.
The famous Black–Scholes model [2, 1] is an effective method for determining the fair price of a derivative, and has become the standard for pricing European style financial options. Given the payoff price for an option at the maturity time, we can determine the present price of the option by solving the linear differential equation
(1)
for , where the condition denotes the payoff of the option. The price of the option is denoted by , while
denotes the value of the underlying asset, represents time, and is the maturity time. For simplicity, it is assumed that the volatility of the asset, , and the risk-free interest rate, , are constant with respect to time. For convenience, adopting transforms the Black-Scholes equation Eq. (1) to the initial value problem
(2)
for with the initial condition . To numerically solve the Black-Scholes equation, we must discretise the domain to a finite domain and assign appropriate boundary conditions.
The Schrödinger equation models the evolution of the wave function of a quantum mechanical system, and takes the form
(3)
where the Hamiltonian, , is a linear differential operator in acting on the wave function . Solutions to the Schrödinger equation are expressed in terms of the time evolution operator,
(4)
The Black-Scholes equation, Eq. (2), can also be expressed in the form of the Schrödinger equation, where its Hamiltonian is given by
(5)
Note that while the Hamiltonian of the Schrödinger equation is a Hermitian operator, which gives rise to unitary time evolution, the Black-Scholes Hamiltonian, Eq. (5), is non-Hermitian, and induces non-unitary time evolution.
However, since quantum computers evolve under unitary time evolution, it is the case that simulating non-Hermitian dynamics is not directly feasible on a quantum computer. It is for this reason that quantum computing approaches for solving the Black-Scholes equation have thus far been based on variational algorithms [3, 4, 5] or require post-selection techniques [6].
Another example of non-Hermitian dynamics can be seen in the imaginary time evolution of a quantum system.
Following a Wick rotation, which replaces time with an imaginary number , the Schrödinger equation drives wave functions to become parallel to the ground state of the system.
The Wick-rotated form of the Schrödinger equation also takes the form of Eq. (3), but with an anti-Hermitian Hamiltonian. Although the imaginary time Schrödinger equation induces non-unitary dynamics,
the normalised evolution can be simulated with quantum algorithms, including quantum imaginary time evolution (QITE) [7] and variational QITE [8].
Variational QITE (varQITE) is a hybrid quantum-classical algorithm that is well suited for noisy intermediate-scale quantum (NISQ) devices.
As a variational quantum algorithm, varQITE considers a system of differential equations linking to the gradients of ansatz parameters in imaginary time, and coefficients that depend on measurements of the ansatz. Variational QITE employs a fixed ansatz, where the time complexity is linear in the number of Hamiltonian terms. However, the choice of ansatz is crucial, as it is possible that the states produced by the true imaginary time evolution may not be generated by the particular parameterised ansatz circuit.
On the other hand, the simulated QITE approach is an alternative technique for simulating imaginary time evolution [7]. The technique works by approximating the normalised time evolution operator with Trotter products via unitaries. Simulated QITE with sufficiently large unitary domains is not plagued by barren plateaus, as is the case with its variational counterpart. Simulated QITE on a -local Hamiltonian requires a number of measurements that is exponential in , with the depth of the associated quantum circuits scaling accordingly. Interestingly, however, recent work has focused on optimising the circuit depth and the number of measurements required in simulated QITE. For instance, Fast QITE provides for an exponential reduction in the circuit depth of each unitary and also reduces the number of measurements required per time step, leading to a quadratic speedup over QITE [9]. A time dependent drifted QITE introduces the concept of randomised compiling, which reduces the unitary circuit depth to be a constant and also reduces the number of measurements needed [10]. We also have an implementation of QITE using nonlocal approximation, which reduces circuit depth and is NISQ-friendly [11].
Figure 1: Black-Scholes option pricing simulations using QNUTE.
The figure compares the Black-Scholes option prices calculated using QNUTE with varying number of qubits to the corresponding analytical solutions for the following European option types:
(a) Call (b) Put (c) Bull Spread (d) Bear Spread (e) Straddle (f) Strangle.
The vertical dashed lines at and correspond to the strike prices of the option contracts.
We simulated the solutions for the asset prices , with the maturity time years, simulated over time steps. Our simulations used a risk-free interest rate of , and the volatility . The unitaries used to approximate the evolution act on all of the qubits used in the simulation.
Although imaginary time evolution was originally envisioned as a technique for determining the ground state of a Hamiltonian [8, 7], the methodology has been recently used as an approach for solving partial differential equations (PDEs), primarily based on varQITE [12, 13, 5, 3, 14].
However, a simulated QITE approach for solving linear PDEs was recently considered [15], although it is restricted to anti-Hermitian Hamiltonians involving only even-ordered derivatives. This application tracks how the non-unitary time evolution scales the quantum state over time. The approach was used to generate solutions to the isotropic heat equation by combining the scale information with the normalised states obtained from QITE.
In this paper, we further widen the scope of simulated QITE by broadening the methodology to simulations involving arbitrary non-Hermitian dynamics. By removing simulated QITE’s underlying restriction to anti-Hermitian Hamiltonians, we enhance the capabilities of the methodology with an ability to simulate arbitrary linear PDEs involving non-unitary time evolution. We have called this generalisation of simulated QITE to arbitrary Hamiltonians quantum non-unitary time evolution (QNUTE).
Results
Quantum Non-Unitary Time Evolution
QNUTE is a quantum algorithm that simulates the dynamics of the Schrödinger equation with an arbitrary non-Hermitian Hamiltonian . The non-unitary time evolution operator generated by is approximated by its first order Trotter product, and takes the form
(6)
where [16, 17].
The normalised actions of each Trotter step acting on a state are approximated with unitaries of the form , and implemented with Trotter products of the form
(7)
In Eq. (7), is a Hermitian operator with denoting
Hermitian operators chosen such that each unitary is efficiently implemented with a quantum circuit parameterised by .
The real-valued coefficients are determined by minimising the expression
(8)
up to , which involves solving a system of linear equations, , constructed using various measurements on . In particular, we have
(9)
see Supplementary Information for further details on the construction.
Simulating each Trotter step involves taking measurements to construct the matrix equation and generates a quantum circuit of depth . The full simulation therefore requires measurements.
The states generated by QNUTE are determined by the choice of . For example, choosing to encompass all Pauli strings allows us to capture arbitrary state vector rotations in the state space, whereas restricting to Pauli strings involving an odd number of gates significantly reduces the operator decomposition count and allows us to capture those rotations that do not introduce complex phases to the quantum state.
Given a choice of , the accuracy of the QNUTE implementation is dependent on the support of .
Ideally, the support of should cover adjacent qubits surrounding the support of , where the correlation length denotes the maximum distance between interacting qubits in the Hamiltonian. However, our choice to express has been in terms of Pauli strings, which gives rise to an exponential dependence on , . For this reason, we have considered an inexact implementation of QNUTE that uses a constant domain size .
We will demonstrate that QNUTE can be used to approximate solutions to arbitrary linear PDEs with solutions stored in the qubit state vector. Information relevant to the solution is extracted by taking measurements on the final quantum state. It is expected that the number of distinct measurements required to extract the relevant information should scale polynomially with the number of qubits.
Further, if it is known that the solution to a PDE will be real-valued and non-negative, then the normalised solution calculated by QNUTE can be extracted obtained by taking the square root of the probability distribution of computational basis states. We will use QNUTE to simulate the Black-Scholes equation, as it has a non-Hermitian Hamiltonian and has non-negative real-valued solutions.
Figure 2: Average fidelities of inexact QNUTE implementations. The figure shows the fidelities of different implementations of inexact QNUTE used to simulate Black-Scholes dynamics averaged over each time step, with the error bars depicting the standard deviation. These simulations share the same parameters values for and as with the simulations shown in Fig. 1.
denotes the number of qubits used to store the function samples, and denotes the maximum number of adjacent qubits targeted by the unitaries.
The overall low fidelities shown the by inexact QNUTE, where , indicate that the Black-Scholes Hamiltonian with linear boundary conditions has a high correlation length, making it difficult to accurately reproduce its evolution with small unitaries.
Simulating Black-Scholes with QNUTE
To model the dynamics of the Black-Scholes equation, we discretise the domain into points equally spaced by a distance of . The normalised samples of the option price are stored in an -qubit quantum state given by
(10)
where . Following Eq. (5), the discretised Black-Scholes Hamiltonian can be represented in terms of a central finite difference matrix of the form
(11)
where
(12)
Refer to Supplementary Information for the representation of the discretised Hamiltonian of Eq. (11) in the Pauli operator basis.
Norm correction
The scale factor given in Eq. (9) approximates how the Trotter step scales
up to .
These approximations can be stored and multiplied to provide an approximation of how the state vector scales over the course of the evolution. Excluding the scenario of the ideal implementation of QNUTE that records a perfect fidelity, errors associated to each scale factor will compound over multiple Trotter steps, which must be corrected periodically.
For an anti-Hermitian Hamiltonian , it was shown that the correction factor can be calculated using knowledge of the non-degenerate ground state of and its corresponding eigenvalue [15]. This correction strategy necessarily exploits the mutual orthogonality of the eigenstates of the associated Hamiltonian.
However, since the discretised Black-Scholes Hamiltonian as given in Eq. (11) is not a normal operator, its eigenvectors are not guaranteed to be mutually orthogonal. This, therefore, rules out the norm correction strategy pursued in Ref. [15]. Interestingly, variational QITE has been employed as a technique for solving the Black-Scholes equation. Under this setting, the normalisation factor was considered either as a variational parameter [5] or was determined with prior knowledge of how, specifically, call option prices evolve at the boundary [3]. Since the former is not compatible with QNUTE, we generalise the latter approach to cater to various European option types.
Table 1: Average fidelity data for the QNUTE simulations for pricing various European option types. denotes the mean fidelity over each time step and the standard deviation. Simulations involving represent inexact QNUTE implementations.
Call
Put
2
2
1.000
2.67
1.000
4.54
3
2
0.994
4.77
0.982
1.20
4
1.000
3.26
1.000
3.06
4
2
0.710
2.78
0.904
8.02
4
1.000
3.16
1.000
2.79
5
2
0.158
2.11
0.749
6.79
4
0.111
1.79
0.655
1.70
6
1.000
4.15
1.000
2.10
6
2
0.130
7.27
0.724
4.18
4
0.122
7.32
0.766
5.20
6
1.000
3.81
1.000
2.18
Bull
Bear
2
2
1.000
2.67
1.000
4.54
3
2
0.994
4.77
0.982
1.20
4
1.000
3.26
1.000
3.06
4
2
0.710
2.78
0.904
8.02
4
1.000
3.16
1.000
2.79
5
2
0.158
2.11
0.749
6.79
4
0.111
1.79
0.655
1.70
6
1.000
4.15
1.000
2.10
6
2
0.130
7.27
0.724
4.18
4
0.122
7.32
0.766
5.20
6
1.000
3.81
1.000
2.18
Straddle
Strangle
2
2
1.000
2.67
1.000
4.54
3
2
0.994
4.77
0.982
1.20
4
1.000
3.26
1.000
3.06
4
2
0.710
2.78
0.904
8.02
4
1.000
3.16
1.000
2.79
5
2
0.158
2.11
0.749
6.79
4
0.111
1.79
0.655
1.70
6
1.000
4.15
1.000
2.10
6
2
0.130
7.27
0.724
4.18
4
0.122
7.32
0.766
5.20
6
1.000
3.81
1.000
2.18
Consider the Black-Scholes equation, as given in Eq. (5),
with option price
assumed to be linear in in the neighbourhood of the boundaries and .
We will consider linear boundary conditions, since they are widely used in classical option pricing simulations and are known to be numerically stable [18].
Thus, under linear boundary conditions, the option price takes the form near the boundaries. Substituting this form into Eq. (5) reduces the Black-Scholes equation to an ordinary differential equation (ODE) at the boundaries
(13)
Solving Eq. (13) yields and , where , and can be derived from the initial conditions at each boundary. If or are non-zero on at least one of the boundaries, we can rescale a normalised solution to ensure that the value at that boundary is equal to .
To guarantee that the linear boundary conditions apply during the QNUTE simulation, they must be encoded into the Black-Scholes Hamiltonian. The first and last rows of the matrix in Eq. (11) are updated with the corresponding forward and backward first-order finite difference coefficients, respectively, with the second-derivative terms vanishing as the function is linear. The Black-Scholes Hamiltonian inclusive of linear boundary conditions takes the form
(14)
where
(15)
See Supplementary Information for the Pauli decomposition of this Hamiltonian.
Discussion
In this work, we have generalised the quantum imaginary time evolution algorithm to enable the simulation of arbitrary non-Hermitian dynamics on quantum computers. We demonstrated our QNUTE algorithm’s application via a numerical implementation that simulating the pricing dynamics of European options, as dictated by the Black-Scholes equation.
In undertaking these simulations, we assumed that the underlying financial asset had constant volatility, , and risk-free interest rate, . The time dependence of these variables can be encoded in the Hamiltonian with no extra cost to its construction. Further, the inclusion of these variables does not affect the unitary approximations produced by QNUTE, however, modelling volatility and interest rates as stochastic processes may require smaller time steps for more accurate simulations. Indeed, the time dependence of gives rise to a different boundary ODE, which necessitates modifications to our rescaling protocol.
As depicted in Fig. 1, our implementations of QNUTE were able to match the analytical solutions of the Black-Scholes equation. For convergence, it is important to choose an asset price domain with boundaries such that linear boundary conditions hold for the option’s payoff . A good level of convergence also depends on having access to enough sample points around the strike prices of the option, a lack of which can be seen in the 2-qubit curves in Fig. 1 (c), (d) and (f).
In our implementations of QNUTE, each term, , in the decomposition of the Black-Scholes Hamiltonian was a linear combination of Pauli strings. Since the number of distinct Pauli strings in our decomposition scales exponentially with the number of qubits, an alternative decomposition is required for the scalability of QNUTE for Black-Scholes.
Approaches taken to solve PDEs using varQITE have also required the expectation values of finite difference operators. In particular, Liu et al. proposed a scheme to measure such expectation values with a linear overhead [14]. We conjecture that this scheme may be adopted within our approach, leading to exponentially fewer terms in the Hamiltonian decomposition.
The discretised Black-Scholes Hamiltonian has a high degree of correlation between all the qubits used in the simulation. This was demonstrated by implementing inexact QNUTE, wherein the unitary approximations only act on at most adjacent qubits. Figure 2 depicts the fidelities of inexact QNUTE simulations, averaged over each time step for the various option payoffs, see Table 1 for the exact values. For an increasing number of qubits and fixed domain size , we have it that inexact QNUTE does not capture the correlations between the qubits, rendering it unable to emulate the true time evolution.
For future work, we intend to incorporate recent improvements to the simulated QITE methodology, including Fast QITE [9], time-dependent drifted QITE [10] and QITE with nonlocal approximation [11], within our QNUTE framework to understand their effect on the accuracy and efficiency for simulated PDE dynamics.
Data availability
All data generated and analysed during this study are included in this published article and its supplementary information files.
Code availability
The code that supports the findings of this study is available from the corresponding authors upon reasonable request.
References
\bibcommenthead
Hull [2017]
Hull, J.:
Options, Futures, and Other Derivatives John C. Hull.,
Ninth edition. edn.
Pearson Education Limited,
Harlow, United Kingdom
(2017)
Black and Scholes [1973]
Black, F.,
Scholes, M.S.:
The Pricing of Options and Corporate Liabilities.
Journal of Political Economy
81(3),
637–654
(1973)
https://doi.org/10.1086/260062
Fontanela et al. [2021]
Fontanela, F.,
Jacquier, A.,
Oumgari, M.:
A quantum algorithm for linear pdes arising in finance.
SIAM Journal on Financial Mathematics
12(4),
98–114
(2021)
Radha [2021]
Radha, S.K.:
Quantum option pricing using wick rotated imaginary time evolution.
arXiv preprint arXiv:2101.04280
(2021)
Alghassi et al. [2022]
Alghassi, H.,
Deshmukh, A.,
Ibrahim, N.,
Robles, N.,
Woerner, S.,
Zoufal, C.:
A variational quantum algorithm for the Feynman-Kac formula.
Quantum
6,
730
(2022)
https://doi.org/10.22331/q-2022-06-07-730
Gonzalez-Conde et al. [2023]
Gonzalez-Conde, J.,
Rodríguez-Rozas, A.,
Solano, E.,
Sanz, M.:
Efficient hamiltonian simulation for solving option price dynamics.
Phys. Rev. Res.
5,
043220
(2023)
https://doi.org/10.1103/PhysRevResearch.5.043220
Motta et al. [2020]
Motta, M.,
Sun, C.,
Tan, A.T.,
O’Rourke, M.J.,
Ye, E.,
Minnich, A.J.,
Brandao, F.G.,
Chan, G.K.-L.:
Determining eigenstates and thermal states on a quantum computer using quantum imaginary time evolution.
Nature Physics
16(2),
205–210
(2020)
McArdle et al. [2019]
McArdle, S.,
Jones, T.,
Endo, S.,
Li, Y.,
Benjamin, S.C.,
Yuan, X.:
Variational ansatz-based quantum simulation of imaginary time evolution.
npj Quantum Information
5(1)
(2019)
https://doi.org/10.1038/s41534-019-0187-2
Tan [2020]
Tan, K.C.:
Fast quantum imaginary time evolution
(2020)
Huang et al. [2022]
Huang, Y.,
Shao, Y.,
Ren, W.,
Sun, J.,
Lv, D.:
Efficient quantum imaginary time evolution by drifting real time evolution: an approach with low gate and measurement complexity.
arXiv preprint arXiv:2203.11112
(2022)
Nishi et al. [2021]
Nishi, H.,
Kosugi, T.,
Matsushita, Y.-i.:
Implementation of quantum imaginary-time evolution method on nisq devices by introducing nonlocal approximation.
npj Quantum Information
7(1),
1–7
(2021)
Nguyen and Thompson [2024]
Nguyen, N.,
Thompson, R.:
Solving maxwells equations using variational quantum imaginary time evolution.
arXiv preprint arXiv:2402.14156
(2024)
Leong et al. [2023]
Leong, F.Y.,
Koh, D.E.,
Ewe, W.-B.,
Kong, J.F.:
Variational Quantum Simulation of Partial Differential Equations: Applications in Colloidal Transport
(2023)
Liu et al. [2021]
Liu, H.-L.,
Wu, Y.-S.,
Wan, L.-C.,
Pan, S.-J.,
Qin, S.-J.,
Gao, F.,
Wen, Q.-Y.:
Variational quantum algorithm for the poisson equation.
Phys. Rev. A
104,
022418
(2021)
https://doi.org/10.1103/PhysRevA.104.022418
Kumar and Wilmott [2024]
Kumar, S.,
Wilmott, C.M.:
Generalising quantum imaginary time evolution to solve linear partial differential equations
(2024)
Jones et al. [2019]
Jones, B.,
White, D.,
O’Brien, G.,
Clark, J.,
Campbell, E.:
Optimising trotter-suzuki decompositions for quantum simulation using evolutionary strategies,
pp. 1223–1231
(2019).
https://doi.org/10.1145/3321707.3321835
Trotter [1959]
Trotter, H.F.:
On the product of semi-groups of operators.
Proceedings of the American Mathematical Society
10(4),
545–551
(1959)
Windcliff et al. [2004]
Windcliff, H.,
Forsyth, P.A.,
Vetzal, K.:
Analysis of the stability of the linear boundary condition for the black–scholes equation.
Journal of Computational Finance
8,
65–92
(2004)
Acknowledgements
C.M.W. and S.K. gratefully acknowledge the financial support of the Engineering and Physical Sciences Research Council (EPSRC) through the Hub in Quantum Computing and Simulation (EP/T001062/1).
Author Contributions
C.M.W. conceived the project. S.K. performed the numerical simulations. C.M.W. and S.K. analyzed the data and interpreted the results, and proposed improvements. C.M.W. and S.K. both contributed to the writing and editing of the manuscript.
Competing Interests
The authors declare no competing interests.
Supplementary Information
Calculating the unitaries
We approximate the normalised action of a Trotter step on the state by using the unitary , where is a Hermitian operator expressed as a real linear combination of Pauli operator strings indexed by . To calculate the coefficients , we minimise the distance between the normalised Trotter step and the unitary acting on expanded to . This is achieved by firstly approximating the norm of the Trotter step acting on . We have it that
(16)
from which we have
(17)
Next, we set the unitary to map to the normalised output of the Trotter step
(18)
from which we have
(19)
and rewriting
(20)
Now, defining
(21)
and
(22)
we solve for such that the squared distance between and is minimised. It follows that
(23)
Since does not depend on , , in the minimisation, can be ignored. Noting that is Hermitian, we see that
(24)
while the quantity can be evaluated as
(25)
(26)
Using that is Hermitian, the expectation value of will always be real, which implies that the real part of only depends on the second term in Eq. (26)
(27)
The function to minimise, therefore, reduces to
(28)
Defining with components
(29)
and the matrix with entries
(30)
we can rewrite the objective function as
(31)
To minimise with respect to , we equate its gradient to zero, and observe that
(32)
It follows that , and, hence, to minimise , we solve for in
(33)
The Black-Scholes Hamiltonian in the Pauli basis
In order to discretise the Black-Scholes equation with the form, as given in Eq. (2),
(34)
we rewrite the derivative operators in terms of finite difference representations and substitute the and terms with the diagonal matrices
(35)
respectively, where .
We are required to represent these matrices as linear combinations of the Pauli operators in order to be able to simulate their dynamics with QNUTE. Firstly, let us define the following one-qubit matrices.
(36)
Further, consider the -qubit generalisations of Eq. (36) given by
(37)
Tensor product strings comprising copies of the four 1-qubit operators in Eq. (36) allows us to generate matrices that have a 1 in exactly one entry of a matrix with 0s elsewhere. We will use these -qubit tensor strings of the operators in Eq. (36) to define the linear boundary conditions for the Black-Scholes Hamiltonian.
Let us construct the matrix for -qubits. We have
(38)
Consider the matrix . For , , while for , we have
(39)
Generalising to -qubits, we have it that
(40)
Squaring both sides yields
(41)
Next, let us consider the first derivative . This operator is approximated by the central difference matrix , where
(42)
For one qubit case, , we have
(43)
Generalising to -qubits, we have
(44)
Next, let us consider the second derivative , which is approximated by the central difference matrix , where
(45)
For , we have
(46)
Generalising to -qubits, it can be shown that
(47)
Using the , and representations above, the -qubit Black-Scholes Hamiltonian takes the form
(48)
Expressing Eq. (48) in matrix form over -qubits, we have it that
(49)
where
(50)
To include linear boundary conditions, we neglect the second derivative terms and substitute the first and last row of Eq. (48) with forward and backward finite difference coefficients, respectively. The revised first row coefficients that take into account the linear boundary conditions are
(51)
while the revised last row coefficients that into account the linear boundary conditions are
(52)
Consequently, for qubits, the Black-Scholes Hamiltonian with linear boundary conditions is written as
(53)
The rescaling protocol
Under the assumption of linear boundary conditions, is linear with respect to in the neighbourhood of and , hence, we have
(54)
for and .
Substituting Eq. (54) into the Black-Scholes equation, Eq. (34), we obtain the boundary equation
Determining and at each boundary, Eq. (54) becomes a closed form expression that explains how evolves at the boundaries. Assuming is sufficiently small, we can approximate and at each boundary by assuming that the closest sample point also follows the linear condition. Thus, on the left boundary, using and , we have
(58)
Similarly, on the right boundary, we have
(59)
Using Eq. (58) and Eq. (59), we define a protocol that rescales the normalised state obtained from QNUTE by a factor such that
(60)
or
(61)
The choice between Eq. (60) and Eq. (61) depends on the preference assigned to the boundaries during simulation. This work used the left boundary when modelling put options, and the right boundary when modelling call options. The protocol fails if on both boundaries.