A Data Rich Money Market Model
Agent-based Modelling for Financial Stability
Paul Devine and Rahul Savani
Dept. of Computer Science, University of Liverpool, Liverpool, L69 3BX, UK
Keywords:
Agent-based Model, Financial Stability, Money Markets, Liquidity, Contagion, Regulation, Risk.
Abstract:
Our position is that agent-based modelling is a potentially powerful complementary tool in the study of finan-
cial systems, especially where institutional behavioural factors and empirical data are incorporated. The work
reported here concerns an agent-based model of a banking system focused on liquidity provision, principally
the flows of cash between banks and other system actors. This model has been developed in conjunction with
senior staff drawn from a major UK bank and consultancy and is highly data-rich in comparison with previous
theoretical work in the field. Agents and relationships reflect practitioners’ views of the system and it incor-
porates institutional balance sheet representations, financial instruments together with real-world data collated
from a range of sources. The bank agents in the model possess heterogeneous behaviours and data content
drawn from real bank data. We report preliminary studies of the dynamical behaviour of this system in the
context of the types of systemic shocks and perturbations observed in the real world. We review results which
model the impact on a bank of a perceived lowering of its creditworthiness. These dynamics are not the result
of endogenous assessments of the bank’s position, but the interplay of other banks’ and actor’s responses with
its own behaviour.
1 INTRODUCTION
Our contention is that data-rich agent-based models
can become a valuable component of the toolkit avail-
able for analysis of financial systems. The finan-
cial system is comprised of a large number of ac-
tors, financial instruments and relationships and is a
considerable challenge to both model and regulate.
This challenge has become more urgent since the sub-
prime crisis of 2008 which precipitated substantial
state intervention to shore up the system. A feature of
that crisis was the evaporation of the interbank money
market, the system by which liquidity (cash) is ac-
cessed by banks to meet their immediate needs. Tradi-
tionally, theoretical system models are high level and
use macro-economic techniques, while at the institu-
tional, real-world level a large amount of financial and
balance sheet data may be analysed.
To this end, we have taken an intermediate ap-
proach, developing an agent-based model to simulate
the system actors and their interactions with a par-
ticular emphasis on the provision of liquidity. This
facilitates individual behaviour to be explicitly mod-
elled and the individual corporate actors in the system
differentiated by this behaviour and their state data.
It has been argued that the crisis exposed the limi-
tations of traditional approaches, and that agent-based
models may be essential to building effective mod-
els of the economy to address these shortcomings
(Farmer and Foley, 2009). The promise of apply-
ing agent-based models to the economy had already
been noted in the context of the shortcomings of ap-
proaches that assume homogeneity or weak hetero-
geneity (Gallegati et al., 2003). Subsequently, agent-
based models have been applied to areas of the sys-
tem including housing (Geanakoplos et al., 2012) and
its contribution to systemic risk. We concur with this
and believe that no single paradigm is adequate for
a sufficient understanding of the system. Macro ap-
proaches such as Dynamic General Stochastic Equi-
librium (DGSE) models describe the system in a rela-
tively stable state, not the unstable systemic dynamics
that often occur under stress or at the periphery of this
region. Traditional models of financial systems and
stability used by banks, central banks and regulatory
bodies are typically highly data intensive, concentrat-
ing on the systematic evaluation of balance sheets and
known exposures. For example, the Bank of England
employs the RAMSI stress testing framework (Bur-
rows et al., 2012) which entails the collection and
231
Devine P. and Savani R..
A Data Rich Money Market Model - Agent-based Modelling for Financial Stability.
DOI: 10.5220/0005096602310236
In Proceedings of the 4th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH-2014),
pages 231-236
ISBN: 978-989-758-038-3
Copyright
c
2014 SCITEPRESS (Science and Technology Publications, Lda.)
processing of a wide range of publicly available data
together with regulatory data submitted in confidence
by the banks. The goal of RAMSI is to identify po-
tential deficiencies or weaknesses in a specific part of
the system. In stark contrast are theoretical models of
contagion, e.g. the seminal work by Allen and Gale
(Allen and Gale, 2000) where liquidity is modelled as
an equilibrium process with counterparty risk acting
to spread contagion. These examine mechanisms and
structures in a manner that could not be further re-
moved from bankers’ balance sheets, financial instru-
ments and day-to-day activities. The underlying tech-
nical infrastructure of centrally cleared interbank cash
flows, Real Time Gross Settlement Systems (RTGS),
has also been investigated from an agent-based per-
spective, in modelling (Biancotti et al., 2009), design
and operational (Galbiati and Soramki, 2011) con-
texts. Our agent-based approach is intended to cap-
ture some elements of all.
2 THE TARGET DOMAIN
Money Markets are central to the effective opera-
tion of the financial system and were first analysed
in the 19th century (Bagehot, 1873) when the Lon-
don market was pre-eminent. In fact, banking crises
and financial bubbles long predated this, having been
a problem in ancient Rome (Thornton and Thornton,
1990), as was the formulation of effective regulation.
The market consists of a highly heterogeneous set of
actors, complex interactions and a lack of clarity in
overall exposures, largely due to the opacity of coun-
terparty risk. In terms of investigating liquidity risk as
a systemic threat, endogenous cycle and macro stress
testing models tend to have little behavioural con-
tent, though post-crisis analysis has highlighted the
behavioural factor in events (van den End and Tabbae,
2012). It has been hypothesised that the overnight
market freeze of August 2007 was due to the adop-
tion of precautionary behaviours (Acharya and Mer-
rouche, 2012). Crucially, the potential for crisis does
not appear to have receded, the Chinese interbank
market froze in 2013 with interbank rates peaking at
25% (Economist, 2013).
Interbank liquidity is essential for the smooth op-
eration of banking, banks rely on the availability of
cash and highly liquid assets to meet their obligations
to clients and to engage in financial transactions. Re-
quirements may vary greatly during any given time
period, with extremely large volumes of cash typi-
cally flowing both into and out of banks on a daily
basis. This is driven by trading activities in equities,
bonds and foreign exchange markets, together with
the needs of customers to make commercial and per-
sonal payments. The potential for contagion through
these linkages has long been recognised and has been
the subject of theoretical investigation and close prac-
tical scrutiny. A significant illustration of the cen-
trality of interbank liquidity occurred during the 2008
sub-prime crisis where institutions (e.g. Bear Stearns)
failed not as a result of insolvency, where total liabili-
ties exceed assets, but of illiquidity due to inability to
meet immediate liquidity requirements despite appar-
ently sound underlying balance sheets.
3 THE MODEL AND AGENTS
The core assumptions on which the liquidity model
is based were identified in collaboration with banking
professionals. The principal actors are: banks; cus-
tomers; the central bank; cash rich entities( CREs).
Cash and liquidity flows across the system between
individual banks and CREs with the central bank as
the final resort for liquidity. Customers represent the
real economy, withdrawing and depositing liquidity to
and from the system. The following five agent classes
were developed to represent principal actors, comple-
mented by a financial instrument type (contract) to
encapsulate the exposures and relationships between
market members.
Banks are the principal actors with the system.
Each bank contains a unique balance sheet, described
in Table 1, together with sample data used in the ini-
tial evaluation of the simulation.
Table 1: Bank Balance Sheet.
Assets £m
Cash and Reserves 68,487
Loans to Banks 97,140
Loans to Customers 489,399
Highly Liquid Assets (Bonds) 71,392
Illiquid Assets 706,363
Liabilities £m
Deposits from Banks 109,097
Deposits from Customers 472,388
Other liabilities 851,296
Equity 61,964
The balance sheet structure reflects its centrality to
practitioners’ perspectives on the market and incorpo-
rates features considered most salient for the proposed
work. Additional to this, a bank agent also contains
state information for risk appetite (ra) and creditwor-
thiness (cds) together with a full expression of the
bank’s assets and liabilities with respect to each of the
other banks and its known position at future points. At
SIMULTECH2014-4thInternationalConferenceonSimulationandModelingMethodologies,Technologiesand
Applications
232
any simulated day, d, a bank contains data that details:
total cash owed; total cash owing; cash owed (by in-
stitution); debts due at d + n; credits due at d + n. In
tandem with the balance sheet data this information is
available to be used in defining complex, differentiat-
ing behaviors across banking agents. The information
can also be used to evaluate the banks’ states in rela-
tion to proposed regulatory measures like the Liquid-
ity Coverage Ratio (LCR) (BIS, 2013) and Net Stable
Funding Ratio (NSFR) (BIS, 2014), proposed under
the Basel III regulatory regime designed in response
to the events of 2008.
Cash Rich Entities represent non-bank sources of
liquidity, for example corporations or money market
funds. Since the market for interbank liquidity be-
came moribund in the aftermath of the sub-prime cri-
sis, UK Banks have become more reliant on what they
refer to as Cash Rich Entities (CREs) for the provi-
sion of liquidity. The rise of the non-Bank Financial
Institutions (NBFIs) and Other Financial Institutions
(OFIs) has resulted in them being of great systemic
importance, a European Commissions study indicated
that their assets in the EU27 totalled e32.6tn in 2011,
exceeding those held by MFIs by c.50 % (EC, 2012).
Though used solely as potential sources of liquidity in
the preliminary work reported here, CREs have been
included not only due to their size, but also because
some are becoming increasingly important in Shadow
Banking.
The Central Bank (in the UK, the Bank of Eng-
land) is the lender of last resort and setter of inter-
est rates, it both participates in and, to some extent,
makes the market. The lender of last resort role,
where a the Central Bank acts as a source of liquid-
ity, can operate to smooth out inefficiencies in the
market (Matsuoka, 2012). However, in the after-
math of Lehmann Brothers’ collapse in 2008 Cen-
tral Banks intervened in what were considered non-
standard ways (Giannone et al., 2012), with banks be-
ing propped up due to systemic importance, ”To Big
to Fail” (TBTF) . Concerns with respect to the poten-
tial market distortions and moral hazard engendered
by TBTF are not new, Herbert Spencer, a nineteenth
century contemporary of Bagehot, argued ”the ulti-
mate result of shielding man from the effects of folly
is to people the world with fools”, a remark specif-
ically aimed at this activity (Kindleberger, 1996), a
sentiment that has been revisited with vigour post-
2008. Nevertheless, central banks on both national
and supranational levels are essential components of
the financial system. Their policies are vital in-
struments of market and regulatory control and they
can be conduits of state intervention. Cross-country
econometric analysis has indicated that the fiscal cost
of state and central bank support in crisis situations
may exceed 50 % of GDP (Honohan and Klingebiel,
2003). Like a real central bank, the central bank agent
sets the central bank interest rates and acts as a source
of liquidity.
Customers, retail and commercial, help drive
banks’ day-to-day liquidity activities which are heav-
ily informed by movements in deposits and with-
drawals. Though largely known in advance, there
are significant, unpredictable fluctuations which may
stress the institution’s liquidity position and a trend
towards heavy withdrawals may cause catastrophic
stress, ultimately leading to failure in the absence of
external intervention to shore up liquidity. This hap-
pened with Northern Rock in the UK. Customers have
been incorporated in the form of customer agents that
provides aggregated withdrawal and deposit activity
for corresponding bank agents.
Financial Instruments are incorporated into the
model as Contracts, illustrated in 1.
C = (p, r, d, m, t, l, b, y) (1)
The terms represent: p, principal, the amount
loaned; r, the rate of interest; d, the date of incep-
tion; m, the time of maturity; t, the term of the loan
(duration); l, the identity of the lender; b, the identity
of the borrower; y, the yield (expected profit) of the
contract. Contracts are used to build up interbank po-
sitions over four term lengths: overnight; one month;
three months; six months.
4 AGENT RELATIONSHIPS
Each bank has transaction relationships with a spe-
cific customer agent, a set of CREs, the central bank
and all other banks, or a subset. A subset in this con-
text represents preferential relationships, these may
exist in the market and evidence suggests that they
persisted through the 2008 crisis, facilitating the sup-
port of badly affected banks (Affinito, 2012) thus mit-
igating contagion. Transactions with customer agents
are straightforward withdrawals and deposits, those
with all other agents involve negotiation and the cre-
ation of a Contract, Contracts are then settled when
their terms are reached. The relationship networks
provide the routes via which stress and contagion may
propagate through the system.
5 IMPLEMENTATION
The model has been developed on the Repast Sim-
phony platform after investigating other options
ADataRichMoneyMarketModel-Agent-basedModellingforFinancialStability
233
(Railsback et al., 2006) and Java selected for the im-
plementation. Reasons for this selection include the
relative maturity of the platform, well developed li-
braries and data handling facilities.
Figure 1: Screen shot of the simulation.
The simulation is illustrated in figure 1 where the
evolution of the transaction network may be observed
and individual agents interrogated for their state vari-
ables. Scenarios and outputs may also be specified
and data collected for post simulation analysis. For
display purposes the customer agents have been ag-
gregated into a single visual representation.
5.1 Data Population
Data availability and consolidation is a challenging
issue, there exist both famine and feast in terms of
the the publicly available data. Banks’ annual and
quarterly reports contain a wealth of data, typically
running into hundreds of pages, this is far in excess
of requirements at this formative stage of the project.
However, quarterly and annual report balance sheets
only contain snapshots of a bank’s state, detail be-
tween the reporting periods is lost and the most in-
teresting features may not be widely known outside
the banks. Similarly, details of interbank exposures
are not publicly available.
Banks’ Balance Sheets were initialised from a
variety of sources, principally the institutions own
published consolidated balance sheets for the period
covering 2011 onwards. This was supplemented by
data obtained from Bureau Van Dijk’s BankScope
product, this makes balance sheet data available for
all a banks in Fitch’s uniform format.
Two further sources of data were utilised for set-
ting up banks’ initial states, and potentially drive be-
haviour during runs of the simulation. Credit Default
Swap (CDS) pricing, a proxy measure of an institu-
tion’s creditworthiness was gathered in the form of
daily prices for each bank corresponding the to bal-
ance data. During each run the CDS value within in
each bank may be adjusted in accordance with his-
torical data, or recalculated as required by simulation
scenarios or outcomes. The second data requirement
was for a means of initialising rates in the financial in-
struments, a realistic baseline being required. For this
the now somewhat discredited LIBOR data set was
used. LIBOR was a daily statement of interbank rates
over a range of terms and currencies collated from the
banks’ own submissions to the British Banking Au-
thority. It has been demonstrated that there were at-
tempts by some participating banks to manipulate the
published rates, this renders the data commercially
unreliable. However, extremely accurate data was not
required for our purposes and the magnitude of the
attempted manipulation was well within our require-
ments.
Customer Transaction data were not readily
available. In the absence of real day-to-day trans-
action data from the banks we approximated de-
posit/withdrawal behaviour from publicly available
data. Sources used included: Bank of England; BBA;
UK Cards Association. The data was used to prime
the activities of the customer agents, scaled in accor-
dance with their relative balance sheet sizes and then
subjected to a random positive or negative offset to
replicate the unpredictable component of daily trans-
actions. The customer agents may be further manipu-
lated to replicate customer withdrawal stress or excess
liquidity.
5.2 Model Operation
In its general form the model contains n banks, m
CREs, 1 central bank and x customer agents. It has a
flexible, discrete time-step form with the highest real
data resolution at the day level. For simplicity, in the
work presented here a time step is the equivalent to a
day. However, a facility to run multiple steps per day
was included to allow simulation of intra-day interac-
tions if necessary. In the reported form the simulation
is bank-centric. All banks are processed each step but
randomly chosen to avoid introducing ordering arte-
facts in the output data. For bank B
n
the behaviour
suite, i.e. activities it may initiate each step t, are as
follows:
B
n
receives withdrawal or deposit from customer
agent C
n
and updates balance sheet
If B
n
is solvent the bank is frozen
Calculate liquidity required to cover obligations
and satisfy LCR
SIMULTECH2014-4thInternationalConferenceonSimulationandModelingMethodologies,Technologiesand
Applications
234
Settle financial instruments due this step, updating
accordingly
Buy highly liquid assets (bonds) if cash supply al-
lows
Approach CREs for liquidity
Poll other banks to borrow liquidity (may be
routed through broker agent) for outstanding liq-
uidity requirement
Approach Central Bank if liquidity requirements
not met
If liquidity requirements are not met, sell liquid
assets at balance sheet value
If liquidity requirements are not met, sell illiquid
assets at discount (fire sale)
Each time step bank m may assess requests for
loans submitted by other other banks, these requests
are made in the form of a contract c. The lending de-
cision behaviour is governed by the function in 2.
f (LP
m
, CDS
n
, r
c
, y
c
, t
c
) (2)
Where LP is the liquidity position of bank m;
CDS
n
the creditworthiness of bank n; r the rate of c;
y the yield of c and t the term of c. Bank m may ac-
cept, reject or modify the terms of c, in the event of
modification a revised contract c
0
is returned to bank n
for acceptance or rejection, no further negotiation be-
ing entered into between n and m. In the preliminary
investigation, subject to LP
m
, contracts were assessed
on the basis of CDS
n
, r
c
and y
c
, weighted in that order.
More complex behaviours will be the subject of future
work and should be developed in conjunction with in-
dustry expertise. Stress may be applied system-wide,
to a single bank or a subset of banks. Potential sources
of stress are: Customers, nett withdrawals; CDS val-
ues, the creditworthiness of the bank; Devaluation of
illiquid assets; General system confidence.
5.3 Model Behaviour, a Credit Example
In common with many models of complex systems
this one can be highly sensitive to initial conditions
and initial work has concentrate on qualitative be-
hvoiurs. The example is illustrative of the type of re-
alistic qualitative behaviour the model exhibits. Two
scenarios are compared in Figure 2, the plots are for
a single bank within the system, not an aggregated
view, and cover a period of 800 working days.
Blue represents business as usual, for red all data
is the same except for stress applied to CDS spread of
one bank in the ten, effectively lowering its creditwor-
thiness for a period. For blue, the Banks’ CDS spread
are set from corresponding real data and the balance
Credit Default Swap Rate ($)
Illiquid Assets (£)
Holdings of Bonds (£)
Interbank Liabilities (£)
2e+02
3e+02
4e+02
1.5e+04
2.0e+04
2.5e+04
3.0e+04
2e+04
3e+04
4e+04
5e+04
2e+04
4e+04
6e+04
8e+04
250 500 750
Tick (day)
Shocked
Not shocked
Figure 2: Normal vs. depressed bank creditworthiness.
sheets initialised from real banks’ consolidated bal-
ance sheets. Customer agent deposits decline over
this period, providing a mild reduction in day to day
liquidity. The graphs show the bank’s activity on
the interbank market to meet liquidity requirements,
together with a gradual sale of highly liquid assets
(Bonds) where required. The bank’s illiquid assets
remain untouched. In the red plot the bank’s CDS
value is inflated to simulate a perception of relatively
poor creditworthiness in the market. The first conse-
quence is the difficulty in securing liquidity on the in-
terbank market, illustrated by the depressed interbank
liabilities graph. To compensate, bonds are sold in or-
der to stave off illiquidity, a clear difference between
the stressed and unstressed scenarios. Eventually the
bank is forced to sell its illiquid assets at a heavily
discounted price, an asset firesale. For this scenario,
the customer agent acted merely as a source of with-
drawals and deposits. Were more complex customer
behaviours to be incorporated we would expect to see
heavy withdrawals as confidence in the bank erodes.
6 NEXT STEPS
We believe the current work to be promising with
qualitatively realistic dynamic behaviour observed in
the model. The immediate focus should now be on
drawing these closer to reality with a greater degree
of quantitative rigour. The wealth of data in the sim-
ulation has yet to be full exploited, and it should be
noted that this level of complexity is a source of both
potential weakness and strength, especially in respect
of sensitivity to initial conditions. Next steps will en-
ADataRichMoneyMarketModel-Agent-basedModellingforFinancialStability
235
tail restricting data and behavoiurs to provide a more
tractable simulation with a more managable parame-
ter space, it is envisaged that scenarios simulating a
range of bank behaviours under idealised regulatory
regimes (e.g. Basel III) would be a logical next step,
hence the inclusion of LCR.
7 CONCLUSIONS
Ideally, an agent-based model may encapsulates ex-
pert knowledge, actor behaviours and system struc-
ture in a manner that eludes other techniques. The
model described here does not share the clean and
often elegant characteristics of a classical, analytical
model, but then the real world does not share these
features either. Neither does it posses the rich de-
tail of institutions’ financial positions, covering hun-
dreds of pages of their annual reports, one of the ex-
perts commented that there is no simple represen-
tation of a £1.4tn balance sheet. Our model does
capture behaviours, structure and expert knowledge
and includes some of the data richness of the real
world. The most important outcome of the initial sim-
ulations, like the creditworthiness example described
here, is that they demonstrate that the model is an in-
teracting set of institutions rather than merely single
entities or an aggregation of many. For example, the
effect of diminished creditworthiness on a bank was a
combination of the behavioural responses of the other
agents and its own response to those actions, all oc-
curring within the context of a realistic structure with
real data. These features are particularly suitable for
analysing crisis scenarios or testing the impact of reg-
ulation where behavioural responses can dictate out-
comes.
ACKNOWLEDGEMENTS
We wish to acknowledge the invaluable input and sup-
port we received from Peter Lightfoot of the Royal
Bank of Scotland and Simon Bailey of the CGI
Group.
REFERENCES
Acharya, V. V. and Merrouche, O. (2012). Precautionary
hoarding of liquidity and interbank markets: Evidence
from the subprime crisis. Review of Finance.
Affinito, M. (2012). Do interbank customer relation-
ships exist? and how did they function in the crisis?
learning from italy. Journal of Banking & Finance,
36(12):3163 3184. Systemic risk, Basel III, global
financial stability and regulation.
Allen, F. and Gale, D. (2000). Financial contagion. The
Journal of Political Economy, 108(1):1–33.
Bagehot, W. (1873). Lombard Street: A Description of the
Money Market. London:HS King, London.
Biancotti, C., D’Aurizio, L., Ilardi, G., and Terna, P. (2009).
Modelling an rtgs system with slapp. Technical report.
BIS (2013). Basel iiii the liquidity coverage ratio and liq-
uidity risk monitoring tools. Technical report, Bank
of International Settlements.
BIS (2014). Basel iii: The net stable funding ratio. Techni-
cal report, Bank of International Settlements.
Burrows, O., Learmouth, D., McKeown, J., and Williams,
R. (2012). Ramsi: a top-down stress-testing model
developed at the banks of england’s. Technical report,
Bank of England.
EC (2012). Non-bank financial institutions: Assessment of
their impact on the stability of the financial system.
Technical report, European Commission Directorate-
General for Economic and Financial Affairs.
Economist (2013). Bear in the china shop. Economist, 408.
Farmer, J. D. and Foley, D. (2009). The economy needs
agent-based modelling. Nature, 460:685–686.
Galbiati, M. and Soramki, K. (2011). An agent-based model
of payment systems. Journal of Economic Dynamics
and Control, 35(6):859–875.
Gallegati, M., Giulioni, G., and Kichiji, N. (2003). Com-
plex dynamics and financial fragility in an agent-
based model. Advances in Complex Systems (ACS),
6(03):267–282.
Geanakoplos, J., Axtell, R., Farmer, D., Howitt, P., Conlee,
B., Goldstein, J., Hendrey, M., and Palmer, Nathan
amd Yang, C.-Y. (2012). Getting at systemic risk via
an agent-based model of the housing market. Techni-
cal report, Cowles Foundation.
Giannone, D., Lanza, M., Pill, H., and Reichlin, L. (2012).
The ecb and the interbank market. Technical report,
European Central Bank.
Honohan, P. and Klingebiel, D. (2003). The fiscal cost im-
plications of an accommodating approach to banking
crises. Journal of Banking & Finance, 27:1539–1560.
Kindleberger, C. (1996). Maniacs, Panics and Crashes.
Macmillan.
Matsuoka, T. (2012). Imperfect interbank markets and the
lender of last resort. Journal of Economic Dynamics
and Control, 36(11):1673 – 1687.
Railsback, S. F., Lytinen, S. L., and Jackson, S. K. (2006).
Agent-based simulation platform: Review and devel-
opment recommendations. In (Railsback et al., 2006),
pages 609–623.
Thornton, M. K. and Thornton, R. L. (1990). The financial
crisis of a.d. 33: A keynsian depression? The Journal
of Economic History, 50:655–662.
van den End, J. W. and Tabbae, M. (2012). When liq-
uidity risk becomes a systemic issue: Empirical evi-
dence of bank behaviour. Journal of Financial Stabil-
ity, 8(2):107 – 120.
SIMULTECH2014-4thInternationalConferenceonSimulationandModelingMethodologies,Technologiesand
Applications
236