Impact of Basel III Countercyclical Measures on Financial Stability: An Agent-Based Model

The financial system is inherently procyclical, as it amplifies the course of economic cycles, and precisely one of the factors that has been suggested to exacerbate this procyclicality is the Basel regulation on capital requirements. A er the recent credit crisis, international regulators have turned their eyes to countercyclical regulation as a solution to avoid similar episodes in the future. Countercyclical regulation aims at preventing excessive risk taking during booms to reduce the impact of losses su ered during recessions, for example increasing the capital requirements during the good times to improve the resilience of financial institutions at the downturn. The Basel Committee has already moved forward towards the adoption of countercyclical measures on a global scale: the Basel III Accord, published in December 2010, revises considerably the capital requirement rules to reduce their procyclicality. These new countercyclical measures will not be completely implemented until 2019, so their impact cannot be evaluated yet, and it is a crucial question whether they will be e ective in reducing procyclicality and the appearance of crisis episodes such as the one experienced in 2007-08. For this reason, we present in this article an agent-basedmodel aimed at analysing the e ect of two countercyclical mechanisms introduced in Basel III: the countercyclical bu er and the stressed VaR. In particular, we focus on the impact of these mechanisms on the procyclicality induced by market risk requirements and, more specifically, by value-at-risk models, as it is a issue of crucial importance that has received scant attention in the modeling literature. The simulation results suggest that the adoption of both of these countercyclical measures improves market stability and reduces the emergence of crisis episodes.


Introduction
Background . The financial system is inherently procyclical, as it amplifies the course of economic cycles. During good times, risk perception decreases, credit standards become looser and lending expands (Dutt ). Access to easy credit propels asset bubbles, as investors are more optimistic regarding their profitability prospects and are keener to borrow in order to buy assets (McCoy ); in turn, this increases the value of warranties used as collateral in loans, which fuels credit expansion in a self-fulfilling cycle (Gri ith-Jones & Ocampo ). This processes reverses during economic recessions: when the economy slows down, corporate profits and household incomes decline, which leads financial intermediaries to become more cautious and reluctant to lend (Ren ). As a result, credit tightens, risk perception increases, collateral value falls and asset bubbles burst (McCoy ). .
The recent credit crisis has brought to light that financial regulation intensifies economic cycles and thus exacerbates the procyclicality of the financial system (Kowalik ; Goodhart ). Basel capital requirements force banks to hold more capital during crises: as credit quality of counterparties deteriorates during recessions, the positions, but their sales can cause a price drop and so a new volatility upsurge, triggering further portfolio reductions. When many investors hold similar positions and also use the same type of risk management models, they may be forced to simultaneously sell the same assets, leading to a downward spiral in prices (Daníelsson et al. ; Persaud ). .
Risk management controls such as those proposed by the Basel Accords can therefore paradoxically facilitate the contagious spread of instabilities: They contribute to synchronise the behaviour of market participants, which may be forced to liquidate part of their positions simultaneously (International Monetary Fund ; Whitehead ). The impact of these liquidations would be negligible if investors had very di erent portfolios, as the sello s by some agents would have less direct e ects on those with di erent positions. Nevertheless, there is empirical evidence that hedge funds and big banks tend to accumulate similar positions over time, especially in popular trading strategies (Pericoli & Sbracia ; Haldane & May ). Several regulators have previously warned of this risk to market liquidity (Bank of England ; European Central Bank ).
. The procyclicality induced by market risk capital requirements has led the Basel Committee to introduce within the Basel III Accord an additional countercyclical measure beyond the wide-ranging countercyclical bu er: stressed VaR. Whereas the countercyclical bu er is intended to cover all risk categories, stressed VaR specifically addresses market risk (Basel Committee on Banking Supervision ). This is calculated as the value-at-risk of the portfolio, but "based on a continuous -month period of significant financial stress" (Basel Committee on Banking Supervision , p. ). For example, banks could use historical data from -, when the credit crisis went through its worst moments and financial instability was at its highest. With the adoption of stressed VaR, banks will need to have higher capital reserves to cover market risk, and it is expected that this will contribute to preventing losses in trading books from exceeding the minimum capital requirements as happened at some points during the -crisis (Basel Committee on Banking Supervision ).

Review of model literature .
This paper analyses the e ect of two countercyclical mechanisms introduced in Basel III on financial stability. Other researchers have already presented models to explore the impact of countercyclical regulations, and we provide next a review of this literature. Most of these models are equilibrium-based, but also a few multiagent models have been developed that are of special interest to us, since our research builds on the agent-based paradigm. .

