 Research
 Open Access
 Published:
Quantum algorithm for calculating risk contributions in a credit portfolio
EPJ Quantum Technology volume 9, Article number: 32 (2022)
Abstract
Finance is one of the promising field for industrial application of quantum computing. In particular, quantum algorithms for calculation of risk measures such as the value at risk and the conditional value at risk of a credit portfolio have been proposed. In this paper, we focus on another problem in credit risk management, calculation of risk contributions, which quantify the concentration of the risk on subgroups in the portfolio. Based on the recent quantum algorithm for simultaneous estimation of multiple expected values, we propose the method for credit risk contribution calculation. We also evaluate the query complexity of the proposed method and see that it scales as \(\widetilde{O} (\sqrt{N_{\mathrm{gr}}}/\epsilon )\) on the subgroup number \(N_{\mathrm{gr}}\) and the accuracy ϵ, in contrast with the classical method with \(\widetilde{O} (\log(N_{\mathrm{gr}})/\epsilon^{2} )\) complexity. This means that, for calculation of risk contributions of finely divided subgroups, the advantage of the quantum method is reduced compared with risk measure calculation for the entire portfolio. Nevertheless, the quantum method can be advantageous in highaccuracy calculation, and in fact yield less complexity than the classical method in some practically plausible setting.
1 Introduction
Following the recent advance of quantum computing technology, people are now looking for industrial applications. Finance is one of promising fields (see [1–4] as comprehensive reviews). In particular, credit portfolio risk measurement is a problem for which applications of quantum algorithms are actively investigated. Every bank has a credit portfolio that consists of loans it has issued, and it is exposed to the credit risk, that is, the risk to incur the loss by defaults of obligors. In order to monitor such a risk, banks calculate risk measures that quantify the amount of the risk, such as the value at risk (VaR), the percentile (e.g. 99%) of the loss distribution, and the conditional VaR (CVaR), the conditional expectation of the loss given that it exceeds the VaR (see [5] as a recent review). They are often evaluated by the Monte Carlo method [6], in which defaults are randomly generated by some mathematical model and many sample values of the loss are taken. Generating many samples, whose number is typically of order 10^{6}, for a large credit portfolio, which can contain millions of obligors for major banks, is of high computational cost. On the other hand, there are some quantum algorithms for Monte Carlo integration [7–9] based on quantum amplitude estimation [8, 10–17]. Although the classical Monte Carlo integration has sample complexity scaling as \(O(\epsilon^{2})\) on ϵ, the error tolerance for the integral, query complexity in the quantum counterparts scales as \(O(\epsilon^{1})\), which is often referred to as quantum quadratic speedup. Therefore, quantum Monte Carlo integration has been applied to credit portfolio risk measurement in previous studies [18–20], and is expected to provide speedup and sophistication for credit risk management in banks in the future.
In this paper, we focus on another problem in credit risk management, that is, calculation of risk contributions. VaR and CVaR indicate the amount of the risk in the entire portfolio, but we sometimes want to know how each subportfolio contributes to the risk measures. In other words, we want to quantitatively evaluate the concentration of the risk to subgroups of obligors. If a bank has such measures, they will help it to analyze and disperse the risk. For example, it can notice that the risk concentrates on obligors in some specific industrial sector or some specific region, and that some business division in it are taking the risk too much. In fact, such measures called risk contributions have been defined and how to calculate them has been studied [5, 21–29]. They are written as conditional expected values, and therefore calculating them by Monte Carlo is more costly than the entire risk measures, since only a small fraction of samples matches the conditions and we need to generate more samples.
Then, this paper aims at quantum speedup of credit risk contribution calculation. Note that original quantum algorithms for Monte Carlo integration [7–9] output an estimate of a single expected value, and that sequentially applying such an algorithm to calculation of risk contributions of \(N_{\mathrm{gr}}\) obligor groups, which leads to \(O(N_{\mathrm{gr}}/\epsilon)\) complexity, is not efficient. Instead, we resort to the recently proposed quantum algorithm for simultaneous calculation of expected values of multiple random variables [30] (see also [31]). This algorithm outputs d expected values with accuracy ϵ, making \(\widetilde{O} (\sqrt{d}/\epsilon )\) queries^{Footnote 1} to two oracles, of which one generates a state that encodes the probability distribution in amplitudes and the other computes the random variables. Presenting how to construct these oracles concretely, we show that this quantum algorithm can be in fact applied to risk contribution calculation. We then see that the number of queries to buildingblock operations in the proposed method scales as \(\widetilde{O} (\sqrt{N_{\mathrm{gr}}}/\epsilon )\) on \(N_{\mathrm{gr}}\) and ϵ. This means quantum quadratic speedup with respect to ϵ, but not with respect to \(N_{\mathrm{gr}}\), since the classical Monte Carlo method has \(\widetilde{O} (\log(N_{\mathrm{gr}})/\epsilon^{2} )\) complexity. In general, the more finely divided obligor groups we set, the more the advantage of the quantum method is reduced. Nevertheless, as we will see later, in some practically plausible problem setting, the proposed method seems to be advantageous against the classical method in terms of query complexity.
The rest of this paper is organized as follows. In Sect. 2, we review the Merton model [32], a widelyused mathematical model for credit portfolio risk measurement, and introduce risk measures such as VaR and CVaR and risk contributions. Section 3 is the main part of this paper. In this section, as preparations, we present some oracles used as building blocks in the proposed method such as arithmetic operations, controlled rotation and generation of a state corresponding to a standard normal random variable, and introduce quantum multiple expected value estimation [30] and fixedpoint quantum amplitude amplification (QAA) [33], which is another important base quantum algorithm. Then, we present the proposed quantum method as Theorem 3, the main result of this work, and discuss its complexity and comparison with the classical method. Section 4 summarizes this paper.
1.1 Notations
Here, we summarize some notations we later use. \(\mathbb{R}_{+}\) denotes the set of all positive real number: \(\mathbb{R}_{+}:=\{x\in\mathbb{R}  x>0\}\). For \(n\in\mathbb{N}\), we define \([n]:=\{1,\ldots,n\}\). For \(\epsilon\in\mathbb{R}_{+}\), we say that \(x\in\mathbb{R}\) is a ϵapproximation of \(y\in\mathbb{R}\) if \(xy\le\epsilon\). \(1_{C}\) denotes the indicator function, which takes 1 if the condition C is satisfied and 0 otherwise. \(\delta_{a,b}\) denotes the Kronecker delta: for integers a and b, \(\delta_{a,b}=1\) if \(a=b\) and 0 otherwise.
2 Credit risk measures and risk contributions
In this section, we introduce some risk measures and risk contributions for a credit portfolio.
2.1 Credit risk model
First, we introduce a mathematical model for credit portfolio risk measurement, the Merton model [32], which is widely used in practical business and considered in this paper. Let us consider a credit portfolio consisting of \(N_{\mathrm{obl}}\) obligors, whose exposures^{Footnote 2} are \(e_{1},\ldots,e_{N_{\mathrm{obl}}}\in\mathbb{R}_{+}\). Then, in the Merton model, we model the loss L in the portfolio as follows, using independent random variables \(X_{0},X_{1},\ldots,X_{N_{\mathrm{obl}}}\) that follows the standard normal distribution:
Here, for each \(k\in[N_{\mathrm{obl}}]\), \(Y_{k}\) is defined as
and \(Z_{k}\) is defined as
with constants \(z_{k}\in\mathbb{R}\) and \(a_{k}\in(0,1)\). \(Y_{k}=1\) and \(Y_{k}=0\) mean that the kth obligor defaults and not, respectively. \(Z_{k}\) is called the value of the firm of the kth obligor, and it defaults if \(Z_{k}\) falls below some threshold \(z_{k}\). It is set according to the default probability of the obligor, which is usually set based on some credit rating model. Note that \(X_{0}\) is common for all the obligors but \(X_{1},\ldots,X_{N_{\mathrm{obl}}}\) affect only the first,…, \(N_{\mathrm{obl}}\)th obligors, respectively. \(X_{0}\) is called a systematic risk factor, which reflects the situation of macro economy, and \(X_{1},\ldots,X_{N_{\mathrm{obl}}}\) are called idiosyncratic risk factors, which reflect the matters unique to the credit of the individual obligor.^{Footnote 3}\(Z_{k}\) is the linear combination of \(X_{0}\) and \(X_{k}\) as (3), and follows the standard normal distribution too. The coefficients \(a_{1},\ldots,a_{N_{\mathrm{obl}}}\) control correlations between the values of the firms: \({\mathrm{Cor}}(Z_{k},Z_{k^{\prime}})=\alpha_{k}\alpha_{k^{\prime }}\) for different \(k,k^{\prime}\in[N_{\mathrm{obl}}]\). Therefore, setting these coefficients close to 1 leads to strong correlations, which make simultaneous defaults of many obligors more probable and fatten the tail of the loss distribution. Also note that, under the condition that \(X_{0}\) takes a value \(x_{0}\in\mathbb{R}\), \(Y_{k}\) follows a Bernoulli distribution with the probability that \(Y_{k}=1\) being
where \(\Phi_{\mathrm{SN}}\) is the cumulative distribution function (CDF) of the standard normal distribution.
2.2 Risk measures
In order to quantitatively assess the risk in a portfolio, some risk measures have been proposed. Most widely used one is the VaR. Given \(\alpha\in(0,1)\), which is typically set so that \(1\alpha=0.99\) (99%) or 0.999 (99.9%), we define the \(100(1\alpha)\)% VaR as
This means that the probability that the loss larger than \(100(1\alpha)\)% VaR occurs is at most α.
Another widely used measure is the CVaR, which is also known as the expected shortfall. Given \(v\in\mathbb{R}_{+}\), we define
where \(\mathbb{E}_{\mathrm{Mer}}[\cdot]\) denotes the (conditional) expected value with respect to randomness of \(X_{0},X_{1},\ldots,X_{N_{\mathrm{obl}}}\). Then, \(100(1\alpha)\)% CVaR is defined as \(C_{V_{\alpha}}\), that is, (6) with \(v=V_{\alpha}\). In practice, we first obtain some estimation v of the VaR, and then calculate \(C_{v}\) as an estimation of the CVaR.
2.3 Risk contributions
In practice, calculating only risk measures for the entire portfolio is not sufficient. Sometimes, we need to decompose the risk measures to contributions from the subgroups in the portfolio, in order to, for example, analyze concentration of the risk. There are some studies on how to define and calculate such risk contributions [21–29], which we now outline.
First, we present how to represent the subgroups. We assume that the obligors in the portfolio are divided into \(N_{\mathrm{gr}}\) groups, in which the numbers of obligors are \(n_{1},\ldots,n_{N_{\mathrm{gr}}}\in\mathbb{N}\). Without loss of generality, we can assign small indexes to the obligors in the group with a small index. That is, for each \(K\in[N_{\mathrm{gr}}]\), we assume that the Kth group contains \(\kappa^{K}_{1}\)th,…, \(\kappa^{K}_{n_{K}}\)th obligors, where
Under this indexing, the loss in the Kth group is given as
We set the group according to how finely we want to analyze the risk. For example, if we want risk contributions of all individual obligors, we set \(N_{\mathrm{obl}}\) groups, each of which contains only one obligor. If not, we try appropriate grouping according to our purpose. For example, we can group obligors by their industrial and/or regional sectors, in order to monitor which sector the risk concentrate on and how large it is.
Now, we define the risk contributions as follows. With respect to the VaR, the risk contribution of the Kth group is
and that with respect to the CVaR is
Note that the sum of risk contributions over the groups is equal to the risk measure for the entire portfolio: \(\sum_{K=1}^{N_{\mathrm{gr}}}V^{K}_{\alpha}=V_{\alpha}\) and \(\sum_{K=1}^{N_{\mathrm{gr}}}C^{K}_{v}=C_{v}\), which makes these definitions of risk contributions plausible.
Also note that Monte Carlo estimation of risk contributions is harder than that of the risk measure for the entire portfolio. This is because of the definitions of risk contributions as conditional expected values. When we randomly generate samples of the random variable set \((X_{0},X_{1},\ldots,X_{N_{\mathrm{obl}}})\) or \((X_{0},Y_{1},\ldots,Y_{N_{\mathrm{obl}}})\), only the small fraction of them satisfy the condition \(L=V_{\alpha}\) or \(L\ge v\). Although we can nonetheless estimate CVaR contributions with the probability that \(L\ge v\) being not too small (say 0.01), estimating VaR contributions is much harder since the probability that the loss takes a specific value \(V_{\alpha}\) is much smaller. Even if we resort to quantum algorithms, estimating VaR contributions is hard, since the probability that the condition for the conditional expected value is satisfied affects the complexity, as we will see below. In light of this, we hereafter focus on CVaR contributions, only referring to some existing studies on VaR contribution calculation, such as the Monte Carlo method combined with importance sampling [26] and semianalytical methods based on saddlepoint approximation [27–29].
3 Quantum algorithm for measuring risk contributions in a credit portfolio
3.1 Fixedpoint binary representation by qubits
Before we present the quantum algorithm for CVaR contribution calculation, we need some preparations. First of all, we now present the current setting for numerical calculation on a quantum computer. In this paper, we consider systems consisting of some qubits, and use the bit string on a quantum register as the real number in fixedpoint binary representation. More strictly, in this paper, a quantum register, or simply a register, means a system consisting of \(N_{\mathrm{dig}}\) qubits, where \(N_{\mathrm {dig}}\) is sufficiently large, and, for every \(x\in\mathbb{R}\), \(\mathopen{\vert }x\mathclose{\rangle}\) denotes a computational basis state on such a register with a bit string corresponding to \({\mathrm{argmin}}_{a\in\mathcal{G}}xa\), where \(\mathcal{G}\) is some set of fixedpoint binary numbers with \(N_{\mathrm{dig}}\) digits. We assume that \(\mathcal{G}\) covers the sufficiently wide range on the real axis with the sufficiently small interval, and that therefore approximating a real numbers with an element of G yields only a small error, which we hereafter neglect. Besides, for \(\vec{v}=(v_{1},\ldots,v_{d})^{T}\in\mathbb{R}^{d}\), \(\mathopen {\vert}\vec{v}\mathclose{\rangle}\) denotes a state on dregisters system such that \(\mathopen{\vert}\vec{v}\mathclose{\rangle}:=\mathopen{\vert }v_{1}\mathclose{\rangle}\cdots\mathopen{\vert}v_{d}\mathclose {\rangle}\).
3.2 Buildingblock oracles
Next, we introduce some oracles, which are used as parts of the algorithm.
Definition 1
We call the following oracles on a multiregister system arithmetic circuits.

