Intraday liquidity modelling using statistical methods

The correct approach to liquidity risk management in banks is essential for securing their financial stability. The position of liquidity risk among the rest of bank risks is specific because the negative outcome is not just a loss, but directly the bankruptcy of the institution. Such an occurrence might start a chain reaction and bring uncertainty into the entire financial system. This paper focused on one source of liquidity risk, i.e. management of liquidity throughout the day. The management of intraday liquidity is related to cash inflows and outflows occurring during the business day, their timing and settlement. In 2013, the BCBS published the document Monitoring tools for intraday liquidity management , often referred to by the regulatory authorities. It offers basic concepts of intraday liquidity monitoring and sketchily defines stress scenarios. The author suggests possibilities of how to perform intraday liquidity stress testing in a bank, which is often required by supervisors, even though no detailed approach or methodology as to how to proceed was introduced by the regulators. The research was carried out on anonymised data of cash inflows and outflows recorded on a central bank reserves account of one of the Slovak commercial banks. Both a base and four stress scenarios were developed and suggested for the better understanding of expected cashflows in standard conditions and during stress. The author’s aim was to develop scenarios in a non-traditional way by means of a basic and EWMA historical bootstrap simulations, respectively. Stress scenarios are supposed to simulate reputation crisis, disruption in RTGS payment system, increased deposit outflows and bank run. The purpose of the proposed intraday liquidity monitoring scenarios was to strengthen resilience not only for a concrete bank, but also the entire financial system. Intraday liquidity monitoring is a key factor in securing stability of the financial sector.


