Digital Bank Runs: A Deep Neural Network Approach

: The introduction of Central Bank Digital Currency (CBDC) could represent a deep structural change to the ﬁnancial sector, and in particular to the banking sector. This paper proposes a Deep Neural Network (DNN) design to model the introduction of CBDC and its potential impact on commercial banks’ deposits. The model proposed forecasts the likelihood of the occurrence of bank runs as a function of the system characteristics and of the intrinsic features of CBDC. The success rate of CBDC and the impact on the banking sector is highly dependent on its design. Whether CBDC should carry any form of interest, if the amount of CBDC should be capped by account or if convertibility from banks’ deposits should be guaranteed by commercial banks are important features to consider. Further, the design of CBDC needs to contribute to enhancing the sustainability of the ﬁnancial system, hence a CBDC design that promotes ﬁnancial inclusion is paramount. The model is initially calibrated with Euro area system data. Results show that an increase in the ﬁnancial system risk perception would trigger a signiﬁcant transfer of wealth from bank deposits to CBDC, while the wealth transfer to CBDC is to a lesser extent also sensitive to its interest rate. CBDC interest rate and Financial System Risk.


Introduction
Central Bank Digital Currency (CBDC) can be understood as a new form of central bank money that is different from the two types of money currently issued by central banks, which are physical cash and reserves. CBDC would represent a digital form of money, denominated in the national unit of account that is a direct liability of the central bank and intended to serve as legal tender [1,2].
The concept of public access to Central Bank deposit accounts is not by any means new, with the first public bank in Europe being the Taula de Canvi de Barcelona in 1401 which offered the possibility of opening deposit accounts to the population [3]. A walk through the first types of central bank money suggests that broadly accessible central bank deposits were the original form of central bank monetary liabilities. Neither banknotes nor commercial bank deposits were the common form of money over the last centuries, with the current limitation for the general population to access central bank accounts being introduced less than a century ago [4].
The introduction of CBDC could have important implications regarding the sustainability of the financial system, and in particular about financial inclusion. Indeed, Central Banks seem to consider financial inclusion as one of the most relevant reasons which support the introduction of CBDC [5]. This shows the strong link between CBDC and sustainability and leads us to consider financial inclusion as a key parameter when designing a CBDC.
We note that several countries and regions have concluded or are currently engaged in experiments and pilot tests to better understand the implications of introducing CBDC, including Ecuador, Ukraine, Uruguay, Bahamas, Cambodia, China, the Eastern Caribbean Currency Union, Korea, and Sweden [6]. In particular, the experiment to introduce CBDC academic articles on the subject, a passionate debate is building up between defendants and opponents to the introduction of CBDC. This paper focuses on the implications of CBDC for the banking sector, and in particular, it focuses on bank runs.
The traditional banking business model, in which maturity transformation is at the core of its activity, is intrinsically fragile due to the threat of a sudden and significant number of deposit withdrawals taking place in a short time frame, which could lead to a shortfall in liquidity deriving into insolvency [21]. This mechanism, known as a bank run, has been widely studied in academic literature [22][23][24].
This work explores the concept of Digital Bank Run, understood as a bank run that takes place in a commercial bank where depositors (retail and wholesale) withdraw their deposits and place them in digital currencies. In particular, this work focuses on the different designs that could shape CBDC to understand and minimize the risks for the financial sector. The design of CBDC is still under discussion, and the final characteristics of it will determine its failure or success. In line with this, the literature has identified several important features of CBDC that is worth exploring, such as (i) adding limits to the amount of CBDC that could be stored by account, (ii) allowing CBDC to carry positive or negative interest rates, and (iii) warranting commercial banks' services to offer full convertibility from banks' deposits to CBDC, amongst others [25]. In this paper, we explore the likelihood of digital bank runs, testing different CBDC designs, varying its interest rates and under different levels of systemic risk.
In line with the above, understanding the potential effects of each of these features is paramount in assessing the impact of the introduction of CBDC on the financial sector. This work contributes to this complex task by designing a scalable Neural Network framework based on Deep Learning techniques initially calibrated with system-wide Euro area data. To the best of the authors' knowledge, this work represents an innovative approach to assessing how the different designs of CBDC could impact the banking sector.
We note that the ultimate goal of this work is to show the adequacy of Deep Neural Networks (DNN) as a tool to analyze the impact of the introduction of CBDC, rather than obtaining numeric conclusions from the specific scenario under analysis in the results section.
After this brief introduction, this paper is organised as follows. Section 2 comments on the impacts of CBDC on the banking sector, focusing particularly on the phenomena of bank runs. Section 3 presents the Deep Learning Neural Network model and describes the different scenarios and data used to calibrate the model. Section 4 presents the results, followed by the discussion section. Finally, Section 6 concludes.