Da Silva & Lima (
) use an agent-based macroeconomic model to analyse the e ect of di erent combinations of monetary policy and prudential regulation -a countercyclical capital bu er as in Basel III -on macroeconomic and financial stability. Regarding the e ect of the countercyclical bu er, the simulations show that using countercyclical capital requirements is e ective against financial instability, but its e ect diminishes when used together with the monetary policies. Popoyan et al. ( ) also use a macroeconomic agent-based model to study the individual and combined impact of di erent macroprudential regulations and monetary policies on macroeconomic stability, and show that the combination of the di erent instruments introduced in Basel III has a greater e ect than the sum of their individual contribution. The combination of a triple-mandate Taylor rule with Basel III regulation is the most e ective policy to improve stability. However, the adoption of a countercyclical bu er together with minimum capital requirements is also quite e ective and involves much less complexity. .
Some papers focus only on the Basel III Accord, without studying its interactions with other types of measures such as monetary policies. Krug et al. ( ) focus on the di erent micro-and macroprudential instruments implemented in Basel III to study their combined e ect on financial stability. They use a stock-flow consistent agent-based macroeconomic model to test the possible combinations of the measures introduced in Basel III Accord. Similar to Popoyan et al. ( ), the authors conclude that the joint e ect of the regulatory measures is stronger than the sum of their contributions in isolation. In particular, the countercyclical capital bu er turns out to be very beneficial to reduce procyclicality and improve financial stability. Cincotti et al. ( ) extend the Eurace model (Cincotti et al. ) to explore the e ect of two possible implementations of the countercyclical capital requirements -one based on macroeconomic conditions and the other on banking activity -on several economic indicators. Results show that countercyclical requirements improve long-term economic stability and the main indicators, especially when adopting the formulation based on banking activity. .
Although most of these contributions focus on the macroeconomic scenario, there are also a few models that explore the impact of countercyclical measures on financial markets and therefore are a bit closer to our own research. Aymanns & Farmer ( ) present a model where fundamentalist investors set a maximum leverage limit which is linked to a VaR limit, and study the e ect of turning from a procyclical regulation to a countercyclical one through a dynamic adjustment of their maximum leverage level; when maximum leverage is proportional to volatility, the resulting market dynamics are countercyclical and the market becomes more resilient to negative price shocks. Hermsen ( a,b) builds on a previous model of artificial investors (Franke & Westerho ) to test whether the measures introduced in Basel III Accord contribute to financial stability. The results show that stressed VaR contributes to stabilising the market when the number of investors subject to capital requirements is low or medium, and using stressed VaR is more e ective than adding the countercyclical bu er in order to reduce market volatility. .
Although our own research shares with the existing contribution in this field the common objective of understanding whether countercyclical regulatory measures are beneficial, we provide here a new approach and perspective. Instead of focusing on the credit activity of banks, as done in most revised papers, we turn our attention to the trading activity of financial entities and in particular, of banks. Proprietary trading has expanded a lot in the banking industry (House of Lords ) and its e ect needs to be duly understood. So, instead of focusing on macroeconomy as done in the previous articles, we study the impact of countercyclical regulation on financial markets; instead of focusing on the procyclicality induced by the credit cycle, we concentrate on the procyclicality induced by the risk management of trading activities. Apart from setting up a countercyclical capital bu er, Basel III introduces stressed VaR as a specific mechanism to deal with this type of procyclicality. However, it has not received any attention in the available modelling literature aside from the work done by Hermsen. Our article will contribute to this gap in current research by modeling the e ect of the countercyclical bu er and stressed VaR on a range of instability indicators that will provide a wider perspective on market behaviour under this type of regulations. .
The remainder of the paper is organised as follows. In Section we present our agent-based model and describe how market stability is measured. In Section we summarise the procyclical e ect of VaR position limits on the price dynamics and the market stability, and in Section we study and compare how the use of a countercyclical bu er or stressed VaR can improve market resilience. Section then concludes our discussion.

Model Description
. We consider a market for a single risky asset -a stock -in unrestricted supply, where traders place orders at discrete trading intervals, changing the composition of their investment portfolios in accordance with their respective valuation model and, in the case where portfolio risk limits apply, with a Value-at-Risk (VaR) model .

Price formation .
The price P t for the stock is set by a market maker in accordance to a linear price formation rule. Although other formulations are possible (see also Madhavan for a survey), we use the simplest one, which states that prices have to rise (fall) in the presence of over-demand (over-supply) by an amount that is inversely proportional to the liquidity of the traded security. Here, we do not take into account the inventory of the market maker nor the presence of information asymmetries in the market, and thus assume bid-ask spreads to be zero. Stock price is updated according to: • Θ t−1 is the total excess order, that is the sum of all orders emitted in t − 1 • λ is a constant liquidity factor that accounts for the depth of the market • ξ t is a random term, ξ t ∼ N (0, σ P ), that accounts for the random perturbations -such as the arrival of new information -that can possibly a ect the market-maker's decision making process.
. One disadvantage of this linear formulation is that prices can become negative, which could be avoided by using a log-price formulation for the price discovery rule. Outstanding orders in any given trading interval are always filled at the quoted prices and the market maker absorbs the excess or covers the shortfall, adjusting the prices according to the impact Function .