Introduction and literature
Due to their business active ties, banks are exposed to a wide range of risk.Given the fact that banks have a substantial impact on the financial sector and the national economy as a whole, they are under banking supervision in order to avoid their bankruptcy.The main goal of banking regulation is to ensure that banks hold sufficient amounts of capital necessary to cover their risk exposure (Hull, 2018).Banking regulation cannot eliminate all sources of bankruptcy, since it is not possible, but its aim is to ensure that risk exposure is reasonable, and the probability of bankruptcy is sufficiently low (Skoglund and Chen, 2015).By regulating this sector, governments seek to create a stable economic environment, where households and enterprises have confidence in the banking sector.
In commercial banks, the need for liquidity results from fact that their cashflow profile is uncertain.Banks have to make sure that they can cope with increased outflows and potentially decreased inflows in any given time, for these changes might be fully unexpected (Smolík, 1995).From the terminology point of view, one can come across the concepts of liquidity and liquidity risk.Some authors tend to use these concepts interchangeably, however, it is beneficial to distinguish between the two.Farahvash (2020), suggested that liquidity can be defined as ability to repay obligations in time of their maturity and capability to transform any asset to cash by market price.From this point of view, measuring liquidity stands for the estimation of the expected development, while the measurement of liquidity risk represents the estimation of the negative deviation from the expected development with a given probability.Liquidity risk monitoring was further elaborated by, for example Cucinelli (2013), Drehman and Nikolaou (2013), Hong et al. (2014), Ippolito (2016) and Khan (2017).
It is also necessary to distinguish between liquidity and the solvency of a financial institution (Scannella, 2016).The theoretical concept of both risks is similar but not the same.Liquidity represents the ability of a bank to manage cash outflows promptly and economically relevantly, while solvency is related to a bank's ability to repay its obligations in the long term, and is linked mostly to a sufficient amount of own funds of a bank.
The first serious attempt to unify liquidity risk management across different institutions and countries was A framework for measuring and managing liquidity created by the Basel Committee for Banking Supervision (1992).However, it did not succeed in the methodology definition, nor in the motivation of bank institutions to increase consistency and improve their processes in the field of liquidity risk monitoring.The BCBS introduced several definitions of liquidity risk and the development of its management and regulation, but progress in this topic was remarkably slow and inadequate to the speed of the banking industry's development.In 2006, this approach to liquidity risk management was still very notable among banks, and regulators insisted on the development of different heterogeneous models for liquidity profile evaluation (Castagna and Fede, 2013).
The crisis that began in 2007 showed that the banking sector was completely unprepared for the management of strong liquidity shocks, and the models used by banks for liquidity crisis forecasting turned out to be ineffective.In the same manner, the models applied by the regulatory institutions were also overly optimistic.The measurement and management of liquidity risk were not considered a priority among bankers, and the literature dedicated to this topic also failed to cover this as a whole, resulting in the non-existence of any integrated management process of liquidity risk (Giordana and Schumacher, 2013).
Scannella (2016) distinguished between two types of liquidity risk: funding and market liquidity risk.Market liquidity risk can be caused either by external factors (such as the condition of the financial markets) or internal factors (such as the size and structure of the financial institutions' bond portfolio).Funding liquidity risk is identified by the fact that the bank is not able to manage the expected or unexpected cash outflows effectively.In other words, this occurs when a bank cannot satisfy its obligations in time of maturity.Among the sources of funding liquidity risk one can include: • liquidity mismatching risk -a mismatch between the size and maturity of cash inflows and outflows, • liquidity contingency risk -future events may cause an increased need for liquidity, • intraday liquidity risk -the inability to settle payments throughout the day and fulfill collateral requirements.
The reviewed studies and publications focus on intraday liquidity monitoring by means of parametric methods.The aim of this research was to outline the possibility of using a non-parametric simulation method.Inflows and outflows are not generated using a known or assumed distribution.This study was based on the use of an empirical distribution, which allows avoiding erroneous assumptions.

Intraday liquidity
Apart from strategic liquidity risk management over longer time horizons, banks must also deal with the availability of liquidity throughout each business day.They ought to have a sufficient amount of resources to settle all cash operations which are due on a given day and time of their maturity.The sources of intraday liquidity are highly liquid assets which are available throughout the banking day for the settlement of payments.The management of intraday liquidity needs represents a set of metrics and procedures carried out in order to secure the timely settlement of obligations (Ball et al., 2011, Farahvash 2020).Banks as intermediary institutions execute a large number of payments, which can be either cash inflows -the bank is the recipient of the cashflow/s -the bank sends money to another bank.The volume and multitude of cash inflows and outflows may significantly vary throughout the day.
An extensive number of cash outflows may lead to problems related to insufficient resources available for settlement.Managing intraday liquidity must play an important role in the risk management of a bank (Soprano, 2015).
Settlement of payments entered by clients into the banking system is realised in minimum reserve requirements (MRR) accounts, which banks must have in the central bank of a given jurisdiction; for Slovakia, this is the National Bank of Slovakia (NBS).The minimum reserve requirement is a given amount of money that banks must hold in the NBS on MRR accounts.The minimum requirements are determined for 6-week periods, based on the bank balance sheet.The required pre-set amounts of money have to be available in the central bank, on average over the maintenance period.Due to the settlement of intraday payments, banks tend to have much higher resources allocated in MRR accounts as prescribed by the regulations.Payments between banks are usually realised by means of Real-Time Gross Settlement payment systems (RTGS).In terms of the eurozone, the most important is TARGET2.One can simply say that all payments in TARGET2, which is the bank -either a sender or a recipient -are deducted or added to the MRR account.For this reason, banks tend to maintain sufficient amounts of cash in MRR accounts.
Intraday liquidity management came into the domain of the BCBS and in 2013 Monitoring tools for intraday liquidity management was published.This document defined the basic concepts and approaches to the measurement and management of liquidity cash flows during the day, according to which banks should perform the following activities: • measurement of expected daily gross liquidity inflows and outflows and anticipate their timing where possible, • monitoring of intraday liquidity positions in terms of expected activities of a bank, • securing of sufficient funding sources to cover intraday liquidity needs, • management of timing of cash outflows in line with intraday objectives, • development of plan how to proceed in cases of unexpected intraday cash outflows.
Sources of intraday liquidity are used throughout the day mostly on payments realised by payment systems for correspondent banks, dedicated lines offered to clients for intraday usage and unexpected expenses related to the failure of payment transactions.Thus the BCBS introduced seven monitoring tools whose aim is to identify intraday liquidity needs (BCBS, 2013).BCBS here suggested monthly reporting of these tools to regulators, however, their monitoring by banks is expected to be carried out on a daily basis.Given that not all of these tools are applicable to all banks, they were divided into three categories.The monitoring tools and their respective categories are shown in Table 1, and the briefly described tools are discussed in this paper.

Category A: Monitoring tools applicable to all reporting banks • A(i) -Daily maximum intraday liquidity usage
This tool allows supervisors to monitor bank's intraday liquidity usage under standard operating conditions.The measurement is based on the net balance of all payments -sent and received during the day in all central bank accounts or with a correspondent bank.The largest net negative position occurred during the day stands for maximum intraday liquidity usage.All payments are recorded in order of settlement and maxima of liquidity usage is calculated at the end of the day.Cash flow CF t in time t stands for inflow In t CF when cash flow is positive and outflow Out t CF , when cash flow is negative.Net cumulative liquidity position in time t can be expressed as the sum of cash flows up to time t: Maximal usage of intraday liquidity is expressed by the largest negative net cumulative position and can be written as follows, where n stands for number of payments occurred on a given day: (2) • A(iii) -Total payments This tool is aimed at monitoring of the bank's payment activity -sent and received payments during the day through the central bank account, or with correspondent banks.Total inflows and outflows can be expressed in the following way: (3)

• B(i) -Value of payments made on behalf of correspondent banking customers
This tool is applicable only to banks which provide correspondent banking services to other financial institutions.It is calculated as the total amount of payments realised in the name of all correspondent banks' customers.

• C(i) -Intraday throughput
The last tool is relevant only for banks which are direct participants of payment systems.The goal is to measure the share of outflows in a given time period (hourly for example) to total daily outflows.Outflows

Tot t
Out profile up to time t can be expressed as stated below, where T stands for total number of time intervals into which daily cash flows were divided (so denominator stands for total 1 day outflow):

Intraday liquidity stress testing
The monitoring tools described previously, provide information about intraday liquidity profile of a bank under standard conditions.However, they say nothing about how liquidity profiles change in cases of stress situations in the financial market, respectively, in the case of stress which occurred because of unavailability of funding sources, or due to reputational risk concerning a specific bank.The BCBS states that banks and supervisors should also consider intraday liquidity requirements in stress conditions.Intraday liquidity stress testing was further elaborated for example by León (2012), Pagratis (2017), Roncalli (2021) and Liermann et al. (2021).The BCBS proposes general examples of stress scenarios, and banks are encouraged to choose which of them are most relevant for their business model.The following scenarios are proposed: • Own financial stress -the bank encounters stress situations due to counterparties declining their payments or denying intraday credit lines.The bank faces a stress situation because it will be forced to use more sources of liquidity to prevent delaying its own payments.• Counterparty stress -one of the major counterparties in the intraday banking payment system faces a stress situation that makes it unable to realise payments.
This results in a situation where the bank will not receive any payments from this counterparty.• A customer bank's stress -which may result in deferring payments to customers, generating further loss of intraday liquidity.• Market-wide credit or liquidity stress -in the case of crisis in the financial market, it might happen that the market value of high liquid assets held for intraday liquidity purposes will significantly degrade.A severe decrease in the market value or credit ranking of unencumbered liquid assets may result in the inaccessibility of intraday liquidity from the central bank because these assets might not then meet the criteria for intraday loan anymore.However, the Basel Committee states that these scenarios serve only as an example, and banks are encouraged to define their own stress scenarios.Stress testing of intraday liquidity is often required by supervisors during the Supervisory Review and Evaluation Process (SREP) as well.Despite the fact that stress testing of intraday liquidity is frequently required, no direct methodology of how to proceed has been elaborated.In this paper the author introduces the possibilities of using a historical bootstrap simulation for the estimation of inflows and outflows in the standard and specific under-stress conditions.

Historical bootstrap simulation
Bootstrapping is a computationally demanding technique used for the estimation of a variety of statistical metrics.Aside from standard statistical approaches where inference about population is made from a single sample, bootstrap estimate is based on random sampling with a replacement.Bootstrap belongs among a broader class of resampling methods and allows to estimate sample distributions of almost any statistic.The term 'bootstrap' was first used by B. Efron in his paper Bootstrap methods: Another look at the jackknife (1979).The importance of this approach started to increase with the development of information technology and the creation of specialised packages devoted to bootstrap techniques in statistical software.Among the most used packages in programming language R (used to perform computations in this paper) are the bootstrap package created by Efron andTibshirani in 1993 (Efron andTibshirani, 1993), and the package boot, programmed by A. J. Canty.The popularity of bootstrapping techniques has increased thanks to its high flexibility and relative simplicity (Hesterberg, 2011).
Suppose one wants to make inference about parameter θ of random variable X based on sample data ( ) with distribution function ( ) ; F x θ .When the probability distribution of random variable X is not known, one replaces the observed sample ( ) with a new sample obtained from the given sample by random sampling.By following this approach, one obtains one bootstrap sample.To obtain a bootstrap estimate of parameter θ of random variable X, one proceeds in a following way (Fox and Weissberg, 2018): , one calculates θ as an estimate of parameter θ .
• Next, B random bootstrap samples are created by a replacement with sample size n from observed values ( ) , , , .
The accuracy of the estimate increases with the increasing number of bootstrap samples.A disadvantage of a large number of samples is a higher computational complexity.
• For each of the bootstrap samples one can calculate an estimate of parameter θ denoted ˆi θ , where 1, 2, , … .The concept based on repeated random sampling can also be applied to an analysis of intraday cash flows.In this case, the author does not estimate a single parameter, but a process -the development of cash flows during the day.The usage of simulatin methods in the modelling of non-maturing liabilities was described by Kalkbrenner and Willing (2005) and Castagna and Fede (2013).Next, a way to apply this process to intraday cash flows is proposed.The main difference is that, while in non-maturing liabilities modelling only outflows are modelled, for intraday liquidity modelling purposes one must simulate both outflows and inflows and then create net cash flows.
For modelling the study used following approach: • First, denote time horizon T and period [0, T].In the given case, the time horizon is one business day, and inflows and outflows are divided into hourly intervals in order to obtain estimates of cashflows on an hourly basis.The start of the business day in this dataset is at 7.00 and ends at 18.00.Thus, the time horizon is divided into 11 parts (T = 11).• Next, simulate B trajectories of inflows and outflows cumulated by hours.Inflows and outflows are simulated separately, and each trajectory can be understood as one bootstrap sample.
• Calculate the expected level of cumulated inflows ( ) • Finally, denote stress scenarios (by means of choosing confidence level p for inflows and outflows) and calculate net liquidity flows for each scenario as the difference between cumulated inflows and outflows.For liquidity risk management purposes, it is relevant to analyse increase net liquidity outflows, i.e. cash inflows will be lower as in standard conditions and outflows will be higher.

EWMA historical bootstrap simulation
In the standard bootstrap technique, each element has in every moment the same probability of being chosen into the bootstrap sample.Therefore, for each element of the sample, the probability of being selected is 1/n (where n is the total number of elements in the sample).However, this might not always be the desired state.In this case, the subject of analysis are the previously recorded inflows and outflows, and it may happen that newer observations reflect the actual situation more accurately than older ones, so it could be beneficial to choose newer cash flows into bootstrap samples more often than older ones.In this case one can assign a vector of probabilities to the selected sample, assigning each element the probability of being chosen by using the exponentially weighted moving average -EWMA (Barbe and Bertail, 1995;Hall and Maesono, 2002).Suppose one has time series of outflows and inflows recorded during a given time period (e.g.several days).One calculates cumulative inflows and inflows recorded each day divided into hourly intervals, and to each of the cash flows a weight is assigned, which denotes the probability of being chosen.In the case of EWMA historical bootstrap simulation, this weight will be exponentially decreasing as the records are older.The weights assigned to the records can be expressed as follows: ( ) where ( )

W r
λ stands for weight assigned to r-th record, r is number of elements since most actual record to given record, λ is decay factor and n is number of records in bootstrap sample (sample size).Weights W represent the probability distribution of a record being chosen into a bootstrap sample in any step of the simulation.The sum of all weights has to be equal to 1: During each record selection, a stochastic process is implemented and a random number from 0 to 1 interval is picked.This number (respectively quantile) is approximated by cumulative distribution ( ) ( ) By inverting the function above for each random quantile, one obtains the position number r of the bootstrap record to be used in the simulation step.The weight function is highly dependent on the choice of parameter λ.Parameter λ must be a number higher than 0 and smaller than 1.The smaller the parameter, the more the weight function decreases, which means the increasing probability of choosing newer records instead of older ones.In the case when the parameter λ is closer to 1, each record has the same chance of being picked and thus the basic bootstrap is obtained.
By the correct choice of λ one can determine the effective sample size.The correct sample size can be checked by Kish's effective sample size (Masuku and Singh, 2014), which calculates how many elements have the real probability of being chosen, and is denoted as a proportion of 1 to the sum of squared weights i w :

Data
The analysis was performed on anonymised data from a Slovak commercial bank.Data consist in balances in one of the central bank accounts used for settlement of transactions, and was modified and cleared of some specific cash flows which occurred in a given period that might have violated the results.Additionally, some data quality issues and extreme values identified to be of non-random character were fixed and excluded from the analysis.The data were recorded from 23/2/2021 to 30/9/2021, with a gap (from 4/6 to 18/6) due to insufficient data quality.Outflows ( ) The goal of the analysis was to elaborate a liquidity profile of cash flows by means of a historical bootstrap simulation.For this purpose, the author used inflows and outflows cumulated by an hour in each recorded day.The main objective was to create an intraday liquidity profile under normal conditions and a stressed profile which might indicate a level of outflows and inflows in the case of specific stress situations described below.The purpose of these scenarios is the better understanding of intraday cash flows and identifying the possible need to increase intraday funding.It is also a proposal for banks on how to approach intraday liquidity stress testing, which is often required by supervisor.

CF and inflows
In CF were both simulated separately, and the process can be presented in the following steps: 1. Sufficiently large numbers of simulations have to be chosen in order to obtain stable results.The number of simulations was set to 100 000, i.e. the number when the results were sufficiently stable and calculation time in R was not insufficiently long.2. Random sampling with replacement was performed for inflows and outflows.
Sampling was on hourly basis (e.g.flows for the interval 7:00-8:00 were simulated from cumulated cash flows that occurred only during this hour).Cash flows were then added up from 7:00 to 18{00 for all simulations to obtain total cash inflow and total cash outflow for the entire day.Inflow for the day can be expressed in a following way (the same stands for outflow): ( ) i∈1,2,...,k.(10) Given that business day starts at 7:00 and ends at 18:00, in total 11 hourly cash flows were added up.The visualised trajectories of 100 simulations are shown in Figure 2 (outflows are shown with negative operator): In T Out T .Thus, it can be said that with p% probability, inflows (outflows) are smaller than the given inflow (outflow).In these terms, ( ) 0, In T stands for the cumulative inflow recorded throughout the entire day in the middle of all the simulations lined up in ascending order.4.After the computation of all the simulations, net cash flows were calculated as the difference between the inflows and outflows recorded on given confidence level p: ( ) ( ) Inflows and outflows computed for individual hours can be calculated as the difference between the actual and previous cash flow on given confidence level: 5. Stress scenarios supposed to simulate intraday liquidity stress were then set up on a qualitative basis.For each scenario, different confidence levels were considered.

Base scenario
As a representation of the base scenario, the author chose median cash flows.Both cash inflows and outflows amount to the middle simulation in terms of volume, therefore this scenario can be expressed in the introduced terminology as    The net cumulative position is represented by the dashed line.The maximum stands for the largest positive net cumulative position and basically represents the largest amount of additional sources of liquidity available resulting from intraday cash operations.The minimum is the largest negative net cumulative position representing required sources of funding that banks use during the day.The largest positive net liquidity position in the amount of EUR 30 million was reached during the 9:00-10:00 time interval, while the largest negative liquidity position in the amount of EUR -43 million occurred in the period 14:00-15:00.The net cumulative position is related to tool A(i) -Daily maximum intraday liquidity usage.Another BCBS tool that can be calculated from simulated cash flows is C(i) -Intraday throughput, showing a profile of cash outflows recorded on an hourly basis as a proportion to total outflows during the day.This shows which hour requires the highest liquidity for settlement of payments.The outflows profile is shown in Figure 5; on the left y-axis is the amount of outflows in million EUR, while on the right y-axis there are relative cumulative outflows up to a given hour.The largest outflow in standard conditions occurs during the period 12:00-13:00 in the amount of EUR 33 million.It is worth noting that the majority of standard outflows happen up to 14:00, i.e. 91%.This means that outflows in the morning and early afternoon hours are highest, and liquidity required in later hours is not that high.

Stress scenarios
The benefit of the base scenario is that it helps with understanding cash flows' behaviour in standard conditions.This section defines several stress scenarios, where cash flows should reflect the occurrence of a non-standard event.All these scenarios are specified on a qualitative basis by determining cash flow quantiles from a historical bootstrap simulation.It is necessary to point out that in the case of a real stress situation, historical data might fail to forecast the correct outcomes, therefore the results are just a quantification of the estimate.Four stress scenarios were developed: 1. Reputation crisis, 2. Disruption in RTGS payment system, 3. Increased deposit outflows, 4. Black scenario -bank run.
The first scenario is supposed to reflect a reputation crisis.In cases when the bank is exposed to reputation risk, e.g.some negative information about the bank's ability to repay its obligations is shown in the media, even if this information is false it tends to influence clients' behaviour and they might withdraw their money from the bank.A decreased amount of inflows might also be expected, because clients will avoid sending money to this bank and redirect their cash flows elsewhere.For this scenario, simulations 0, Out T were carried out.Cash flows for each hour will be at the level of 25% simulations with the lowest inflows, and outflows at the level of 75% simulations with the lowest outflows (this designation is used for all upcoming scenarios).As expected, this change has quite a significant impact on net liquidity position and total payments; net position and cash flows are shown in Figure 8. Unlike in the base scenario, where net position is close to zero (outflows and inflows are close to equal at the end of the day), in a reputation crisis scenario outflows significantly exceed inflows.This impacts on net liquidity flows, which at the end of the day amount to EUR -90 million.The largest net negative cumulative position is EUR -113 million during the 14 th hour, and reflects the amount of liquidity sources that must be available in the bank to cover all the obligations due during the day.The cumulated outflow reached EUR 165 million, and the cumulated inflow EUR 83 million.
The second scenario was labelled as a disruption of the RTGS payment system.This scenario simulates a situation of an unexpected failure in the payment system in the case of a hacker attack, or due to other external impacts that cause situation when a bank is unable to accept payments from other banks.Outgoing payments will be working without restrictions and this scenario can be defined in line with the former designation as ( ) ( ) 0,5 11 0, Out T .In other words, the scenario simulates a situation when inflows are zero and outflows are standard.In this case, net liquidity outflow will be equal to cumulated outflow from the base scenario and reach the highest negative net cumulative position at the end of the day amounting to EUR 125 million.The third scenario simulates increased outflows due to a higher withdrawal rate from deposit accounts, not necessarily because the situation of mass withdrawals is due to some bank specific crisis, but just a higher level of standard outflows caused by the tax due date or a similar event.Nowadays, corporate clients withdraw their funds at a higher rate to pay off taxes and this might impact liquidity position.In addition, the business day before a holiday might record a higher outflow rate from retail customers.This scenario should reflect such occurrences, and scenario is designed as  The fourth and the final defined scenario is labelled the black scenario.All the aforementioned scenarios are based on the quantile value of a historical bootstrap simulation.Given that cash inflows and outflows are strongly positively skewed, outflows recorded at tails of distributions might be significantly higher than related quantile value.For this reason, the author introduced conditional value-at-risk (also referred to as expected shortfall -ES), which can be interpreted as expected loss from the values exceeding a given quantile.The study applied this metric on cash outflows so that conditional value at risk stands for average outflow from outflows that exceed a given percentage of simulations.To project the study's designation into this methodology, ( ) 0,95 11 0, Out T could be labelled as value at risk - ( ) _ 0.95 VaR Out .In order to calculate average outflow from simulations with higher outflows than 95% of other simulations, there would be conditional value at risk, in other words ( ) . Expected shortfall is also a coherent risk measure as it satisfies the sub-additivity property, unlike standard VaR (Horáková, 2015).
All the previously mentioned scenarios were intended to deal with a specific field of increased liquidity needs during the day.However, the need for liquidity might be significantly higher in the case of a bank run, i.e. a situation, when clients, due to some reason -most often a reputational problem, start to withdraw all their deposits from the bank.It should be noted that for the rest of the risks a negative outcome is loss, in the case of inadequate liquidity needs it is bankruptcy.Therefore, a crisis related to a bank run is one of the most severe situations banks can face, at the same time it is also stressed that this might have no clear cause.Sometimes even an incorrect interpretation of some steps carried out by banks can cause that clients commence mass withdrawals of their funds.When other clients recognize this behaviour, they tend to panic as well, and also withdraw their deposits.This triggers off a withdrawal spiral when everyone removes their funds from the bank, and even when the bank is otherwise financially healthy it might face severe difficulties to withstand the crisis.In the case of a bank run, inflows are expected to decrease and outflows strongly increase.For this scenario the author proposed ( ) ( ) 0,99 11 _ 0, ES Out T cash flows, reflected by 10% of lowest inflows and outflows being the average from 1% simulations with the highest outflows.With these assumptions, simulated outflows reach EUR 334 million, and inflows EUR 60 million.The net cumulative liquidity position at the end of the day is EUR -274 million, and the lowest recorded during period 14:00-15:00 amounted to EUR -300 million.In comparison to other scenarios, this time the liquidity needs are much higher.Here it is necessary to note that the study did not have historical data with a bank run included (as it is for most of the banks), and therefore predicting client behaviour is difficult.The usage of historical simulation as shown here may serve as the basis for some expert judgement adjustments to the model.

EWMA historical bootstrap simulation
As already noted, in a standard bootstrap each element has the same probability of being chosen for simulation at any step of the simulation.Bearing in mind the fact that the author chose records of different age, it might not be the best approach.Older data have the same probability of being selected as the newer, even though the latter might predict the current situation more credibly.This is valid specifically in cases of long time series that were used as entry data for bootstrap simulation.With only roughly 7 months of observations being available, this should not be the case, however the author carried out the EWMA simulation for the purposes of comparison purposes on these dataset as well.
First, one must choose the value for parameter lambda and calculate weights ( )

W n
λ for all the records in the sample.For the purposes of the EWMA bootstrap simulation, it was decided to apply an effective sample size of 3 months, bearing in mind that the highest probability of being chosen is linked to the newest record, and that the probability is exponentially decreasing when going further back into the past.The author chose a parameter lambda equal to 0.9677, and the correctness of the chosen value can be verified by Kish's effective sample size.In relation to the sample (observations from 147 days), an effective sample size with the use of λ = 0.9677 is equal to 60, what can be considered the average amount of business days for three months, and thus parameter λ was chosen correctly.By calculating of the weight's cumulative distribution using Kish's effective sample size of 60 and lambda 0.9677, one obtains the value of 0.8675.This value can be interpreted in a way that a randomly chosen cash flow in any step of simulation has approximately 87% probability of not being older than 3 months.
( ) Due to the high number of simulations, one can also say that cash flows from the last three months make up 88% of all cash flows selected into the simulation.This results in newest cash flows having a higher impact on the calculated net flows than older ones; however, older records are not completely excluded -just their impact is smaller.The meaning of EWMA bootstrap simulation increases in situations when cash flows behaviour changes in time, e.g. when the bank faces a recent crisis.This crisis is then reflected in an EWMA simulation with a higher impact than in the basic one.

Basic scenario EWMA
First, simulate the EWMA basic scenario.All the inputs remain the same, only the probability for each record to be chosen is different and determined by the weights function.The cash flows simulated by the EWMA methodology are shown in Figure 10 (net flows from the basic simulation are also shown for comparison).The net liquidity flow is in this case EUR -25 million, and the largest negative net cumulative position is EUR 60 million during the period 14:00-15:00.The net liquidity position is worse by EUR 14 million, in comparison to the basic bootstrap methodology.One can conclude that there was a slight worsening of net liquidity positions in the EWMA simulation, due to higher outflows in the last months shown in the sample.Total inflows reached EUR 108 million (+6 m EUR) and total outflows were EUR 133 million (+8 m EUR).Changes in the outflows profile were minimal.

Stress scenarios EWMA and comparison to basic bootstrap
In stress scenarios, the differences between basic and EWMA simulation are negligible, which confirms that no period of recent stress was visible in the data.Due to slight differences between the basic and EWMA stress scenarios, the author introduced only a net liquidity flows comparison.The biggest difference was found during the first few hours in the third scenario related to increased outflows.In the first hour of a working day this difference reached EUR 43 million, and in the second EUR 24 million.The difference in net flows at the end of the day, however, was almost zero.The first and the second scenarios (reputation and RTGS failure, respectively) yielded better results for the basic simulation and a slight worsening was observed in the case of EWMA.In general, it can be concluded that there was not a very significant difference between both approaches, which was expectedgiven that the dataset was relatively small, and no period of stress occurred in the underlying data.A comparison of all the scenarios is shown in Figure 11.The numbering of the scenarios follows the order defined above.For the black scenario, the results of the EWMA simulation are better than for basic one (net outflows at the end of the day amounted to EUR -287 million for the EWMA simulation, and EUR -287 million for the basic one).
As previously mentioned, a comparison of the basic and EWMA bootstrap serves mostly as an example.EWMA would be most appropriate when possessing data recorded in the past several years; in this case one might want to increase the effective sample size to e.g. one year.From the long-term point of view, it is also necessary to stress that cash flows have a notional value.If data were taken from several years, the real value of older cash flows might be different from the notional one in that time.This is important with respect to the actual trend of increased inflation.If inflation persisted, cash flows recorded before this period might look small in comparison to actual amounts, however, in time of their realisation they might appear higher.This might lead to an underestimation of stress outflows in current conditions.For this reason, in the case of the biggest dataset it might be beneficial not only to use the EWMA bootstrap but also to recalculate the cash flows to their actual fair value.
The final comparison of all the scenarios and their cumulative cash flows and net positions is presented in Table 2.

Conclusion
Liquidity risk is one of the major banking risks, especially bearing in mind that the results of the liquidity crisis might be severe not only for the bank itself, but could also spread through the entire financial system.This paper focused on one particular part of liquidity risk management in commercial banks -intraday liquidity cash flows management.The research was based on Monitoring tools for intraday liquidity management framework (BCBS, 2013).The Basel Committee also encouraged banks to perform stress testing of intraday liquidity, however, no detailed approach on how to do that was suggested.This research focused on providing a relatively straightforward and easily repeatable solution of doing that by means of a historical bootstrap simulation.
The approach was introduced on the anonymised data of bank inflows and outflows occurring during the day, grouped by hour as recorded from February to October 2021 in a commercial bank operating in the Slovak Republic.Four stressed scenarios were suggested, however they served only as an example, and other scenarios can be developed in the same manner.The biggest limitation of this solution is, naturally, relying on historical data.In the case of a real stress situation, there is no guarantee that cash flows would behave in the same way.
Cash flows were cumulated by hour, and the entire simulation was carried out on an hourly basis, however different time intervals can also be considered as well.With the hourly approach, stress testing could be performed at any given hour of the day (not just from the start of business hours at 7:00, but e.g. at 12:00).Through this approach one could stress cash flows for only the remaining part of the day.For example, by starting the prediction at 14:00, most of the outflows would have occurred up to this hour (91%), and therefore the resulting net flows might not be as severe as in a full-day simulation.
This paper also deals with cash flows in their notional amount.This information itself does not directly reveal if the amount is high or not.All inflows and outflows occur in the bank's current account of obligatory reserves in the central bank.For a determination of the severity of outflows in stress scenarios it might be beneficial to compare their amount to the average level of the bank's reserves in the central bank.If this ratio is high, it means that banks rely on a bigger portion of their reserves for intraday payments purposes and an increase of these outflows might cause problems for the banks to cover them promptly.Vice-versa, lower percentage ratio signals that banks use only a small portion of their reserves on intraday transactions and their liquidity reserves are at a sufficient level.
A limitation of the research was also the fact that the author had access only to information about cash flows but no information as to where the outflows go or from which bank the inflows come from.Another suggestion for stress scenarios could be a counterparty or a country-specific stress focus on countries from which the most inflows usually come, and which carry out bigger transactions.Additionally, information whether cash flow is related to retail, corporate or treasury operation might be of interest and provide additional insights into cash flows structure.To obtain this information, further research of this issue is planned in order to understand the intraday liquidity position as well as possible.100% Source: own elaboration.
Out T for each step in projection i ∈ {0, 1, …, T} by averaging the B scenarios.•Next, calculate the stressed level of inflows volumes on confidence level pprojection step i ∈ {0, 1, …, T} by averaging the B scenarios.

Fig. 1 .
Fig. 1.Cash flows used for the analysis.Cumulative daily amounts of inflows and outflows are shown along with net cash flows.Source: own study.

Fig. 2 .
Fig. 2. 100 simulated inflows and outflows during the day grouped by hour.Source: own elaboration.
scenario represents cash flows under standard conditions.The resulting gross cash flows are shown in Figure3with dashed lines, and hourly inflows and outflows with bars.
inflows and higher outflows.In this case, the net liquidity position at the end of the day reached EUR -126 million, and the largest negative net cumulative position EUR -157 million over the period 14:00-15:00.Total outflows were EUR 240 million and inflows remained unchanged to the base scenario in the amount of EUR 114 million.

Fig. 11 .
Fig. 11.Comparison of basic and EWMA simulated net positions for stress scenarios.Source: own elaboration.

Table 1
Intraday liquidity monitoring tools

Table 2
Comparison of scenarios.Base and EWMA simulation (million EUR) 1. stress scenario -reputational crisis (basic bootstrap)