Theoretical Background
Understandably, the introduction of CBDC could entail significant structural changes in the banking sector, which will vary very much depending on the features and the design of the CBDC.
The introduction of CBDC could lead to a disciplining effect on banks, which means that banks would be under the constant threat of bank runs [8]. In line with this, it could be understood that CBDC will have an impact on commercial bank business models, with expected flows of commercial bank deposits into CBDC. This could lead banks to prevent a loss of deposits by increasing interest rates offered in customer deposits, which could lead banks to seek alternatives to maintain profitability such as raising lending costs and increasing fees, ultimately leading to a reduction on banks' balance sheets [2]. The introduction of CBDC could facilitate the transfer of deposits from commercial banks to Central Banks since CBDC could be perceived as a risk-free option to store and protect wealth in economic stressed scenarios [26].
The current literature has briefly explored the steps that could be taken to limit the risk of bank runs as a result of the introduction of CBDC by adding frictions discouraging large amounts of deposit transfers from commercial banks to Central Banks. These frictions include limiting or capping the maximum amount to be deposited in CBDC accounts, Sustainability 2021, 13, 1513 4 of 18 adopting a flexible approach with different tiers regarding the interest paid on CBDC deposits, or imposing fees on large amounts deposited in CBDC accounts [27]. Other proposals include limitations such as removing the requirement for banks to convert deposits to CBDC [25]. The authors of that paper suggest a set of core principles for CBDC, including (i) CBDC paying an adjustable interest rate, (ii) CBDC and reserves to be distinct and not convertible to one another, (iii) no guaranteed on-demand convertibility of bank deposits into CBDC, and (iv) central bank can only issue CBDC against eligible securities such a government bond. The authors suggest that by following these principles the introduction of CBDC should not necessarily impact neither banks' provision of credit to borrowers nor banks' provision of liquidity to depositors.
Next, we briefly describe some of the key features of CBDC. The model proposed in this paper allows the simulation of the potential impact of the different combination of features and its potential impact on the distribution of wealth between cash, commercial bank deposits, other financial assets and CBDC. In other words, the DNN proposed in this work allows us to understand the transfer of funds from commercial bank deposits to CBDC under different scenarios, and hence to assess the likelihood of a bank run depending on the design of the CBDC.

•
Interest on CBDC: We could see CBDC without interest as a partial substitute of cash, while a CBDC with interest could be rather seen as a substitute of commercial bank deposits. However, in times of economic stress, we could expect depositors to convert commercial bank deposits into CBDC even if CBDC rate is set at zero (or negative). This differs from depositors converting their commercial bank deposits into cash, since holding significant amounts of cash entails non-negligible storage risks (or costs). One of the hypotheses of this work is the use of CBDC interest (positive, zero, or negative) to counterbalance the increased risks linked to bank runs. This hypothesis has been tested and the results are shown and discussed in Section 5 of this paper.

•
Limit the amount of CBDC per account: The limit on holdings of CBDC by account could potentially limit the value and number of transactions that could be made using CBDC, and hence, reduce the effectiveness of CBDC as a payment system [18]. However, limiting the holdings of CBDC would, to some extent, potentially mitigate the risk of digital bank run. This feature can be easily integrated into the proposed model by just capping the CBDC output to a given value. This is also discussed later in Section 5.

•
Convertibility of bank deposits into CBDC: Focusing on a new system where CBDC will coexist with commercial bank deposits and cash, [25] consider the no guaranteed on-demand convertibility of commercial bank deposits into CBDC as one of the key features of CBDC. As the authors describe, making the conversion credible even in stressed situations would involve the central bank also guaranteeing convertibility, which would lead the central bank to provide CBDC against bank commercial deposits.
Kumhof and Noone consider that as long as there is a market where commercial bank deposits can be traded against CBDC and CBDC eligible securities (such as government bonds), there would be no need to force commercial banks to accept a guaranteed convertibility of bank deposits into CBDC. However, this proposal has been criticized by other authors, who suggest that this goes against one of the basic principles of CBDC to safeguard the confidence in commercial banks' deposits and the financial system itself, hence potentially having spillover effects to the wider economy [13,27]. This could be implemented in the model proposed in this paper by adding a new input for each financial asset which would model the degree of convertibility. These inputs would equal 1 if commercial banks are required to fully convert deposits into CBDC on demand, while will decline as the difficulty to convert a financial asset into CBDC (and vice-versa) increases. • Full migration of commercial bank deposits into CBDC: Some researchers propose the phase-out of all commercial bank deposits into CBDC, or what is known as sovereign money [28]. The model proposed in this work could also introduce this variant by phasing-out (or switching instantly) commercial bank deposits into CBDC. However, this paper does not go down this route since the matter of full migration of commercial bank deposits into CBDC is out of the scope of this analysis.
Our work concurs with most of the current academic literature in the field of CBDC stressing the importance of the design and features of the CBDC [25,29]. Academic literature shows that prediction algorithms based on artificial intelligence have a wide range of applications and generally the results obtained are superior to those obtained through traditional statistical methods when applied to financial analyses [30,31]. In order to allow testing of the different CBDC features in a safe environment, this work presents an artificial intelligence model, based on deep learning, that allows the development of this task. The next section briefly explains the methodology applied and describes the different scenarios.