Addition \(U_{\mathrm{add}}\): for any \(x,y\in\mathbb{R}\), \(U_{\mathrm{add}}\mathopen{\vert}x\mathclose{\rangle}\mathopen {\vert}y\mathclose{\rangle}=\mathopen{\vert}x\mathclose{\rangle }\mathopen{\vert}x+y\mathclose{\rangle}\)

Multiplication \(U_{\mathrm{mul}}\): for any \(x,y\in\mathbb{R}\), \(U_{\mathrm{add}}\mathopen{\vert}x\mathclose{\rangle}\mathopen {\vert}y\mathclose{\rangle}\mathopen{\vert}0\mathclose{\rangle }=\mathopen{\vert}x\mathclose{\rangle}\mathopen{\vert}y\mathclose {\rangle}\mathopen{\vert}xy\mathclose{\rangle}\)

Comparison \(U_{\mathrm{comp}}\): for any \(x,y\in\mathbb{R}\), \(U_{\mathrm{comp}}\mathopen{\vert}x\mathclose{\rangle}\mathopen {\vert}y\mathclose{\rangle}\mathopen{\vert}0\mathclose{\rangle }=\mathopen{\vert}x\mathclose{\rangle}\mathopen{\vert}y\mathclose {\rangle}(1_{x\ge y}\mathopen{\vert}1\mathclose{\rangle}+1_{x< y}\mathopen{\vert}0\mathclose{\rangle})\)