Trading strategies .
In stock markets, two main investment approaches can be identified (Bonenkamp ): • Fundamentalist trading -Fundamentalist investors argue that assets have an intrinsic value, which can be determined with a detailed analysis of the characteristics of the asset, its issuer and the market (Murphy ). The price is expected to move around the fundamental value, so when both diverge an investment opportunity appears: if the value exceeds the price the asset is said to be overvalued and it should be bought; if the value is lower than the price, then it should be sold (Malkiel ).
• Technical analysis -This aproach builds on the analysis of past price movements to infere its future evolution. It claims that markets are driven by psychological factors -which reflect investors' hopes and fears -rather than fundamentals (O'Neill ). Technical analysis is much more recent than fundamentalist trading; its use largely spread since the s and is has come to dominate the most modern and liquid markets (Johnson et al. ). .
Building on these trading approaches, we consider in the model two types of investors: fundamentalist traders (FUND) and technical traders (TREND). This combination of strategies is relatively frequent in agent-based models of financial markets as these are the mainstream trading approaches in stock markets (see, for example, (Arthur et al. ,Lux & Marchesi , or Farmer & Joshi ). We describe next in detail how we implement both types of agents in our model.
Our implementation of the fundamental strategy is based on (Farmer & Joshi ). Fundamentalist investors derive the intrinsic value of the stock from a private, exogenous signal they receive before each trading period. This exogenous signal is modelled as a random walk V t plus an agent-specific constant v f that accounts for the variability in the perception of the fundamental value: where η t is drawn from a normal distribution with constant variance, η t ∼ N (0, σ V ), and the agent-specific constant v f is set at the start of the simulation from a uniform distribution, . The positions of fundamentalist traders are proportional to the di erence of actual price P t to perceived fundamental value V f t . However, an agent only enters a position when the di erent between price and value is above a given threshold, |V f t − P t | > T f . In that case, the position is determined as : Let's note that when the price lies above the fundamental value, the asset is overpriced and the agent decides to sell; when the price lies below the fundamental value, then the agent decides to buy.
. Fundamentalist investors keep their positions open until the price and the fundamental value converge, that is, until their di erence is smaller than a given threshold. In that case, the agents liquidate their position: In case an agent has an open position, but the liquidation condition is not satisfied, then it simply updates its position based on the di erence between price and value: if this di erence has reduced (widened) since the position was opened, then the investors also reduces (increments) its position: Fundamentalist investors are heterogeneous in their entry and exit thresholds .
Once determined the new position, the agent calculates the order to be sent to the market-maker: Figure summarises how the fundamentalist strategy works: Figure : State diagram of the fundamentalist strategy.
Technical traders exploit price trends, and for that aim we have implemented two of the most common techniques in real markets (Taylor ): to detect the start of a trend in prices, agents compare a short-and a longterm moving average of past prices; to detect the end of a price trend, agents rely on the technique of channel breakouts. To implement these rules, we have built on the practitioner literature, mainly on the description provided in Kestner ( ).

.
At each time step, technical investors calculate two simple moving averages (MA) of past prices: one short-term MA that responds quickly to recent price movements, and a long-term MA that responds more slowly. Let w tr S and w tr L be the windows used by the technical agent tr to calculate his short-and long-term moving averages, respectively. The moving averages are then given by: When the two moving averages cross, it is the key time to buy or sell: if the short-term MA crosses the long-term MA from below, the agent interprets it as the beginning of an upward trend and opens a long position; if the short-term MA crosses the long-term MA from above, the agent interprets it as the start of a downward trend and opens a short position ( Figure ). .
When the MA's cross and the agent opens a position, it is proportional to the di erence in slope between the two moving averages, because it is assumed that the greater this di erence, the steeper the upward or downward price trend. Equations and specify the formula used by technical investors to calculate their position: • If M A(w tr S ) t crosses M A(w tr L ) t from below, then the agent opens a long position: • If M A(w tr S ) t crosses M A(w tr L ) t from above, then the agent opens a short position: . where • is a normalisation factor aimed at having the same order of magnitude in the orders from fundamentalist and technical agents.
• ∆incl tr t is the di erence between the slope of the two MA's: .
Technical investors keep their positions open until they think that the price trend has begun to reverse. In order to detect a trend reversal, the agents use a channel breakout rule: if the current price is the lowest in the last w tr C days, then the technical trader interprets that the price is going down, and any long position should be liquidated; if the current price is the highest in the last w tr C days, then the technical trader interprets that the price is going up, and any short position should be liquidated.
Note that when drawing the minimum and the maximum of the price over a period, a channel appears, which is why the method is called "channel breakout" (Figure ).
. As happens with the fundamentalist investors, when a technical agent has an open position, but the channel breakout condition is not satisfied, then he simply updates his position keeping the same sign: If pos tr t−1 > 0 then pos tr t = 25 · |∆incl tr t |. If pos tr t−1 < 0 then pos tr t = −25 · |∆incl tr t |.

.
Technical investors are heterogeneous in the windows of the moving averages and breakout channel w tr S ∼ U (w tr S min , w tr S max ), w tr L ∼ U (w tr L min , w tr L max ) w tr C ∼ U (w tr C min , w tr C max ).

.
Once set the new position, the agent calculates the order to be sent to the market-maker: Figure summarises how the technical strategy works.  Value-at-risk model .
Up to this point, we have assumed that agents exclusively relied on valuation models to determine the number of shares to buy or sell in any given time step. To account for the market risk of the portfolio, we now introduce a risk model based on VaR position limits. We assume that for a given portfolio and time horizon ∆t h = t h − t the variation of the portfolio value is distributed normally with mean µ = 0 and normalised variance σ 2 t . An estimate for the maximum loss of the portfolio value Value P for the confidence level α is where z 1−α is the percentile of the normal distribution corresponding to a level of confidence equal to α.
. Let θ t be the order that an investor wants to issue according to its fundamentalist or technical strategy. Before sending this order to the market maker, the agent calculates the -tick VaR of the position it would have in the stock if the order θ t became e ective: In case the VaR of the desired position (Equation ) does not exceeds the VaR limit LVaR of the agent, the order is sent to the market maker to calculate the new price; otherwise, the agent needs to reduce the order to a level where the VaR of the resulting portfolio is below the limit (LVaR): Then the order actually sent to the market maker needs to be adjusted: Traders are heterogeneous in ther VaR limit and in the window used to calculate the volatility of the assets:

Measuring financial instability
.
The objective of this paper is to analyse whether countercyclical regulations contribute to market stability. It is di icult to define what financial stability exactly is, but all the proposed definitions agree that financial stability is linked to the absence of crises, stress or excessive volatility (Gadanecz & Jayaram ). It is even more di icult to measure financial stability: to this aim, central banks and other regulators use indices that combine simple indicators that provide information not only on financial markets but also on real economy or corporate sector to account for the fact that financial stability is connected to the proper functioning of the macroeconomic environment (Manamperi ) . Our model is just a stylised version of a stock market, and so we cannot implement stability indicators pertaining to any sector other than financial markets. Building on the real-world indicators used by regulators in this sector, we will implement the following indicators of financial instability, which essentially measure the intensity of price movements and the fragility of market participants: • Return volatility: Market volatility, which measures the size of price movements (Gadanecz & Jayaram ), is the most usual indicator of financial stability (The World Bank ). We define volatility as the standard deviation of the return series of an asset, r, calculated within a window w: where µ r is the average of returns r calculated within the same window w.
• Return kurtosis : Kurtosis of returns is the fourth central moment of the return distribution: where µ r is the mean and σ r is the standard deviation of returns r, both calculated within the window w. Kurtosis measures the size of the tails of the probability distribution of returns (Tsay ), and so it has been used as an indicator of financial stability (Brunnermeier & Pedersen ; Peters ), since a higher value of kurtosis is a sign of a higher frequency of extreme returns. However, it must be pointed out that kurtosis is quite sensitive to the appearance of outliers because the deviation of each observation with respect to the mean is raised to the fourth power (Rebonato ).
• Hill tail index: Apart from kurtosis, the behaviour of the tails of the return distribution can be described through the tail index. In recent years it has been determined that the complementary cumulative distribution function of returns asymptotically follows a power law distribution (also sometimes called Pareto distribution) and so the descent of the probability density function also follows a power law distribution in the tails with exponent α + 1 (Cristelli ). The exponent α coincides with the so-called tail index of the return distribution, which measures the order of the largest absolute moment that is finite (for example, the tail index of a normal distribution is ∞ because all of its moments are finite, and the greater this index is, the thinner the distribution tails are) (Cont ). The exponent α is usually estimated with the Hill index , which is the maximum-likelihood estimator of the tail index (Einarsson ). So, when the Hill index of the return series takes a low value, it indicates that returns are more likely to take extreme values, what is a sign of heightened instability (Hermsen ).
• Investor strength: Building on the z-score used to measure the fragility of banks (Beck et al. ), we define an indicator of investor strength as the ratio between the end-of-simulation accumulated profits and the standard deviation of these final profits. This indicator provides an idea of the consistency of traders' results and so of their stability.

Parameters .
Table summarises the value of all the model parameters used in the results described next. When choosing these values, we have applied the following criteria: • For those parameters that are a direct adaptation of real strategy parameters, we have simply chosen realistic values.
• For those parameters not 'observable' in real markets, we have adjusted their value with the aim of obtaining reasonable price dynamics that satisfy as much as possible the stylised facts of stock markets (Cont ; Taylor ). In particular, the model captures the following properties: -Lack of return autocorrelation: The autocorrelation function of the return series obtained from the simulations tend to when the lag increases.
-Fat tails: The distribution of the return series obtained from the model is more leptokurtic than the normal distribution. Returns present excess kurtosis, and their histogram has more mass in the center and the tails than a normal distribution.
-Volatility clustering: The autocorrelation function of volatility -estimated either as the absolute value or the square of returns -remains positive for several lags, and volatility presents long-term memory.
-Correlation between volume and volatility: The correlation between trading volume (calculated as the sum of orders issued by all the agents in absolute value) and volatility is positive.
-Volume autocorrelation: The autocorrelation function of the volume series obtained from simulations remains positive for several lags and decays slowly to , and volume has long-term memory.
. Next, we describe in more detail how we have calibrated each parameter : • Parameters associated to price formation: The impact of traders in price formation is normalised with the liquidity parameter λ, so this parameter is linked to the number of agents (the higher the trader population size, the higher the liquidity). Although this parameter has an empirical interpretation, its value is not observable, and it has then been calibrated by looking at the stylised facts replicated by the model. The random term in price formation (see Formula ) is governed by the standard deviation parameter σ P , whose value has been set to obtain an overall price volatility value in line with empirical daily volatility of S& P (assuming here that one time step is equivalent to one trading day).
• Parameters associated to fundamental value formation: The fundamental value process depends on the standard deviation term σ V . This has been calibrated based on the stylised facts replicated by the model.
• Parameters associated to the fundamentalist strategy: Although we do not have empirical evidence on which thresholds are used by fundamentalist traders, we have used plausible values for the mispricing level required to enter and exit a position (T f , τ f ), and we have fine-tuned these values -together with the unobservable parameter v f -by looking at the stylised facts replicated by the model.
• Parameters associated to the technical strategy: To implement the technical trading strategy, we have built on techniques widely used in real markets, and so when it came to setting the values of the di erent windows we turned to the practitioner literature. The windows for the short-and long-term moving averages (w tr S , w tr L ) move around and as these are the values usually employed by real technical investors (Kestner ); the window for the exit channel moves around as this is the typical period (Milton ).

E ect of VaR Models
. In this section we will show that the use of VaR position limits impacts price dynamics and market stability .
For that aim, we will next study how an increasing use of VaR-based position limits has a noticeable e ect on the instability indicators described in Section . .

.
We consider a one-asset market where the proportion of traders -both fundamentalist and technical investorsthat manage their risk with VaR limits rises across experiments from % to %. That is, in the first experiment no agent uses VaR, whereas in the last experiment all agents are using VaR. We assume that all traders are homogeneous in their VaR limit and volatility window: In all the experiments, simulations have a duration of time steps (in order to calibrate variables such as price volatility we assume that each time step is equivalent to day, and so each run has an equivalent duration of years). Each experiment consists of runs and uses the parameters listed in Table . We are using identical random number sequences across the di erent experiments so that the results become comparable. .
Figure shows the evolution of the di erent instability indicators when the percentage of traders using a VaR system increases from % to %. The four indicators show that the market becomes more unstable when most traders manage their risk with VaR limits: the volatility of returns heightens, the kurtosis of returns rises and their Hill tail index goes down -which indicates that extreme returns are more frequent -, and the index of trader strength also worsens -because the dispersion of agent profits increases. When a high percentage of traders are using VaR limits, the average market instability increases because of the emergence in some runs of a particular price dynamics which we have called 'VaR cycles'. In fact, the outliers observed in Figure are realised in those runs where VaR cycles are specially remarkable. Let's have a look at a particular simulation to describe in detail the functioning of such cycles.   . Price behaviour from t = 2400 on is due to the trader action a er reaching their VaR limit. Figure exhibits the VaR of agents' portfolio, averaged over fundamentalist and technical investors. This VaR is calculated with the positions that agents would accumulate if they were allowed in the current time step to buy or sell the amount dictated by their trading strategy. From t = 2400 onwards, agents' VaR exceeds their LVaR limit -represented with a horizontal, red line -, and so traders are forced to forget about their âĂŸdesiredâĂŹ orders and need to reduce their portfolio to keep their VaR below the limit. . Note that major price movements are caused by agents reducing their portfolio, but this does not mean that price exhibits VaR cycles every time that an agent is forced to liquidate part of its positions. In fact, there are JASSS, ( ) , http://jasss.soc.surrey.ac.uk/ / / .html Doi: . /jasss. some fundamentalist agents that touch their VaR limit before t = 2400 and are thus forced to reduce their positions, but the average VaR over all the fundamentalist population lies below the limit as seen in Figure . As these reductions are small compared to the total trading volume, their impact on price is minor. However, when most agents accumulate substantial positions and their portfolio VaR is close to the limit, any small upsurge in volatility can make VaR rise above the limit and force traders to liquidate positions. When a number of traders must reduce their portfolio at the same time, these reductions have a noticeable impact on the price and, in turn, on volatility.
. Figure shows the time series of price, return volatility and 'forced' portfolio reductions of fundamentalist (in orange) and technical traders (in green). When these reductions are di erent from zero, it indicates that at least some agents not only cannot send to the market their 'desired' order -that is, the order dictated by their trading strategy -, but are forced to partially liquidate their positions to reduce their VaR to an acceptable level. It can be observed that within the interval t = 2500 − 2850 -zoomed in Figure -, the first substantial portfolio reductions around t = 2550 push the price down and the volatility up, but this process keeps along for a while because the increase in volatility rises again the VaR of agents, which must reduce again their positions, and so on. . When agents have su iciently reduced their portfolio, their orders get smaller and the price decline slows down. Volatility remains high while the window over which it is calculated still includes the first major movements in price. Nevertheless, when time goes by and volatility decreases, traders start trading again as usual. If there is some coordination between investors and they simultaneously buy or sell, then the price movements can be substantial enough to raise again volatility and cause agents to reach their VaR limit. The 'VaR cycle' may thus repeat once more (see for example the portfolio reductions around t = , , etc. which plunge the price and raise the volatility). .
In the experiments just described we have seen that the higher the proportion of agents using VaR, the higher the possibility that VaR cycles emerge, that is, episodes where the reduction of positions by some traders rises the volatility enough to force other agents to sell o part of their holdings to reduce their exposure, thereby increasing volatility again and reinforcing the destabilisation spiral. Given that the market is more likely to su er instability bouts when all of the agents use a VaR system, our experiments suggest that, at the global level, it would be more beneficial that not all of the investors control their positions with a VaR-based limit; they could use other types of risk management models, or at least they could use more flexible limits that do not force them to reduce their portfolio automatically when exceeding their risk threshold.
. The appearance of VaR cycles largely depends on the value of the parameters used by traders in their VaR model. We will next summarise the e ect of the volatility window and the VaR limit in the potential market destabilisation.

E ect of VaR model parameters .
We will explore next the impact of a varying value of the window used to calculate volatility in the VaR model, w σ , and of the position limit used by the agents to control the risk of their portfolio, LVaR. We summarise in Figure the behaviour of the di erent instability indicators when the VaR limit takes values from LVaR = 5 to LVaR = 65 and the window volatility takes values from w σ = 5 to w σ = 50 days. In all the contour plots the colour red identifies the most unstable situation (for example, the highest values of volatility or the lowest values of the Hill index).
. Several indicators point out that the most unstable scenario is achieved when investors use a small window to calculate volatility and they moreover use an intermediate VaR limit; return volatility and Hill index are particularly clear in this regard. On the one hand, when volatility is calculated using a small window, that is, considering just a few observations, each of these observations has a great weight in the outcome, and volatility turns out to be very sensitive to recent price movements. So when the volatility window is small, VaR can significantly increase from one tick to the next, whereas when volatility is calculated with a higher window, a much sharper price variation is required for volatility to notice it. For this reason, using a medium-or long-term window to calculate volatility highly reduces the appearance of VaR cycles and so improves market stability.

.
On the other hand, the behavior of the various indicators leads us to conclude that the market is particularly stable when the limits are either very restrictive or very loose. If the VaR limit takes a low value, this considerably constrains the positions that agents can take, because the VaR of their portfolio is proportional to the asset positions. So, even though they reach their limit more frequently and are forced to reduce their portfolio, they cannot send large orders to the market because their positions are not huge, and VaR-caused reductions have a smaller e ect in market dynamics. On the other hand, if the VaR limit takes a high value, then agents are less likely to reach their limit, and so price dynamics do not di er much from the case in which agents do not manage their risk (in fact, a scenario with a high enough VaR limit is equivalent to a model without VaR). It is for intermediate values of the VaR that prices show the most interesting dynamics, with the appearance of VaR cycles when the risk-driven portfolio reductions have a noticeable e ect on prices and volatility. We note that there is no need to consider unrealistic values of the VaR limit for instability episodes to appear: VaR cycles are most likely to appear for LVaR = 11-14, which correspond approximately to % -% of the average value of traders' portfolio, and in real markets it is quite probable that a financial institution facing losses of this magnitude liquidates some positions to prevent that losses heighten. Figure : Graphical summary of instability indicators when the VaR limit (x-axis) increases from to and the volatility window (y-axis) increases from to .

Can Regulation Counteract the E ects of VaR Models?
. In Section we have seen that the widespread use of VaR system has the potential to generate instability spirals where agents are forced to reduce their portfolios when hitting their VaR limit, and these reductions move the prices, increase market volatility and cause a new wave of reductions that reinforce market instability. In view of the procyclicality induced by this type of risk management models, whose use in particular is encouraged by the Basel regulatory capital framework, the new Basel III Capital Accord introduces two measures aimed at reducing the procyclicality of capital requirements: a countercyclical bu er that urges banks to increase their capital reserves during "good times" and reduces capital requirements when the situation worsens, and stressed VaR, which adds an additional term to the calculation of market risk requirements that covers a period of special financial turmoil. .
In this section we will study the e ectiveness of two regulations that build on the two countercyclical measures introduced in LVaR min = 30, LVaR max = 40 w σ min = w σ max = 5 .
In this 'adverse' scenario we will better see if the proposed regulations are successful in stabilising the market, and which one is more e ective in this regard.

Countercyclical VaR limits .
The principal objective of the Basel III countercyclical bu er is to avoid the natural inclination for banks to relax their risk control standards during periods of credit growth by urging them to increase their capital requirements. In downturns, these requirements are reduced so that credit supply is not constrained and economy performance is not impaired (McCoy ). The adjustment of the countercyclical bu er depends on the macroeconomic conditions in which banks operate, and follows a rule-based approach combined with discretionary judgement by national policymakers (Basel Committee on Banking Supervision ). As our model does not consider the macroeconomic sector and cannot account for the discretion attributed to regulators, we cannot implement the countercyclical bu er as it stands in the Basel III Accord; instead, we will model a rule-based regulatory mechanism that captures its essence and primary objective: countercyclical VaR limits. .
We next consider a variation of the model presented in Section where VaR limits are variable and are adjusted according to the financial situation, using the same rationale behind the countercyclical bu er: when the market is stable, VaR limits are reduced to prevent agents from accumulating excessive positions. When, on the contrary, the market is unstable, VaR limits are risen to avoid that agents are forced to liquidate their positions and exacerbate instability. To decide when the market is (or not) stable, agents compare the current volatility to the historical volatility, and update their VaR limit according to the ratio between both volatility values: To test the e ect of this regulatory measure, we consider a market where the proportion of agents that use countercyclical VaR limits rises across experiments from % to %. That is, in the first experiment no agent uses countercyclical VaR limits, whereas in the last experiment all agents are using them. As said above, we assume that all traders are managing their risk with VaR using those values for the (initial) VaR limit and volatility window which maximise market instability .
. Figure shows the evolution of the di erent instability indicators when the percentage of traders using countercyclical VaR limits increases from % to %. The four indicators show that market stability improves when more and more traders use countercyclical limits to manage their risk: the volatility of returns declines, the kurtosis of returns goes down and their Hill tail index increases -which indicates that extreme returns are less frequent -, and the index of trader strength also rises -because there is less dispersion in agent profits. In fact, it is su icient that half the population uses this regulatory measure to observe a noticeable recovery in instability indicators, because the pressure to liquidate positions gets smaller and so VaR cycles are less likely to appear.

.
Further to the results shown in Figure , we have conducted a series of Wilcoxon-Mann-Whitney tests to compare the mean instability of the market âĂŞ measured as the return volatility âĂŞ under di erent percentages of agents using countercyclical VaR limits. Two-sided p-values obtained from each test are shown in Table , where the percentages shown in row and column headers indicate the percentage of agents using countercyclical VaR limits in the two scenarios being compared. We can observe that there is no significant di erence in return volatility when the percentage of agents using countercyclical Var limits is similar (cells close to the diagonal of the table); however, an increase of only % in this percentage can produce a noticeable e ect on price dynamics that leads us to reject the null hypothesis and conclude that volatility is significantly di erent -in Table we have highlighted in yellow and orange those tests where the null hypothesis is rejected at a significance level of . and . , respectively.
In addition to the countercyclical bu er, Basel III Accord introduces the stressed VaR to reduce the specific procyclicality caused by market risk requirements. The stressed VaR component is calculated as the VaR of the current portfolio during a period of significant stress (Basel Committee on Banking Supervision ). It provides then an estimation of the maximum loss that the current portfolio could su er in the case of an extreme event. .
Stressed VaR is calculated using the same methodology than the usual VaR with the only di erence that instead of building on recent volatility data it builds on historical volatility data belonging to a period of financial stress, such as the crisis of -when banks su ered significant losses (Basel Committee on Banking Supervision ). Market risk capital requirements are then calculated as the sum of the usual VaR plus the stressed VaR. This additional term increases the capital reserves to be held by banks and this is expected to have a positive impact on market resilience.

.
To analyse the e ectiveness of this measure, we will add a stressed VaR component to the risk management system employed by the agents. Building on the specifications of Basel III Accord (Basel Committee on Banking Supervision ), we calculate the stressed VaR (sVaR) as the usual VaR, but taking the most volatile period since the start of the simulation to compute volatility. That is, we calculate stressed VaR following Equation but replacing current value of volatility σ t by its highest value since the start of the simulation. The total VaR of the portfolio is then the sum of the usual VaR plus the stressed VaR, and agents must ensure at each time step that this total VaR does not exceed their VaR limit LVaR.

.
To test the e ect of this regulatory measure, we consider a market where the proportion of agents that use stressed VaR rises across experiments from % to %. As done in the experiments with countercyclical VaR limits, we assume that all traders are managing their risk with VaR using those values for the VaR limit and volatility window which maximise market instability . .

Figure
shows the evolution of the di erent instability indicators when the percentage of traders using stressed VaR increases from % to %. The four indicators show that market stability improves when more and more traders add the stressed VaR component to their usual VaR. These results are qualitatively similar to those obtained for the case of countercyclical VaR limits, and as observed in Section . -. , it is su icient that half the population uses this regulatory measure to observe a noticeable recovery in instability indicators. In this case, the need to keep total VaR below the limit restricts agents' capacity for action and reduces the number of VaR cycles. .
When agents use stressed VaR, the total VaR of the portfolio increases because the additional term of stressed VaR must be taken into account. In a sense, this has an e ect similar to lowering the VaR limit, as agents must make a harder e ort to keep their positions at bay: if they accumulate higher positions, not only their usual VaR increases, but also their stressed VaR, and in this situation it is easier to exceed the VaR limit and be forced JASSS, ( ) , http://jasss.soc.surrey.ac.uk/ / / .html Doi: . /jasss.
to liquidate positions. This constrains agents' positions, reduces their orders and -when the VaR limit is hitmoderates the impact of their portfolio reductions on price. On the other hand, the additional term of stressed VaR is more 'constant' than the usual VaR since it is calculated on the basis of the most volatile period and so it is less likely to react to current volatility (unless it is a specially unstable moment). In this way the use of stressed VaR decreases the emergence of VaR cycles and helps to stabilise the market. Figure : Evolution of instability indicators when the percentage of agents using stressed VaR increases from % to %. From top to bottom: return volatility, return kurtosis, return Hill tail index, and agent strength index. .
As done in Section . -. , we have also conducted a series of Wilcoxon-Mann-Whitney tests to compare the instability of the market under di erent percentages of agents using stressed VaR. The results, summarised in Table , exhibit a similar pattern: the null hypothesis gets rejected when slightly moving away from the table diagonal, meaning that a small increase in the percentage of agents using stressed VaR tends to be su icient to produce a significant reduction in market volatility.
< . < . < . < . < . < . < . < . . Table : P-values obtained from the series of Wilcoxon-Mann-Whitney (WMW) tests for return volatility. The p-value reported in row x% and column y% is obtained from the WMW test with null hypothesis that return volatility when x% of agents are using stressed VaR does not di er from when y% of agents are using stressed VaR. Coloured cells indicate that the null hypothesis is rejected, at a significance level of . (yellow cells) or . (orange cells) .

Comparative analysis of countercyclical regulations .
In Sections . -. and . -. we have analysed two regulatory measures aimed at reducing the procyclicality of VaR systems: countercyclical VaR limits and stressed VaR. We have seen that both measures meet their objective: when put to test under the most adverse scenario, both reduce noticeably market instability. In fact, it is usually enough that half the population uses one of these measures for the instability indicators to show a clear improvement.
. But which of the two measures is more e ective? To answer this question, in Figure we summarise in a comparative way the evolution of the di erent instability indicators when the proportion of traders that use countercyclical limits or stressed VaR increases from % to %. This will allow us to better discern if one of those two measures has a more palpable e ect on counteracting the emergence of VaR cycles. .
The various indicators reveal that the adoption of countercyclical VaR limits and stressed VaR has a similar e ectiveness in neutralising the impact of VaR cycles and reduce market instability: all the indicators take comparable values when the proportion of agents that use one or the other regulatory measure increases, so it indicates that both countercyclical mechanisms are equally e ective. .
To test if there is a statistically significant di erence between the e ects of countercyclical VaR limits and stressed VaR, we have run a series of WilcoxonâĂŞMann-Whitney tests with null hypothesis that return volatility when x% of agents are using countercyclical VaR limits does not di er from when the same percentage of agents are using stressed VaR. P-values obtained from each test are shown in Table , where we can observe that there is no significant di erence in return volatility when the percentage of agents using countercyclical Var limits or stressed VaR is low to medium. Only when most agents are using one of these measures the null hypothesis is rejected and we then can conclude that the e ect of the two regulations is su iciently distinguishable from a statistical point of view.  .

Percentage of agents using countercyclical
To complete the analysis we provide below in Figure  .
To get a better idea of the e ect of both regulatory measures, in Figure we contrast the behaviour of the four instability indicators with the baseline scenario where all agents use VaR with constant VaR limits (that is, the case considered in Section ), to see whether countercyclical VaR limits and stressed VaR reduce market instability for any combination of the parameters LVaR and w σ , and to compare the extent of this reduction. In all the heatmaps the colour red identifies the most unstable situation (for example, the highest values of volatility or the lowest values of the Hill index), and to facilitate the comparative analysis, we use the same scale in each row. In this way the graphics in Figure provide a good insight on which measure turns out to be more e ective for a broader range of parameters.
The comparative analysis in Figure has clearly shown that both the use of countercyclical VaR limits and Figure : Graphical summary of instability indicators when the (initial) VaR limit (x-axis) increases from to and the volatility window (y-axis) increases from to .
stressed VaR reduce market instability not only in the scenario most prone to the appearance of VaR cycles (as seen in Sections . -. and . -. ), but also for the rest of values of the VaR limit and the volatility window. As already observed in Sections . -. , the results obtained with countercyclical limits or stressed VaR appear to be equally e ective, both in the "critical" region of highest instability (that is, the read areas in the le -hand graphics in Figure ), and in the rest of scenarios.
. We can conclude from this that the reformulation of capital requirements introduced in Basel III Accord, which introduces the countercyclical bu er and adds stressed VaR to usual VaR, is a wise decision to improve capital standards and strengthen bank stability because it prevents or reduces the severity of high-instability episodes. However, it must also be taken into account that these are strict measures, as they significantly increase capital requirements, especially in the case of stressed VaR. Countercyclical VaR limits vary according to market fluctuations and may leave more leeway to financial institutions during episodes of turmoil; however, the stressed VaR always refers to a historical period of significant stress and therefore its value exceeds that of usual VaR (and despite being less reactive to current volatility, it will tend to grow if instability increases).
. So stressed VaR improves market stability, but at the cost of constraining the freedom of action of traders, who cannot accumulate large positions. In fact, stressed VaR has been criticised by the banking industry for the significant increase in the capital reserves they need to keep (Choudhry ; Lobanov ). This has an impact not only at the individual level, but also at the global level, as market e iciency decreases. In Figure we find that the average distance between the time series of price and fundamental value goes up when the number of agents that use stressed VaR increases, since the action of fundamentalist traders -who prevent price from diverging from fundamental value -gets constrained and their ability to move the price towards fundamental value diminishes. However, it is not the case when the proportion of agents that use countercyclical VaR limits increases. This highlights that, although stressed VaR is an e ective measure against financial instability, it has side e ects that cannot be ignored, and would provide support to those economists that advocate for the adoption of countercyclical bu ers into the VaR model itself instead of the addition of the stressed VaR term (Choudhry ).

Figure :
Average distance between time series of price and fundamental value over runs, when the proportion of agents using countercyclical VaR limits (in violet) or stressed VaR (in blue) increases.

Conclusions
. In recent times the use of risk management systems has become widespread, and VaR has come to be the main methodology at most financial institutions. VaR models assume that risk is exogenous, that is, prices are not a ected by actions of financial institutions that are trying to estimate the risk of their portfolio (Morris & Shin ; Daníelsson et al. ). This is possibly right most of the time, when investors trade with di erent strategies and criteria. But it is precisely those (even if very rare) occasions when investors act in a uniform way that are of interest, since traders' aggregate action can move the prices and trigger an instability spiral. The use of VaR systems is precisely one of the mechanisms that contribute to homogenise the behaviour of market participants: when -for any reason -volatility goes up, so does the VaR of investors and in case it exceeds the limit, agents are forced to reduce their portfolio at the same time. If, in addition, traders hold similar positions, the way is paved for portfolio reductions to plunge the price, increase the volatility and raise again the traders' VaR. It is therefore a scenario of endogenous risk, since the use of VaR systems has the potential to amplify market instability and feed it back. .
In this article we have studied in which circumstances VaR systems do amplify price fluctuations, and have tested the e ectiveness of two regulatory measures aimed at improving the resilience of financial markets. To this aim, we have built an agent-based model, which can capture both the e ect that market has on individual investors as well as the global e ect that emerges from the aggregation of individual actions. Indeed, the flexibility of agent-based models to reflect the behaviour of individual agents and their interactions makes them a more suitable approach for policy analysis than traditional, equilibrium-based models (Fagiolo & Roventini ). .
We have considered a model of fundamentalist and technical traders which manage their risk with a simple VaR model and must reduce their positions when the risk of their portfolio goes above a given threshold. We have analysed the impact of the widespread use of VaR systems on di erent financial instability indicators âĂŞ volatility, return kurtosis, Hill index of returns and trader strength âĂŞ and we have confirmed that, in a certain number of runs, VaR models induce a particular price dynamics that rises market volatility. These dynamics, which we have called 'VaR cycles', take place when a su icient number of traders reach their VaR limit and are forced to simultaneously reduce their portfolio; the reductions cause a sudden price movement, upsurge volatility and force even more traders to liquidate part of their positions due to the new increase of their VaR. .
Economists and regulators have argued in the last years that countercyclical regulations should be introduced to avoid this kind of vicious dynamics, and the Capital Accord of Basel III already implements two countercyclical mechanisms to prevent banks from entering into riskier positions during calm periods. We have used our model to test the impact of two regulatory measures based on these Basel III new countercyclical mechanisms and study their e ectiveness in reducing the procyclicality inherent to VaR systems: • Use of countercyclical VaR limits: We have analysed the e ect of traders using variable, countercyclical VaR limits to control their positions. When the market is stable, agents reduce their VaR limit to preclude the accumulation of excessive positions, whereas they raise their limit when the market is more volatile to avoid collective, simultaneous portfolio reductions.
• Stressed VaR: We have analysed the impact of traders adding a stressed VaR component -that is, VaR calculated during a period of significant financial stress -to their risk management model.

.
Simulations have shown that an increasing adoption of both regulatory measures has a positive and comparable e ect on the various instability indicators considered in the paper. When most traders are using countercyclical VaR limits or stressed VaR in their risk management system, the market becomes less prone to su ering VaR cycles and so its stability increases. On the basis of these results, we can conclude that the countercyclical mechanisms introduced in Basel III Accord are a promising step towards improving capital standards in market risk. ). In this section we analyse the robustness of the model results with respect to changes in parameter values. To this aim, we perform a sensitivity analysis using the one-factor-at-a-time methodology (Ten Broeke et al. ), varying one parameter at a time to observe its impact on results.
We use an extreme case analysis (Taylor ) where we choose an upper and lower bound for each parameter and re-run the experiments to compare the results with the base case shown in Section . The extreme bounds have been selected as the lowest and highest values of each parameter ( ) that make sense (e.g., the long-term window used by technical traders cannot be smaller than the short-term window), and ( ) for which the basic model where agents use no VaR still satisfies the stylised facts replicated by our model (for a description of these stylised facts, see Llacay & Pe er ( )).
Next ,         Figure : E ect of the adoption of countercyclical regulations on return volatility for di erent values of TREND exit channel window [w tr C min , w tr C max ]. Le : The percentage of agents using countercyclical VaR limits increases from % to %. Right: The percentage of agents using stressed VaR increases from % to %. Mean of return volatility is calculated over runs.