Materials and Methods
Financial prediction analyses are of great practical and theoretical interest. However, they are notoriously difficult, primarily driven by the non-linear and complex interactions in the data. Most of the mathematical techniques used in the field of computational finance for financial prediction use parametric and non-parametric statistical techniques [32]. An important limiting factor in the performance of statistics-based techniques in computational finance is the uncertainty inherent in any financial transaction, which leads to less accurate statistics-based financial models.
During the past few years, DNNs have achieved enormous success in many data prediction fields such as speech recognition, computer vision, or natural language processing, to name but a few. In this paper, we apply deep learning methods to forecast the likelihood of the occurrence of bank runs as a function of the intrinsic features of CBDC and also external factors such as systemic risk. The proposed deep learning-based model has several advantages over traditional statistical methods, which include (i) input data can be expanded to include all items of possible relevance to the predictor model; (ii) fewer assumptions than statistical models, which allow the model to be more generalizable; and (iii) non-linearities and complex interactions among input data are modelled by the deep learning models, which can help increase in-sample fit versus traditional models.

Method: Deep Neural Network Architecture
In this section, we describe the details of the Deep Neural Network (DNN) model we train to assess the likelihood of bank run when the CBDC is introduced. First, we provide the details of the DNN model and then we provide the details of the training and evaluation.
A DNN consists of multiple fully-connected (FC) layers: an input layer, one or multiple hidden layers, and a single output layer [33]. DNNs have a single input layer and a single output layer, and the number of neurons (also referred as units) in the input layer equals the number of input variables in the data being processed. The number of neurons in the output layer equals the number of outputs associated with each input.
In a FC layer, all output activations are composed of a weighted sum of all input activations (i.e., all outputs are connected to all inputs). More specifically, for each hidden unit k, a non-linear activation function f (·) is used to map all inputs from the lower layer, x k , to a scalar state, y k , which is then fed to the upper layer y k = f (x k ), where x k = b k + ∑ i y i w ik and b k is the bias unit k, i is the unit index of the lower layer and w ik is the weight of the connection between the unit k and i in the layer below. In this work, we select the leaky rectified linear unit (ReLU) as the activation function f (·) for the hidden layers and the Softmax function for the output layer: The neurons of the network jointly implement a complex non-linear mapping from the input to the output. This mapping is learned from the data by adapting the weights of each neuron using the back-propagation algorithm.
In this study, DNN is used as a multivariate regression model to learn the mapping function between the input vector, which in our case is composed of the interest and risk parameters of each one of the financial assets, and the output vector, which are the final weights or amounts allocated to each one of the financial assets given the interest-risk pairs for each asset. Figures 1-6 show an example of the proposed architectures. Color code used in the figures below is black for Cash, blue for Deposits, red for CBDC and green for other Financial Assets.
Sustainability 2021, 13, x FOR PEER REVIEW 6 The neurons of the network jointly implement a complex non-linear mapping f the input to the output. This mapping is learned from the data by adapting the weigh each neuron using the back-propagation algorithm.
In this study, DNN is used as a multivariate regression model to learn the mapp function between the input vector, which in our case is composed of the interest and parameters of each one of the financial assets, and the output vector, which are the f weights or amounts allocated to each one of the financial assets given the interest pairs for each asset. Figures 1-6 show an example of the proposed architectures. C code used in the figures below is black for Cash, blue for Deposits, red for CBDC green for other Financial Assets.   The neurons of the network jointly implement a complex non-linear mapping from the input to the output. This mapping is learned from the data by adapting the weights of each neuron using the back-propagation algorithm.
In this study, DNN is used as a multivariate regression model to learn the mapping function between the input vector, which in our case is composed of the interest and risk parameters of each one of the financial assets, and the output vector, which are the final weights or amounts allocated to each one of the financial assets given the interest-risk pairs for each asset. Figures 1-6 show an example of the proposed architectures. Color code used in the figures below is black for Cash, blue for Deposits, red for CBDC and green for other Financial Assets.          Regarding the initialization of weights, to prevent the layer activation outputs from exploding or vanishing during a forward pass through a deep neural network, all weights and biases have been initialized using the Kaiming initialization [34].
Regarding the loss function, in regression problems, the typical loss function used is the L2 norm of the residual, which during backpropagation produces a gradient whose magnitude is linearly proportional to this difference [35]. This means that estimated values that are close to the ground-truth (i.e., inliers) have little influence during backpropagation, but on the other hand, estimated values that are far from the ground truth (i.e., outliers) can bias the whole training process given the high magnitude of their gradient. To overcome this limitation, we used the Huber's loss function, which is a robust loss function that behaves quadratically for small residuals and linearly for large residuals [36].
Next, we briefly describe the training and validation processes followed. We split the data set into three subsets: (i) training, (ii) validation, and (iii) test. The training set is used to adjust the weights of the network. The validation set is used to minimize overfitting and relates to the architecture design (i.e., the selection of hidden layers and neurons). Finally, the test set is used to assess the actual predictive power of the DNN. For all experiments, we used five-fold cross validation to obtain the optimal model and a grid search strategy to optimize the hyper-parameters, including the learning rate, and the number of hidden layers.
Finally, the mean squared error (MSE), the mean absolute error (MAE), the mean absolute percentage error (MAPE), and the coefficient of determination (R2) were calculated and tabulated to evaluate the performance of the model.