Standard normal CDF \(U_{\Phi_{\mathrm{SN}}}\): for any \(x\in\mathbb{R}\), \(U_{\Phi_{\mathrm{SN}}}\mathopen{\vert}x\mathclose{\rangle }\mathopen{\vert}0\mathclose{\rangle}=\mathopen{\vert}x\mathclose {\rangle}\mathopen{\vert}\Phi_{\mathrm{SN}}(x)\mathclose{\rangle}\)

Arccos and square root \(U_{\mathrm{acsr}}\): for any \(x\in[0,1]\), \(U_{\mathrm{acsr}}\mathopen{\vert}x\mathclose{\rangle}\mathopen {\vert}0\mathclose{\rangle}=\mathopen{\vert}x\mathclose{\rangle }\mathopen{\vert}\arccos(\sqrt{x})\mathclose{\rangle}\)
In fact, many proposals on circuit implementations for addition and multiplication have been made [34–45]. Comparison of x and y is virtually a subtraction \(yx\), since, when we use the 2’s complement method to represent a negative number, the top bit of \(yx\) is 1 if \(yx\le0\) and 0 otherwise. Also note that subtraction can be done as addition in the 2’s complement method. For the CDF of the standard normal distribution \(\Phi_{\mathrm{SN}}\), or, equivalently, the error function \({\mathrm{erf}}(x)=2\Phi_{\mathrm{SN}}(\sqrt{2}x)1\), many accurate approximations with elementary functions have been proposed: for example, \({\mathrm{erf}}(x)\approx11/(1+a_{1}x+\cdots a_{6}x^{6})^{16}\) with \(a_{1} = 0.0705230784,a_{2} = 0.0422820123,a_{3} = 0.0092705272,a_{4} = 0.0001520143,a_{5} = 0.0002765672,a_{6} = 0.0000430638\) [46]. Therefore, \(U_{\Phi_{\mathrm{SN}}}\) can be approximately implemented with circuits for addition, multiplication and division (note that division circuits have also been proposed [47–50]). For \(U_{\mathrm{acsr}}\), we can use implementation of inverse trigonometric functions in [51], and that of square root in [52].
Definition 2
We call the following oracles \(U_{\mathrm{CRY}}\) on a system consisting of a quantum register and a qubit the anglecontrolled Y rotation:
Here, {R}_{Y}(\theta ):=\left(\begin{array}{cc}cos\theta & sin\theta \\ sin\theta & cos\theta \end{array}\right) for any \(\varphi\in\mathbb{R}\).
That is, \(U_{\mathrm{CRY}}\) is the rotation on the Bloch sphere around the Yaxis, whose angle θ is specified by another register. These gates can be implemented as a series of multicontrolled rotation gates with fixed angles [18].
Definition 3
We call the following oracle on a quantum register the SN state generation oracle:
where \(N_{\mathrm{SN}}\) is an integer not less than 2,
\(\phi_{\mathrm{SN}}\) is the probability density function for the standard normal distribution, and, for \(i\in[N_{\mathrm{SN}}]\), \(x^{\mathrm{SN}}_{i}:=D+2D(i1)/(N_{\mathrm{SN}}1)\) with \(D\in\mathbb{R}_{+}\).
This can be interpret as an oracle to generate a state in which the standard normal distribution is approximately encoded in the amplitudes. That is, with sufficiently large \(N_{\mathrm{SN}}\) and D, the random variable \(X_{\mathrm{DiscSN}}\) that takes \(x^{\mathrm{SN}}_{1},\ldots,x^{\mathrm{SN}}_{N_{\mathrm{SN}}}\) with probabilities \(p^{\mathrm{SN}}_{1},\ldots,p^{\mathrm{SN}}_{N_{\mathrm{SN}}}\), respectively, can be viewed as a discretized approximation of a standard normal random variable, and we obtain \(x^{\mathrm{SN}}_{i}\) with probability \(p_{i}\) when we measure \(\mathopen{\vert}\mathrm{SN}\mathclose{\rangle}\). We hereafter use \(X_{\mathrm{DiscSN}}\) as if it followed the standard normal distribution and neglect any errors caused by this approximation.
Some implementations for this type of oracle have been proposed. Originally, the implementation as a series of arithmetic circuits and controlled rotation was proposed in [53], and some extensions and modifications on this have been also proposed recently [54–56]. In another direction, some state preparation methods based on variational algorithms with parametric quantum circuits have been considered [57–61].
3.3 Quantum algorithm for estimating multiple expected values
We next explain the quantum algorithm for simultaneous estimation of expected values of multiple random variables, which is the core of the proposed CVaR contribution calculation method. There are some recent proposals on such a quantum algorithm [30, 31]. In this paper, we use the algorithm in [30]. Formally, we have the following theorem.
Theorem 1
(Theorem 3.4 in [30])
Let \((\Omega,2^{\Omega},\mathbb{P})\) be a probability space where the sample space Ω is finite and elements ω in Ω are associated with mutually orthogonal states \(\mathopen{\vert}\omega \mathclose{\rangle}\) on a quantum register. Let ξ⃗ be a \(\mathbb{R}^{d}\)valued random variable on \((\Omega,2^{\Omega},\mathbb{P})\), and suppose that ξ⃗ has a mean \(\vec{\mu}=(\mu_{1},\ldots,\mu_{d})^{T}\in\mathbb{R}^{d}\) and a covariance matrix \(\Sigma\in\mathbb{R}^{d\times d}\). Suppose that we have accesses to an oracle \(U_{\mathbb{P}}\) on a quantum register, which acts as
and an oracle \(U_{\vec{\xi}}\) on a \((d+1)\)registers system, which acts as
for any \(\omega\in\Omega\). Then, for given \(\delta\in(0,1)\) and \(n\in\mathbb{N}\) such that \(n\ge\log(d/\delta)\), there is a quantum algorithm \(\textup {\textsf {QEstimator}}_{d}(\vec{\xi},n,\delta)\) that outputs an estimate \(\vec{\mu}^{\prime}=(\mu^{\prime}_{1},\ldots,\mu^{\prime }_{d})^{T}\) of μ⃗ such that
for every \(i\in[d]\) with probability at least \(1\delta\), making \(\widetilde{O}(n)\) calls to \(U_{\mathbb{P}}\) and \(U_{\vec{\xi}}\).
On the oracles \(U_{\mathbb{P}}\) and \(U_{\vec{\xi}}\) needed for this algorithm, we will later present the concrete way to construct for CVaR contribution calculation. Note that, along with \(U_{\mathbb{P}}\) and \(U_{\vec{\xi}}\), \(\textup {\textsf {QEstimator}}_{d}(\vec{\xi},n,\delta)\) contains \(\widetilde{O}(dn)\) uses of arithmetic circuits, since we calculate the inner product \(\vec{u}\cdot\vec{\xi}\) with some \(\vec{u}\in\mathbb{R}^{d}\) in the algorithm [30]. However, we neglect them when we later count arithmetic computations in the proposed quantum method, since \(U_{\mathbb{P}}\) and \(U_{\vec{\xi}}\) in the method contain more arithmetic computations. That is, as we will see later, they use arithmetic circuits \(O(N_{\mathrm{obl}})\) times, and the total number in \(\textup {\textsf {QEstimator}}_{d}(\vec{\xi},n,\delta)\) is therefore \(O(nN_{\mathrm{obl}})\), which is larger than \(\widetilde{O}(dn)\) since \(d=N_{\mathrm{gr}}\le N_{\mathrm{obl}}\) in the current problem.
3.4 Fixedpoint quantum amplitude amplification
We also explain the fixedpoint QAA presented in [33], which is an important subroutine in the proposed method. This is a modified version of the original QAA algorithm in [10]. Unlike the original one, the fixedpoint QAA, as an unitary operation, amplifies the squared amplitude of the marked state in a superposition state to the value arbitrarily close to 1, without the unintended amplitude decay by too much iterative operations. Formally, we have the following theorem.
Theorem 2
([33])
Let \(\mathopen{\vert}\Phi\mathclose{\rangle}=\sqrt{p}\mathopen{\vert }\phi\mathclose{\rangle}\mathopen{\vert}1\mathclose{\rangle }+\sqrt{1p}\mathopen{\vert}\phi^{\prime}\mathclose{\rangle} \mathopen{\vert}0\mathclose{\rangle}\) be a state on a system R with a qubit A attached, where \(\mathopen{\vert}\phi\mathclose{\rangle}\) and \(\mathopen{\vert }\phi^{\prime}\mathclose{\rangle}\) are states on R and \(p\in(0,1)\). Suppose that we are given an access to the oracle U that prepares \(\mathopen{\vert}\Phi\mathclose{\rangle}\): \(U\mathopen {\vert}0\mathclose{\rangle}\mathopen{\vert}0\mathclose{\rangle }=\mathopen{\vert}\Phi\mathclose{\rangle}\). Then, for any \(\delta\in(0,1)\), there is an unitary V that prepares a state \(\mathopen{\vert}\Phi^{\prime}\mathclose{\rangle}\) in the form of \(\mathopen{\vert}\Phi^{\prime}\mathclose{\rangle}=\sqrt{1\delta ^{\prime}}\mathopen{\vert}\phi\mathclose{\rangle}\mathopen{\vert }1\mathclose{\rangle}+ \sqrt{\delta^{\prime}}\mathopen{\vert}\phi^{\prime\prime }\mathclose{\rangle}\mathopen{\vert}0\mathclose{\rangle}\), where \(\delta^{\prime}\in[0,\delta)\) and \(\mathopen{\vert}\phi^{\prime \prime}\mathclose{\rangle}\) is some state on R, making \(O (\frac{\log(\delta^{1})}{\sqrt{p}} )\) calls to U.
Here, we assume that the marked state and other states are distinguished by whether a specific qubit A is \(\mathopen{\vert}1\mathclose {\rangle}\) or \(\mathopen{\vert}0\mathclose{\rangle}\), which suffices for the current problem of CVaR contribution calculation. [33] assumes that we can use the oracle \(U_{T}\) such that, for the market state \(\mathopen{\vert}T\mathclose{\rangle}\) with an ancilla qubit, \(U_{T}\mathopen{\vert}T\mathclose{\rangle}\mathopen{\vert }b\mathclose{\rangle}=\mathopen{\vert}T\mathclose{\rangle }\mathopen{\vert}b\otimes1\mathclose{\rangle}\), and that, for any state \(\mathopen{\vert}T^{\prime}\mathclose{\rangle}\) orthogonal to \(\mathopen{\vert}T\mathclose{\rangle}\), \(U_{T}\mathopen{\vert}T^{\prime}\mathclose{\rangle}\mathopen {\vert}b\mathclose{\rangle}=\mathopen{\vert}T^{\prime}\mathclose {\rangle}\mathopen{\vert}b\mathclose{\rangle}\), where \(b\in\{0,1\}\). Now, this is just a CNOT gate controlled by A, and therefore we will not consider the number of calls to it hereafter.
3.5 Proposed algorithm
We finally present the quantum algorithm for calculating CVaR contributions. Formally, we have the following theorem.
Theorem 3
Suppose that \(N_{\mathrm{obl}}\in\mathbb{N}\), \(e_{1},\ldots,e_{N_{\mathrm{obl}}}\in\mathbb{R}_{+}\), \(a_{1},\ldots,a_{N_{\mathrm{obl}}}\in(0,1)\), \(z_{1},\ldots,z_{N_{\mathrm{obl}}}\in\mathbb{R}\), \(\alpha\in (0,1)\) and \(\delta\in(0,1)\) are given. Suppose that \(N_{\mathrm{gr}}\in\mathbb{N}\) and \(n_{1},\ldots,n_{N_{\mathrm{gr}}}\in\mathbb{N}\) such that \(\sum_{K=1}^{N_{\mathrm{gr}}}n_{K}=N_{\mathrm{obl}}\) are given. Let v be a positive real number such that \(p:={\mathrm{Pr}}(L\ge v)>0\), where L is given in (1). Suppose that we are given \(C_{\mathrm{max}}\in\mathbb{R}\) satisfying
Suppose that we are given \(\sigma_{\mathrm{max}}\in\mathbb{R}\) satisfying
where \((\sigma_{K})^{2}\) is the conditional variance of the random variable \(L_{K}\) in (8) given that \(L\ge v\). Suppose that we have an access to the SN state generation oracle \(U^{\mathrm{SN}}\). Then, for any \(\epsilon\in\mathbb{R}_{+}\) satisfying \(\epsilon\le\sigma_{\mathrm{max}}\sqrt{N_{\mathrm{gr}}}\), there is a quantum algorithm that, with probability at least \(1\delta\), outputs the ϵapproximations \(c_{1},\ldots,c_{N_{\mathrm{gr}}}\in\mathbb{R}\) of \(C^{1}_{v}(e_{1},\ldots,e_{N_{\mathrm{obl}}}),\ldots,C^{N_{\mathrm {gr}}}_{v}(e_{1},\ldots,e_{N_{ \mathrm{obl}}})\), respectively, using \(U^{\mathrm{SN}}\)
times, and arithmetic circuits and anglecontrolled Y rotations
times. Here, \(E_{\mathrm{max}}:=\max\{E_{1},\ldots,E_{N_{\mathrm {gr}}}\}\), where, for \(K\in[N_{\mathrm{gr}}]\), \(E_{K}:=\sum_{k=\kappa^{K}_{1}}^{\kappa^{K}_{n_{K}}}e_{k}\).
Proof
Consider the following probability space \((\Omega,2^{\Omega},\mathbb{P})\). The sample space is
The probability measure \(\mathbb{P}\) takes the form that, for each \(\omega=(i,y_{1},\ldots,y_{N_{\mathrm{obl}}})\in\Omega\),
Here,
is the probability that \(X_{0}=x^{\mathrm{SN}}_{i},Y_{1}=y_{1},\ldots,Y_{N_{\mathrm {obl}}}=y_{N_{\mathrm{obl}}}\), and \(\frac{1}{p}\mathcal{P}(i;y_{1},\ldots,y_{N_{\mathrm{obl}}})\) is the conditional probability of the same event given \(\sum_{k=1}^{N_{\mathrm{obl}}}e_{k}y_{k}\ge v\). \(\epsilon^{\prime}\) is some real number satisfying
\(\widetilde{\mathbb{P}}\) is some probability measure on a measurable space \((\Omega,2^{\Omega})\). Note that
holds because of \((\sigma_{\mathrm{max}})^{2}\le(E_{\mathrm {max}})^{2}\), which follows from \(L_{K}\le E_{\mathrm{max}}\) for every \(K\in[N_{\mathrm {gr}}]\), and that (25) makes \(\mathbb{P}\) nonnegative and therefore welldefined. Besides, consider the following random variable \(\vec{\xi}=(\xi_{1},\ldots,\xi_{N_{\mathrm{gr}}})^{T}\in\mathbb{R}^{N_{ \mathrm{gr}}}\) on \((\Omega,2^{\Omega},\mathbb{P})\): for any \(K\in[N_{\mathrm{gr}}]\) and \(\omega=(i,y_{1},\ldots,y_{N_{\mathrm{obl}}},w)\in\Omega\),
Then, the expected value of \(\xi_{K}\) is
holds. Therefore, if we obtain \(\epsilon/2\)approximations \(\bar{\xi}_{1},\ldots,\bar{\xi}_{N_{\mathrm{gr}}}\) of \(\mathbb{E}[\xi_{1}],\ldots,\mathbb{E}[\xi_{N_{\mathrm{gr}}}]\), they are also ϵapproximations of \(C^{1}_{v},\ldots,C^{N_{\mathrm{gr}}}_{v}\).
Thus, we hereafter consider how to obtain such \(\bar{\xi}_{1},\ldots,\bar{\xi}_{N_{\mathrm{gr}}}\) by QEstimator. To use this, we need the oracles \(U_{\mathbb{P}}\) in (14) and \(U_{\vec{\xi}}\) in (15). First, let us consider \(U_{\mathbb{P}}\). Define
as a quantum state on a system S consisting of a quantum register and \(N_{\mathrm{obl}}\) qubits. On the system consisting of S and an additional qubit, we can perform the following operation:
where \(\mathopen{\vert}\Psi_{\mathrm{gar}}\mathclose{\rangle}\) is some state on S and some ancillary registers are not displayed. In (30), we use \(U^{\mathrm{SN}}\) at the first arrow. At the second arrows, we calculate \(\arccos (\sqrt{P^{\mathrm{def}}_{1}(x^{\mathrm{SN}}_{i})} ),\ldots, \arccos (\sqrt{P^{\mathrm{def}}_{N_{\mathrm{obl}}}(x^{\mathrm{SN}}_{i})} )\) onto undisplayed ancillary registers using arithmetic circuits, and then operate \(U_{\mathrm{CRY}}\) with the rotation angles specified by these ancillary registers. At the third arrow, we calculate \(\sum_{k=1}^{N_{\mathrm{obl}}}e_{k}y_{k}\) by \(N_{\mathrm{obl}}\) additions and multiplications, then use \(U_{\mathrm{comp}}\). We denote by \(U_{\ge v}\) the oracle that acts as (30). Then, because of Theorem 2, we can generate a state
where \(\mathopen{\vert}\Psi_{\mathrm{gar}}^{\prime}\mathclose {\rangle}\) is some state and \(\epsilon^{\prime}\) is some real number satisfying (24), making
calls to \(U_{\ge v}\). Note that \(\mathopen{\vert}\Phi_{\ge v}\mathclose{\rangle}\) is in fact \(\sum_{\omega\in\Omega} \sqrt{\mathbb{P}(\omega)}\mathopen {\vert}\omega\mathclose{\rangle}\) with identification that
for each \(\omega=(i,y_{1},\ldots,y_{N_{\mathrm{obl}}})\in\Omega\). Therefore, we hereafter denote by \(U_{\mathbb{P}}\) the oracle that generates \(\mathopen{\vert}\Phi_{\ge v}\mathclose{\rangle}\) from \(\mathopen{\vert}0\mathclose{\rangle}\mathopen{\vert}0\mathclose {\rangle}^{\otimes N_{\mathrm{obl}}}\mathopen{\vert}0\mathclose {\rangle}\).
On the other hand, constructing \(U_{\vec{\xi}}\) is more simple. Given a state \(\mathopen{\vert}\omega\mathclose{\rangle}\) in (33) for \(\omega\in\Omega\), we can add \(N_{\mathrm{gr}}\) registers and perform the operation
where \(w\in\{0,1\}\). This can be done by \(O(N_{\mathrm{obl}})\) multiplications and additions. Note that (34) is in fact \(U_{\vec{\xi}}\) for ξ⃗ in (26), since \(w=1\) is \(\sum_{k=1}^{N_{\mathrm{obl}}} e_{k}y_{k}\ge v\) and 0 otherwise.
With \(U_{\mathbb{P}}\) and \(U_{\vec{\xi}}\) constructed as above, we perform \(\textup {\textsf {QEstimator}}_{N_{\mathrm{gr}}} (\vec{\xi},n,\delta )\) with
Because of (16), each of outcomes \(\bar{\xi}_{1},\ldots,\bar{\xi}_{N_{\mathrm{gr}}}\) of this satisfies
where Σ̃ is the covariance matrix of \(\xi_{1},\ldots,\xi_{N_{\mathrm{gr}}}\), and \((\widetilde{\sigma}_{\max})^{2}\) is its largest diagonal element, that is, the maximum of the variances of \(\xi_{1},\ldots,\xi_{N_{\mathrm {gr}}}\). The third inequality in (36) holds since
whose proof is postponed to Appendix 4. (36) means that \(\bar{\xi}_{1},\ldots,\bar{\xi}_{N_{\mathrm{gr}}}\) are \(\epsilon/2\)approximations of \(\mathbb{E}[\xi_{1}],\ldots,\mathbb{E}[\xi_{N_{\mathrm {gr}}}]\), and also ϵapproximations of \(C^{1}_{v},\ldots,C^{N_{\mathrm {gr}}}_{v}\), as discussed above.
Finally, let us count the numbers of calls to buildingblock circuits in this algorithm. \(\textup {\textsf {QEstimator}}_{N_{\mathrm{gr}}} (\vec{\xi},n,\delta )\) calls \(U_{\mathbb{P}}\) and \(U_{\vec{\xi}}\) \(\widetilde{O}(n)\) times, that is,
times. \(U_{\mathbb{P}}\) makes iterative calls to \(U_{\ge v}\), whose number is evaluated as (32). In \(U_{\ge v}\), \(U^{\mathrm{SN}}\) is called once, and arithmetic circuits and \(U_{\mathrm{CRY}}\) are called \(O(N_{\mathrm{obl}})\) times. On the other hand, \(U_{\vec{\xi}}\) consists of \(O(N_{\mathrm{obl}})\) arithmetic circuits. In total, for the numbers of calls to buildingblock circuits, we obtain evaluations (19) and (20). □
3.6 Comparison with the classical Monte Carlo method
We have seen that the proposed quantum algorithm estimates \(N_{\mathrm{gr}}\) CVaR contributions with accuracy ϵ and has query complexity scaling on \(N_{\mathrm{gr}}\) and ϵ as \(O(\sqrt{N_{\mathrm{gr}}}/\epsilon)\). Seemingly, this means socalled quadratic quantum speedup with respect to both \(N_{\mathrm{gr}}\) and ϵ. However, if we do not require the scaling on ϵ to be \(O(\epsilon^{1})\), we can achieve the better dependence on \(N_{\mathrm{gr}}\) classically. In classical Monte Carlo integration, we generate many samples of \(X_{0}\) and \(Y_{1},\ldots,Y_{N_{\mathrm{gr}}}\), calculate \(\widetilde{L}_{1},\ldots,\widetilde{L}_{N_{\mathrm{gr}}}\) for these samples, and take averages. By this procedure, we obtain ϵapproximations for \(N_{\mathrm{gr}}\) CVaR contributions with high probability with \(\widetilde{O}(\log N_{\mathrm{gr}}/\epsilon^{2})\) sample complexity [30]. This implies that, depending on \(N_{\mathrm{gr}}\) and ϵ, the quantum method might not be the best way.
In order to identify the situation where the quantum or classical method is better more precisely, let us evaluate the complexity in the classical method in more detail. The sample complexity to obtain ϵapproximations for \(C^{1}_{v},\ldots,C^{N_{\mathrm{gr}}}_{v}\) with probability at least δ in the classical method is [30]
Here, the factor \(1/p\) appears since we randomly generate \(\Theta(N/p)\) samples of \(X_{0},Y_{1},\ldots, Y_{N_{\mathrm{obl}}}\) in order to obtain N samples such that \(L\ge v\). In one sample generation, one standard normal random variable is generated, \(\Theta(N_{\mathrm{obl}})\) arithmetic operations are done, and \(N_{\mathrm{obl}}\) Bernoulli random variables are generated. In total, in the classical method, the number of standard normal random variable generations is evaluated as (39), and the numbers of arithmetic operations and Bernoulli random variable generations are
Then, let us compare these complexity estimations with those for the proposed quantum method. We see that the quantum method is advantageous in query complexity if
although this is a rough discussion with logarithmic factors neglected.
As an extreme case, let us assume that we want CVaR contributions for all the individual obligors. In this case, \(N_{\mathrm{gr}}\) takes the maximum \(N_{\mathrm{obl}}\), and therefore it is most disadvantageous for the quantum method. Besides, we roughly evaluate \((\sigma_{\mathrm{max}})^{2}\) as \(\bar{p}_{\mathrm{def}}(1\bar{p}_{\mathrm{def}})\bar{e}^{2}\), where \(\bar{p}_{\mathrm{def}}\) and ē are the typical scale of conditional default probabilities of obligors given \(L\ge v\) and that of exposures, respectively. Moreover, we set the accuracy ϵ relative to \(C_{\mathrm{max}}\) and roughly evaluate \(C_{\mathrm{max}}\) as \(\bar{p}_{\mathrm{def}}\bar{e}\). With these evaluations, (41) becomes
Under a plausible assumption that \(p=0.01,p_{\mathrm{def}}\sim0.01,C_{\mathrm{max}}/{\epsilon}\sim 0.01\), the left hand side of (42) is of order 10^{8}, and therefore the quantum method is promising to be advantageous when \(N_{\mathrm{obl}}\ll10^{8}\), which is usually satisfied. In the case that \(N_{\mathrm{gr}}\ll N_{\mathrm{obl}}\), which means that we need CVaR contributions not for individual obligors but for some obligor groups, the quantum method becomes more advantageous.
4 Summary
In this paper, we considered application of quantum algorithms to CVaR contribution calculation, which is an important problem in financial risk management but has not been focused in the context of quantum computing. We clarified how to apply the recent quantum algorithm for multiple expected value estimation [30] to this problem as estimation of many conditional expected value, constructing the oracles needed in the algorithm with fixedpoint QAA [33]. We then evaluated the numbers of queries to the buildingblock oracles, arithmetic operations, controlled rotation and SN state generation, as (19) and (20). In terms of query complexity, the proposed method achieves quantum quadratic speedup with respect to the accuracy ϵ, but the scaling of complexity on the number of obligor groups \(N_{\mathrm{gr}}\) is better in the classical method. This means that, for small ϵ and \(N_{\mathrm{gr}}\), the proposed method becomes advantageous against the classical method. We saw that, even when we calculate CVaR contributions for all the individual obligors, which is most disadvantageous for the quantum method, its query complexity is smaller than the classical method in some plausible setting.
But, unfortunately, it is obvious that the need for risk contributions of many finely divided obligor groups, which enable a bank to analyze the risk in details, reduces the quantum advantage compared with calculating only the risk measures for the entire portfolio, which was originally considered in [18]. As future works, not only for credit risk management but also for other types of financial problems, we should extend discussion on quantum computing application to various problem settings arising in practice and scrutinize the degree of quantum advantage.
Availability of data and materials
Not applicable.
Notes
\(\widetilde{O}(\cdot)\) denotes \(O(\cdot)\) in the bigO notation with some logarithmic factors hidden.
An exposure of an obligor is the amount of loss that occurs when it defaults. It is expressed as the product of the loan amount and the loss given default (LGD), the fraction of the amount which is not recovered. Although the LGD is sometimes modeled as a random variable, it is treated as a constant and therefore so is the exposure in this paper.
Although the model with multiple systematic risk factors are often used, we consider the singlefactor case for simplicity in this paper. Extending the discussion in this paper to the multifactor case is straightforward.
Abbreviations
 VaR:

value at risk
 CVaR:

conditional value at risk
 QAA:

quantum amplitude amplification
 LGD:

loss given default
 CDF:

cumulative distribution function
References
Orus R et al.. Quantum computing for finance: overview and prospects. Rev Phys. 2019;4:100028.
Egger DJ et al.. Quantum computing for finance: state of the art and future prospects. IEEE Trans Quantum Eng. 2020;1:3101724.
Bouland A, et al. Prospects and challenges of quantum finance. 2020. arXiv:2011.06492.
Herman D, et al. A Survey of Quantum Computing for Finance. 2022. arXiv:2201.02773.
Fischer M, Moser T, Pfeuffer M. A discussion on recent risk measures with application to credit risk: calculating risk contributions and identifying risk concentrations. Risks. 2018;6(4):142.
Glasserman P. Monte Carlo methods in financial engineering. Berlin: Springer; 2003.
Montanaro A. Quantum speedup of Monte Carlo methods. Proc R Soc Lond Ser A. 2015;471:2181.
Suzuki Y et al.. Amplitude estimation without phase estimation. Quantum Inf Process. 2020;19:75.
Herbert S. Quantum MonteCarlo integration: the full advantage in minimal circuit depth. Quantum. 2022;6:823.
Brassard G et al.. Quantum amplitude amplification and estimation. Contemp Math. 2002;305:53.
Aaronson S, Rall P. Quantum approximate counting, simplified. In: Proceedings of symposium on simplicity in algorithms. Philadelphia: SIAM; 2020. p. 24–32.
Nakaji K. Faster amplitude estimation. Quantum Inf Comput. 2020;20:1109.
GiurgicaTiron T, et al.. Low depth algorithms for quantum amplitude estimation. Quantum. 2022;6:745.
Grinko D et al.. Iterative quantum amplitude estimation. npj Quantum Inf. 2021;7:52.
Tanaka T et al.. Amplitude estimation via maximum likelihood on noisy quantum computer. Quantum Inf Process. 2021;20:293.
Uno S et al.. Modified Grover operator for amplitude estimation. New J Phys. 2021;23:083031.
Wang G et al.. Bayesian inference with engineered likelihood functions for robust amplitude estimation. PRX Quantum. 2021;2:010346.
Egger DJ et al.. Credit risk analysis using quantum computers. IEEE Trans Comput. 2020;70(12):2136.
Miyamoto K, Shiohara K. Reduction of qubits in a quantum algorithm for Monte Carlo simulation by a pseudorandomnumber generator. Phys Rev A. 2020;102:022424.
Kaneko K et al.. Quantum speedup of Monte Carlo integration with respect to the number of dimensions and its application to finance. Quantum Inf Process. 2021;20:185.
Litterman R. Hot spots and hedges. J Portf Manag. 1996;23(5):52.
Tasche D. Risk contributions and performance measurement. 1999. Working paper. Zentrum Mathematik (SCA), TU München.
Kurth A, Tasche D. Contributions to credit risk. Risk. 2003;16(3):84.
Kalkbrener M. An axiomatic approach to capital allocation. Math Finance. 2003;15:425.
Kalkbrener M, Lotter H, Overbeck L. Sensible and efficient capital allocation for credit portfolios. Risk. 2004;17(1):S19–S24.
Glasserman P. Measuring marginal risk contributions in credit portfolios. 2005. FDIC Center for Financial Research Working Paper 200501.
Martin R, Thompson K, Browne C. VaR: who contributes and how much? Risk. 2001;14(8):99.
Muromachi Y. A conditional independence approach for portfolio risk evaluation. J Risk. 2004;7(1):27.
Muromachi Y. Improved estimation methods for valueatrisk, expected shortfall and risk contributions with high precision. J Risk. 2015;17(6):1.
Cornelissen A, Hamoudi Y, Jerbi S. Nearoptimal quantum algorithms for multivariate mean estimation. In: Proceedings of the 54th Symposium on Theory of Computing (STOC). 2022. p. 33.
Huggins WJ, et al. Nearly Optimal Quantum Algorithm for Estimating Multiple Expectation Values. 2021. arXiv:2111.09283.
Merton RC. On the pricing of corporate debt: the risk structure of interest rates. J Finance. 1974;29:449.
Yoder TY, Low GH, Chuang IL. Fixedpoint quantum search with an optimal number of queries. Phys Rev Lett. 2014;113:210501.
Vedral V, Barenco A, Ekert A. Quantum networks for elementary arithmetic operations. Phys Rev A. 1996;54:147.
Beckman D et al.. Efficient networks for quantum factoring. Phys Rev A. 1996;54:1034.
Draper TG. Addition on a quantum computer. 2000. arXiv:quantph/0008033.
Cuccaro SA et al.. A new quantum ripplecarry addition circuit. In: Proceeding of the eighth workshop on quantum information processing. 2004.
Takahashi Y, Kunihiro N. A linearsize quantum circuit for addition with no ancillary qubits. Quantum Inf Comput. 2005;5(6):440.
Draper TG et al.. A logarithmicdepth quantum carrylookahead adder. Quantum Inf Comput. 2006;6(4):351.
AlvarezSanchez JJ, AlvarezBravo JV, Nieto LM. A quantum architecture for multiplying signed integers. J Phys Conf Ser. 2008;128:012013.
Takahashi Y, Kunihiro N. A fast quantum circuit for addition with few qubits. Quantum Inf Comput. 2008;8(6):636.
Takahashi Y, Tani S, Kubihiro N. Quantum addition circuits and unbounded fanout. Quantum Inf Comput. 2010;10(9&10):872.
Babu HMH. Costefficient design of a quantum multiplieraccumulator unit. Quantum Inf Process. 2016;16(1):30.
Jayashree HV et al.. Ancillainput and garbageoutput optimized design of a reversible quantum integer multiplier. J Supercomput. 2016;72(4):1477.
MuñozCoreas E, Thapliyal H. Quantum circuit design of a Tcount optimized integer multiplier. IEEE Trans Comput. 2019;68(5):729.
Abramowitz M, Stegun I. Handbook of mathematical functions with formulas, graphs, and mathematical tables. New York: Dover; 1964.
Khosropour A, Aghababa H, Forouzandeh B. Quantum division circuit based on restoring division algorithm. In: Proceedings of 2011 eighth international conference on information technology: new generations (ITNG). 2011. p. 1037.
Jamal L, Babu HMH. Efficient approaches to design a reversible floating point divider. In: Proceedings of 2013 IEEE international symposium on circuits and systems (ISCAS). 2013. p. 3004.
Dibbo SV, Babu HMH, Jamal L. An efficient design technique of a quantum divider circuit. In: Proceedings of 2016 IEEE international symposium on circuits and systems (ISCAS). 2016. p. 2102.
Thapliyal H et al.. Quantum circuit designs of integer division optimizing Tcount and Tdepth. IEEE Trans Emerg Top Comput. 2019;9(2):1045.
Häner T, Roetteler M, Svore KM. Optimizing Quantum Circuits for Arithmetic. 2018. arXiv:1805.12445.
MuñozCoreas E, Thapliyal H. Tcount and qubit optimized quantum circuit design of the nonrestoring square root algorithm. ACM J Emerg Technol Comput Syst. 2018;14(3):36.
Grover L, Rudolph T. Creating superpositions that correspond to efficiently integrable probability distributions. 2002. arXiv:quantph/0208112.
Sanders YR. Blackbox quantum state preparation without arithmetic. Phys Rev Lett. 2019;122:020502.
Kaneko K et al.. Quantum pricing with a smile: implementation of local volatility model on quantum computer. EPJ Quantum Technol. 2022;9:7.
MarinSanchez G, GonzalezConde J, Sanz M. Quantum algorithms for approximate function loading. 2021. arXiv:2111.07933.
Zhu D et al.. Training of quantum circuits on a hybrid quantum computer. Sci Adv. 2019;5:eaaw9918.
Zoufal C, Lucchi A, Woerner S. Quantum generative adversarial networks for learning and loading random distributions. npj Quantum Inf. 2019;5:103.
Chakrabarti S et al.. A threshold for quantum advantage in derivative pricing. Quantum. 2021;5:463.
Nakaji K et al.. Approximate amplitude encoding in shallow parameterized quantum circuits and its application to financial market indicator. Phys Rev Res. 2022;4:023136.
Alcazar J et al.. Quantum algorithm for credit valuation adjustments. New J Phys. 2022;24:023036.
Acknowledgements
Not applicable.
Funding
This work was supported by MEXT Quantum Leap Flagship Program (MEXT QLEAP) Grant Number JPMXS0120319794.
Author information
Authors and Affiliations
Contributions
KM as the sole author of the manuscript, conceived, designed and performed the analysis; he also wrote and reviewed the paper. The author read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Appendix: Proof of (37)
Appendix: Proof of (37)
Let \(\mathbb{P}_{0}\) be a probability measure on the measurable space \((\Omega,2^{\Omega})\) such that
for each \(\omega=(i,y_{1},\ldots,y_{N_{\mathrm{obl}}})\in\Omega\). For each \(K\in[N_{\mathrm{gr}}]\), the variances of \(\xi_{K}\) with respect to \(\mathbb{P}_{0}\) is equal to \((\sigma_{K})^{2}\), and written as
where \(\Omega_{\ge v}:= \{(i,y_{1},\ldots,y_{N_{\mathrm{obl}}})\in\Omega  \sum_{k=1}^{N_{\mathrm{obl}}}e_{k}y_{k}\ge v \}\). On the other hand, since \(\mathbb{P}(\omega)=(1\epsilon^{\prime})\mathbb{P}_{0}(\omega)\) for \(\omega\in\Omega_{\ge v}\), we have
In (45), at the inequality, we use (25) and \(\sum_{\omega\in\Omega_{\ge v}} \mathbb{P}_{0}(\omega) (\xi_{K}( \omega))^{2} \ge (\sum_{\omega\in\Omega_{\ge v}} \mathbb{P}_{0}(\omega) \xi_{K}(\omega) )^{2}\), which follows from the fact that the variance \((\sigma_{K})^{2}\) is nonnegative. Then, applying \(\xi_{K}(\omega)\le E_{\mathrm{max}}\), (24) and (25) to (45), we obtain
which implies \((\widetilde{\sigma}_{\mathrm{max}})^{2} \le2(\sigma_{\mathrm{max}})^{2}\).
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Miyamoto, K. Quantum algorithm for calculating risk contributions in a credit portfolio. EPJ Quantum Technol. 9, 32 (2022). https://doi.org/10.1140/epjqt/s4050702200153y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1140/epjqt/s4050702200153y
Keywords
 Quantum algorithm
 Financial risk management
 Multiple expected value estimation