Notes
The Dodd-Frank Wall Street Reform and Consumer Protection Act of also introduces changes to make minimum capital requirements countercyclical in the U.S (Kowalik ).
The model code is available at https://github.com/gitwitcho/var-agent-model This implementation of the fundamental strategy is based on (Farmer & Joshi ).
There is abundant literature on how to measure financial stability. The interested reader can refer to the papers of Gadanecz & Jayaram ( ) or Dyrberg ( ) for a review of financial stability indicators, or to the list of financial soundness indicators used by the IMF to assess the health of financial institutions (International  Monetary Fund ).
In fact, we implement excess kurtosis, which is equal to k r t − 3, where is the kurtosis of a normal distribution.
The notation ∼ is used to describe the asymptotical behaviour of a function (Clegg ): f (x) ∼ g(x) → lim x→∞ Let k be the number of observations in the tail of a distribution. If these observations are sorted in descending order, x (1) ≥ x (2) ≥ · · · ≥ x (k) , then the Hill estimator is defined as (Einarsson ): The calibration has been done before introducing the VaR model, to have a valid testbed where to study the e ect of risk management practices.
For a more exhaustive analysis, please refer to Llacay ( ).
The volatility/kurtosis/Hill index boxplots show the standard deviation/kurtosis/Hill index of the entire time series of returns across the runs. The line plot for the strength index shows the ratio of the mean of the endof-simulation wealth across the runs divided by its standard deviation.
A VaR limit ranging from to is equivalent to setting the limit of losses to approximately % -% of the average value of traders' portfolio.
The value of the instability indicators shown in Figure is an average over runs for each pair of values of VaR limit and volatility window. In the case of the investor strength index, it is an average over the two groups of agents (fundamentalist and technical traders).
As in Section , all simulations have a duration of time steps, and each experiment consists of runs and uses the parameters listed in Table . We are using identical random number sequences across the di erent experiments so that the results become comparable.
The volatility/kurtosis/Hill index boxplots show the standard deviation/kurtosis/Hill index of the entire time series of returns across the runs. The line plot for the strength index shows the ratio of the mean of the endof-simulation wealth across the runs divided by its standard deviation.
We have opted for the nonparametric WilcoxonâĂŞMannâĂŞWhitney test instead of the more usual t-test because our sample data does not satisfy the assumption of normal distributions required for conducting a t-test.
As in Section , all simulations have a duration of time steps, and each experiment consists of runs and uses the parameters listed in Table . We are using identical random number sequences across the di erent experiments so that the results become comparable.
The volatility/kurtosis/Hill index boxplots show the standard deviation/kurtosis/Hill index of the entire time series of returns across the runs. The line plot for the strength index shows the ratio of the mean of the endof-simulation wealth across the runs divided by its standard deviation.