Data
The model has been trained using Euro area aggregate data. Data has been obtained directly from Euro area databases, in particular from the European Central Bank Statistical Data Warehouse. Monthly data from January 2003 until October 2020 has been used to train, validate and test the model.
Regarding the inputs, for each element, an interest-risk pair has been defined. Initially, the following levels for each input have been set: The interest rate of cash has been set at 0%. R C : Risk perception of cash has been set at 0. Note that for simplicity reasons, storage risks are not considered. I D_House : Interest paid by commercial bank deposits to households is obtained as the average interest paid for sight and term household deposits across European countries. R D_House : We use the ESRB Composite Indicator of Systemic Stress (CISS) to measure the risk perception linked to commercial bank deposits (households). In particular, the CISS measures the level of stress in the financial system as a whole [37]. However, any other risk perception metric could be used instead. I D_Corp : Interest paid to corporate deposits is obtained as the average interest paid for sight and term corporate deposits across European countries. R D_Corp : Risk perception linked to commercial bank deposits (corporates). We use the same risk indicator as for household deposits (CISS). I CBDC : Interest CBDC, which can be set at zero, negative, or positive rates. R CBDC : Risk perception of CBDC, which is set at zero in this work. Regarding the outputs, the following magnitudes are used: C: an estimate of the total amount of cash hold as a store of value. Citizens do also hold cash as a store of value. Studies from the European Central Bank show that on average 24% of European citizens hold cash outside a bank account as a precautionary reserve, based on a large sample of European respondents during 2015 and 2016 [38]. Estimating the share of cash used as a store of value is not an easy task, and a significant number of assumptions need to be made. By assuming that the holdings of cash as a store of value is the total amount of cash in circulation with the amount being used for transaction purposes deducted, held by financial institutions or held abroad, the European Central Bank estimates that more than one-third of the total Euro banknotes in circulation may be in use as a store of value [39]. The total amount of banknotes in circulation amounted to €1,394 bn as of October 2020, while the amount of coins totaled €30 bn as per ECB Statistical Data Warehouse. Assuming a third is being held as a store of value, in line with the ECB findings, this leads to an amount of c.€430bn. A similar study was conducted in Germany, where the main reasons for storing cash were analysed, these being (i) low-interest rate level, (ii) most common means of payment, (iii) cash works even if technology fails, (iv) no fees, and (v) anonymity [40]. D House : the total amount of household bank deposits in the Euro area. Household total deposits in Euro area commercial banks amounted to €8,210 bn as of October 2020. D Corp : the total amount of corporate bank deposits in the Euro area. Corporate deposits in Euro area commercial banks amounted to €3,120 bn as of October 2020. CBDC: when CBDC is included in the model (from Model 3 onwards) and given that no real data regarding holdings of CBDC exist, we have trained the model using different initial cases leading to a wide range of CBDC values, allowing us to simulate several scenarios. The DNN proposed in this paper will allow users to modify the CBDC inflow hypothesis easily.
As of October 2020, the split between cash, household deposits and corporate deposits was as follows: (i) cash 3.6%, (ii) Household deposits 69.8%, and (iii) Corporate deposits 26.5%. According to the methodology described, this has been used as an output. Regarding the inputs, as of October 2020 the I C and R C were set at zero, the I D_House was 0.14% while the I D_Corp was −0.01%. The R D_House and R D_Corp were set at 0.11 according to the ESRB Composite Indicator of Systemic Stress. This inputs-outputs combination was only one of the 315 samples used to train and test the model. In particular, the model has been trained using 251 samples which correspond to monthly values of the different series, while it has been tested using 64 samples. Both the CBDC inputs and expected outputs have been set across a wide range of scenarios as shown in the results section. The methodology proposed allows us to analyze a high number of different cases which should allow policymakers and other relevant authorities to assess the strengths and weaknesses of the different potential designs of CBDC.

Model Description and Scenarios
The model proposed is composed of four elements: (i) Cash, (ii) Household commercial bank deposits, (iii) Corporate commercial bank deposits, and (iv) CBDC. This model uses two key characteristics of a financial asset as inputs: (i) Interest (or expected yield), and (ii) Risk (or expected volatility), while the outputs represent the allocation of the total wealth of a closed economy between the different elements or financial assets mentioned above. The elements of the model and the number of inputs per element can be easily expanded following the same logic as presented later in this work. The model assumes a closed economy, with citizens and businesses having direct claims against the Central Bank when holding CBDC. Figure 1 shows a visual representation of the model, assuming only one commercial bank in the system, where the outputs are: C: Total wealth amount or percentage allocated in cash as a store of value. D House : Total wealth amount or percentage allocated to household commercial bank deposits. D Corp : Total wealth amount or percentage allocated to corporate commercial bank deposits. CBDC: Total wealth amount or percentage allocated to CBDC. Note that when the outputs are expressed as percentages, the following expression is true.
Regarding the inputs, we assign an interest and a risk level to each financial asset, where I C : Interest paid by cash. R C : Risk perception of cash. I D_House : Interest paid by commercial bank deposits to households. R D_House : Risk perception linked to commercial bank deposits (households). I D_Corp : Interest paid by commercial bank deposits to corporates. R D_Corp : Risk perception linked to commercial bank deposits (corporates). I CBDC : Interest paid by CBDC, which can be set at zero, negative, or positive rates. R CBDC : Risk perception of CBDC.
As described above, we assign an interest and a risk level to each financial asset, while the outputs represent the allocation of the total wealth of a closed economy between the different financial assets.
Next, we briefly describe the different scenarios that lead to the design of the DNN proposed in this paper, while also showing the block approach followed, which suggests that it is relatively straightforward to add new elements to the model if data to calibrate the new inputs/outputs is available. Figure 2 presents a simplification of the system, where cash and commercial bank deposits are the only available financial assets to store wealth. In this model, there is no distinction between household and corporate deposits, and the system is set up with a generic commercial bank that centralizes the total customer deposits outstanding. In this scenario, only cash competes with commercial bank deposits.
Next, we make a distinction between corporate and household deposits, which increases the granularity. Further, when increasing the number of inputs/ outputs we added a hidden layer in the design of the DNN. This model enables a simplified representation of a closed economy where the options for customers remain limited to cash or commercial bank deposits. In this system, changes in the risk perception and interest rates could lead to transfers of commercial bank deposits into cash, and vice-versa. This model was calibrated and trained with Euro area aggregate data, which allowed us to understand the sensitivities of the different types of depositors and cash to interest rates and systemic risk perception. These results are not included in this paper, since the focus of this work is to analyze the impact linked to the introduction of CBDC. However, the DNN used in Scenario 2 and trained with the abovementioned data is available upon request by contacting the authors of this paper. The next step is the introduction of CBDC, which represents a disruptive event in the system. Figure 4 represents a simple framework to analyze the wealth transfer amongst financial assets when introducing CBDC. This system allows the testing of different CBDC designs including interest rate set at positive, negative or zero levels as well as potential limits to the holdings of CBDC per account. In particular, the difference between the previous model and this one is the introduction of the element CBDC, which is represented by two new inputs and a new output. The DNN is designed with eight inputs, a hidden layer composed of six nodes and four outputs. This is the scenario that has been used as an example in the results section, as we describe later.
Despite the empirical work of this paper focusing on Scenario 3, the next step could be to add a new element defined as Financial Asset (FA), which represents households and corporations' holdings of bonds, equities and/or other financial assets. The introduction of FA opens the door to several substitutes of commercial bank deposits, ranging from cash to CBDC or financial assets. The design of the DNN proposed in this work makes it relatively simple to add new elements as mentioned above. Figure 6 represents a generalization of the model developed in this paper, where competition amongst banks has been introduced. This model allows banks to set different deposit rates, and each bank to have a different risk perception level. This model would therefore simulate both systemic bank runs, and also idiosyncratic bank runs with the presence of CBDC.

Results
In this section, we disclose and discuss the results of this analysis. As mentioned in the previous section, this paper focuses on Scenario 3. This experiment focuses on understanding the sensitivity of depositors to switch from commercial bank deposits into CBDC under different CBDC designs and system configurations. In particular, we analyze the impact of designing CBDC with positive, negative or zero interest rates. We also analyze the wealth transfer from deposits to CBDC under different levels of systemic risk. Python 3.6+, PyTorch 1.7+ and scikit-learn 0.22+ are used to perform the analyses. To optimize the loss function we used the Adam optimizer, with the momentum set to 0.9 and the learning rate to 0.07. The models were trained for 200 iterations on an NVIDIA GeForce GTX TITAN GPU and the model with the lowest MAE (on the validation set) was selected. The network training required 2 min per epoch on average and it took 0.52 milliseconds on average to process a case during testing. The source code is available at https://github.com/estherpuyol/CBDC_model.git.
With regard to the validation results, the MSE, MAE, MAPE and R2 are provided in Figure 7. The loss change during training is shown in Figure 8. The system has a low MAE and MAPE, with also a strong regression coefficient R2. Figure 6 represents a generalization of the model developed in this paper, where competition amongst banks has been introduced. This model allows banks to set different deposit rates, and each bank to have a different risk perception level. This model would therefore simulate both systemic bank runs, and also idiosyncratic bank runs with the presence of CBDC.

Results
In this section, we disclose and discuss the results of this analysis. As mentioned in the previous section, this paper focuses on Scenario 3. This experiment focuses on understanding the sensitivity of depositors to switch from commercial bank deposits into CBDC under different CBDC designs and system configurations. In particular, we analyze the impact of designing CBDC with positive, negative or zero interest rates. We also analyze the wealth transfer from deposits to CBDC under different levels of systemic risk.
Python 3.6+, PyTorch 1.7+ and scikit-learn 0.22+ are used to perform the analyses. To optimize the loss function we used the Adam optimizer, with the momentum set to 0.9 and the learning rate to 0.07. The models were trained for 200 iterations on an NVIDIA GeForce GTX TITAN GPU and the model with the lowest MAE (on the validation set) was selected. The network training required 2 min per epoch on average and it took 0.52 milliseconds on average to process a case during testing. The source code is available at https://github.com/estherpuyol/CBDC_model.git.
With regard to the validation results, the MSE, MAE, MAPE and R2 are provided in Figure 7. The loss change during training is shown in Figure 8. The system has a low MAE and MAPE, with also a strong regression coefficient R2.    Figure 6 represents a generalization of the model developed in this paper, where competition amongst banks has been introduced. This model allows banks to set different deposit rates, and each bank to have a different risk perception level. This model would therefore simulate both systemic bank runs, and also idiosyncratic bank runs with the presence of CBDC.

Results
In this section, we disclose and discuss the results of this analysis. As mentioned in the previous section, this paper focuses on Scenario 3. This experiment focuses on understanding the sensitivity of depositors to switch from commercial bank deposits into CBDC under different CBDC designs and system configurations. In particular, we analyze the impact of designing CBDC with positive, negative or zero interest rates. We also analyze the wealth transfer from deposits to CBDC under different levels of systemic risk.
Python 3.6+, PyTorch 1.7+ and scikit-learn 0.22+ are used to perform the analyses. To optimize the loss function we used the Adam optimizer, with the momentum set to 0.9 and the learning rate to 0.07. The models were trained for 200 iterations on an NVIDIA GeForce GTX TITAN GPU and the model with the lowest MAE (on the validation set) was selected. The network training required 2 min per epoch on average and it took 0.52 milliseconds on average to process a case during testing. The source code is available at https://github.com/estherpuyol/CBDC_model.git.
With regard to the validation results, the MSE, MAE, MAPE and R2 are provided in Figure 7. The loss change during training is shown in Figure 8. The system has a low MAE and MAPE, with also a strong regression coefficient R2.   Once the model has been successfully calibrated, we used the DNN to simulate how the wealth distribution amongst the different financial assets would change with the introduction of CBDC. In particular, Figure 9 shows depositors' sensitivity to CBDC interest rate under three scenarios: (i) zero interest rate on CBDC, (ii) positive CBDC interest rate set at 0.5%, and (iii) positive CBDC interest rate set at 1.0%. The first two rows represent the October 2020 wealth distribution in the Euro area, and the average values since January 2003 respectively. October 2020 Euro area data has been used in all cases, while for CBDC since data is not available, the risk was set at zero and the output followed the hypothesis that increases in systemic risk would lead to an increase in CBDC demand in line with the current literature [41].
Once the model has been successfully calibrated, we used the DNN to simulate how the wealth distribution amongst the different financial assets would change with the introduction of CBDC. In particular, Figure 9 shows depositors' sensitivity to CBDC interest rate under three scenarios: (i) zero interest rate on CBDC, (ii) positive CBDC interest rate set at 0.5%, and (iii) positive CBDC interest rate set at 1.0%. The first two rows represent the October 2020 wealth distribution in the Euro area, and the average values since January 2003 respectively. October 2020 Euro area data has been used in all cases, while for CBDC since data is not available, the risk was set at zero and the output followed the hypothesis that increases in systemic risk would lead to an increase in CBDC demand in line with the current literature [41].   Finally, Figure 11 shows the transfer, mainly of commercial bank deposits given that cash remained broadly unchanged, to CBDC. The results shown in the matrix below represent the total volume of CBDC as a percentage of the total wealth. The colour code also shows the risk of a digital bank run, given that in some scenarios the total holdings of CBDC could reach as high as ca. 80% of the total.  Once the model has been successfully calibrated, we used the DNN to simulate how the wealth distribution amongst the different financial assets would change with the introduction of CBDC. In particular, Figure 9 shows depositors' sensitivity to CBDC interest rate under three scenarios: (i) zero interest rate on CBDC, (ii) positive CBDC interest rate set at 0.5%, and (iii) positive CBDC interest rate set at 1.0%. The first two rows represent the October 2020 wealth distribution in the Euro area, and the average values since January 2003 respectively. October 2020 Euro area data has been used in all cases, while for CBDC since data is not available, the risk was set at zero and the output followed the hypothesis that increases in systemic risk would lead to an increase in CBDC demand in line with the current literature [41].   Finally, Figure 11 shows the transfer, mainly of commercial bank deposits given that cash remained broadly unchanged, to CBDC. The results shown in the matrix below represent the total volume of CBDC as a percentage of the total wealth. The colour code also shows the risk of a digital bank run, given that in some scenarios the total holdings of CBDC could reach as high as ca. 80% of the total. Finally, Figure 11 shows the transfer, mainly of commercial bank deposits given that cash remained broadly unchanged, to CBDC. The results shown in the matrix below represent the total volume of CBDC as a percentage of the total wealth. The colour code also shows the risk of a digital bank run, given that in some scenarios the total holdings of CBDC could reach as high as ca. 80% of the total.

Discussion
The results show that the introduction of CBDC would lead to an initial transfer of wealth from commercial bank deposits to CBDC. Figure 9, Case 1 simulates a simple scenario where the transfer of wealth from cash and commercial bank deposits to CBDC takes place when CBDC is introduced for the first time with CBDC interest rate and risk perception set at zero and the rest of the inputs set as at October 2020 levels. It is interesting to observe that cash would be slightly reduced from 3.6% to 3.1%, while both household deposits and corporate deposits declined by 3.8 percentage points (pp) and 12 pp respectively, leading to a CBDC amounting to c.16.4% of the total wealth of the system. We also note that an increase in CBDC interest rates of 50bps (Figure 9, Case 2) and 100 bps (Figure 9, Case 3) leads to a

Discussion
The results show that the introduction of CBDC would lead to an initial transfer of wealth from commercial bank deposits to CBDC. Figure 9, Case 1 simulates a simple scenario where the transfer of wealth from cash and commercial bank deposits to CBDC takes place when CBDC is introduced for the first time with CBDC interest rate and risk perception set at zero and the rest of the inputs set as at October 2020 levels. It is interesting to observe that cash would be slightly reduced from 3.6% to 3.1%, while both household deposits and corporate deposits declined by 3.8 percentage points (pp) and 12 pp respectively, leading to a CBDC amounting to c.16.4% of the total wealth of the system. We also note that an increase in CBDC interest rates of 50bps ( Figure 9, Case 2) and 100 bps (Figure 9, Case 3) leads to a moderate increase of total CBDC outstanding at c.17.8% and 19.2% respectively. The sensitivity of deposit outflows to CBDC interest rates seems moderate, with c.2.3 pp of deposit outflows per 50bps of CBDC interest rate increase. However, we note that deposit outflows sensitivity to CBDC is not linear as we show in Figure 11. Figure 10 shows that an increase in systemic risk could lead to digital bank runs. In particular, the results show that a systemic risk indicator increasing from 0.11 to 0.5 would lead to significant deposit outflows, increasing the total wealth stored in CBDC from 16.4% to 51.9%. In an extreme scenario, with systemic risk as high as 0.9, over 80% of the total wealth would be stored in CBDC, leading to a system-wide digital bank run. We note that deposit outflow sensitivity to systemic risk is very high, which is in line with the majority of the literature on the topic as we highlight in the introduction and theoretical background sections of this document. Figure 11 shows that deposit outflow sensitivity to financial system risk and CBDC interest rate is non-linear. In particular, sensitivity to CBDC interest rate is moderate when the systemic risk is at low or medium-high levels (with CISS ranging from 0.2 to 0.6), while there is no sensitivity to CBDC interest rate with high or very high systemic risk levels (with CISS ranging from 0.7 to 0.9). This suggests that under a stressed financial scenario, a commercial bank deposit outflow would not be stopped by lowering the interest rate of CBDC.
Furthermore, the results suggest that a maximum amount of CBDC per account set at 30% or 40% of total wealth per account would limit more effectively the potential deposit outflows in the case of system-wide financial stress. Adding caps to the design of CBDC could be somewhat seen as the physic limits that cash entails. In theory, the holdings of cash are only limited by the total wealth of an individual, however, in practical terms, holdings of cash are "virtually capped" by the storage and transport risks. Since CBDC would not entail any storage or transport risks, it could be deemed appropriate to add certain limits to the holdings of CBDC, particularly during the early stages of the introduction of CBDC. However, this remains to be tested and further analyses on that point would add significant value to the CBDC implementation debate.
In line with the above, some authors consider that a cap on CBDC would reduce the effectiveness of it [18]. Somewhat linked to that point, new questions regarding the scope of CBDC would need to be explored at some stage, including whether the introduction of CBDC would represent just a first stage before moving into a financial system embracing the concept of "sovereign money", whether it should be designed to compete with commercial bank deposits, or if it should be conceived as just a mere substitute of cash.

Limitations and Future Lines of Research
This methodology is not without limitations, with the lack of CBDC data being the most notable. As described above, the model has been initially trained using real Euro area aggregate data for all components but CBDC. In the case of CBDC, different assumptions have been made, which leads to a certain degree of subjectivity. On the other hand, the model proposed allows other researchers to modify such hypotheses concerning CBDC initial calibration.
Next, we discuss some of the potential implications of CBDC for the banking sector. The following points constitute hypotheses to be tested and do not express the authors' views on the subject. The goal of the remainder of this section is to stimulate the debate regarding the introduction of CBDC and the potential impact on the banking sector and on bank runs in particular.
In the scenario described in this work, commercial banks would compete for deposits with Central Bank, leading banks to increase interest on customer deposits, hence eroding its margins. After the introduction of CBDC, and as per the results obtained in Figures 9-11, banks would need to reduce their balance sheet and increase lending rates, potentially tightening the access to credit. However, under this hypothetical scenario banks could use several strategies, including cross-selling techniques to retain deposits, and other measures such as offering lower loan rates to corporate clients holding deposits in the bank, or lower mortgage rates to retail customers using banks' deposits and payment services. Exploring this area would help to measure the impact on banks' accounts and indirectly the potential spillover effects on the availability of new credit.
Furthermore, banks would try to replace some deposits lost with other forms of funding, such as wholesale funding, leading to a higher cost of funding. In turn, higher wholesale funding reliance, and depositors' choice to transfer funds to CBDC could lead to higher market discipline in the banking sector. Some authors question whether the need for a deposit guarantee scheme would still be justified after the introduction of CBDC [42]. As described on the European Commission website, a fundamental principle underlying the Deposit Guarantee Scheme (DGS) is that they are funded entirely by banks and that no taxpayer funds are used. In line with this, a DGS would in part mitigate digital bank runs under stressed scenarios.
This work uses Euro area data to train, validate, and test the model. The authors would like to suggest the development of similar analyses with data from different geographic areas and regions as an interesting future line of research. Results obtained from Euro area data could differ from results in regions where there is not just a common monetary policy, but also a single fiscal policy.
The study uses a model based on a closed economy where only domestic use of CBDC was possible. However, we would encourage other researchers to elaborate on the subject of whether CBDC should be used exclusively in the national territory or whether the CBDC should be open to international use too.
As described in the introduction of this work, designing a CBDC that contributes to the sustainability of the financial system is relevant. In particular, some authors consider that features enhancing financial inclusion could limit the effectiveness of CBDC as a system of payments [43]. The relatively scarce literature on CBDC and financial inclusion suggests that further empiric analysis on that topic would be relevant for the current literature on CBDC.
So far, the literature is strongly focused on the impact on banks' funding costs, which as highlighted by many authors, could lead to disintermediation of the banking sector. However, it would be interesting to explore further whether the Loss Given Default of debt instruments and banks' cost of equity should remain unchanged or increase/decrease after the introduction of CBDC and the potential spillover effects mentioned above. Moreover, macroprudential and policymakers' options remain in place to contain a potential increase in banks' funding costs. Such options could include banks' debt being eligible for quantitative easing programs launched by central banks. Furthermore, it could be understood that in a hypothetical scenario where the public has the option to keep money in the form of CBDC at the Central Bank, the need for strict regulation over the sector declines. Capital, liquidity and loss absorption requirements could be loosened, leading to lower regulatory costs for banks, particularly on the funding side.
In line with the above, another question to explore under the hypothesis of CBDC introduction is whether banks should need to maintain a capital structure in line with Basel III, and complying with bank-specific capital and loss absorption requirements such as SREP (Supervisory Review and Evaluation Process), MREL (Minimum Requirement for own funds and Eligible Liabilities), or TLAC (Total Loss Absorbing Capacity).
It is also particularly important to design a solid transitional framework should CBDC be introduced. The transfer of significant amounts of commercial bank deposits to CBDC would add additional pressure to the stability of the banking system, hence raising the questions of whether and under which conditions the Central Bank may temporarily replace commercial banks' deposits lost with Central Bank lending. A phase-out calendar matching the maturity of the outstanding loans in the balance sheet could be adopted, with Central Bank lending in place during the phase-out period.

Conclusions
This paper develops a Deep Neural Network (DNN) design to assess the potential impact of the introduction of CBDC on the banking sector, and in particular, focuses on the link between CBDC and the bank run phenomena. This work represents an innovative method to assess the implications of the introduction of CBDC, allowing the simulation of the transfer of wealth between different financial assets depending on the design of a CBDC. The transfer of flows from one asset class to another can be used as a proxy to understand the dynamics that one could expect in the event of CBDC introduction. Below we conclude by highlighting some of the findings or relevant points highlighted in this work: First, this paper describes the use of a DNN design, representing a multivariate regression model that learns the mapping function between the input vector, which represents the interest and risk for a sample of financial assets, and output vector which represents the wealth allocation into the different financial assets available. Several scenarios are described, and the model is finally calibrated using 315 real data samples corresponding to Euro area aggregate data including cash and loans volumes, interest rates and systemic risk metrics. The calibration of CBDC to be used in the training phase of the algorithm represents an important limitation linked to this type of technique. On the other hand, using different hypotheses vis-à-vis the calibration of CBDC data allowed the authors to draw conclusions on the impact of CBDC in a financial system. This work considers that different designs of CBDC would lead to a wide range of outputs in terms of success and acceptance of CBDC, and the ability to increase financial inclusion through the deployment of CBDC is, by all means, one of the characteristics that this new form of money should pursue.
Second, the results point out that the introduction of CBDC would lead to an outflow of commercial bank deposits into CBDC, particularly given the "risk-free" nature of CBDC, while commercial bank deposits have an inherent (low) risk perception. Interest rates on CBDC are an important but not leading factor when analyzing the risk of commercial bank deposit outflows, as per the results shown in Section 4. However, as discussed, it is highly likely that the outflows from commercial bank deposits to CBDC would become barely interest-sensitive in the event of severe financial distress. The likelihood of digital bank runs seems strongly driven by the overall financial risk perception, modelled through the CISS indicator in this work. Other levers such as the full guaranteed convertibility of bank deposits into CBDC or limits on the CBDC accounts could be used to limit bank runs at this stage with potentially higher success rates. However, the higher the number of frictions introduced in the CBDC design, the lower the utility of it. Further research would be required to fully understand the trade-offs of suboptimal CBDC designs to partially protect the banking sector.
Third, the DNN architecture used in this paper to model the introduction of CBDC is highly scalable, allowing us to build a series of different blocs or new elements on top of the basic system analysed in this work. The authors would like to invite other scholars to continue assessing the implications of the potential introduction of CBDC through Deep Neural Network designs. The authors consider that after proving that DNN constitutes an adequate and valuable method to analyze the potential different designs of CBDC and its implications not just for the banking sector, but for the broader economy, this technique could be used more frequently for analyzing problems of a similar nature.
Finally, the potential introduction of CBDC could represent one of the most disruptive changes introduced in the financial system in a long time. Hence, a scrupulous analysis of the trade-offs derived from introducing CBDC is paramount. This paper contributes to the research in the segment of the interaction of CBDC with the banking sector by proposing an innovative method to assess the likelihood of a sudden and significant transfer of funds from commercial bank deposits to CBDC. This is a relatively new concept to most of us but threatening to be a source of intense debate and concern in the years to come: Digital Bank Runs. Data Availability Statement: The database and the code used for this study is freely available at https://github.com/estherpuyol/CBDC_model.git.