Fast Agent-Based Simulation Framework of Limit Order Books with Applications to Pro-Rata Markets and the Study of Latency Effects
FFast Agent-Based Simulation Framework of Limit Order Books withApplications to Pro-Rata Markets and the Study of Latency Effects
Peter Belcak, Jan-Peter Calliess and Stefan ZohrenOxford-Man Institute of Quantitative FinanceUniversity of Oxford, UK
Abstract
We introduce a new software toolbox, called Multi-Agent eXchange Environment (MAXE), for agent-based simulation of limit order books. Offering bothefficient C++ implementations and Python APIs, it al-lows the user to simulate large-scale agent-based mar-ket models while providing user-friendliness for rapidprototyping. Furthermore, it benefits from a versatilemessage-driven architecture that offers the flexibilityto simulate a range of different (easily customisable)market rules and to study the effect of auxiliary fac-tors, such as delays, on the market dynamics.Showcasing its utility for research, we employ our sim-ulator to investigate the influence the choice of thematching algorithm has on the behaviour of artificialtrader agents in a zero-intelligence model. In addition,we investigate the role of the order processing delay innormal trading on an exchange and in the scenario of asignificant price change. Our results include the find-ings that (i) the variance of the bid-ask spread exhibitsa behavior similar to resonance of a damped harmonicoscillator with respect to the processing delay and that(ii) the delay markedly affects the impact a large tradehas on the limit order book.
Complementing the classical methods of statisticalanalysis and mathematical modelling, agent-basedmodelling (ABM) of financial markets has recentlybeen gaining traction [11, 9, 6, 3]. In particular, ap-plications of this paradigm to market microstructure[1] have attracted increasing attention. To name buta few, they include the study of statistical propertiesof limit order books [2], (non-)strategic behavior of acollective of traders [7] when modelled via the flow oftheir orders, as well as research into market bubblesand crashes [12]. With the ever-increasing importanceof automated trading in finance and the rising popu-larity of artificial intelligence in academic and indus-trial research, the importance of the ABM approach inthe study of electronic markets is likely to grow fur-ther. The diversity of use cases of ABM in finance and eco-nomics is reflected by the recent proliferation of a va-riety of software tools tailored to the particularitiesof their respective applications, as can be seen in theaforementioned sources. What is missing is an efficientcode base implementing a general, all-encompassingmulti-agent exchange framework that can be easilyadapted to simulate scalable ABMs based on any par-ticular exchange as a special case. Among many otherconceivable use cases, such a software environmentcould serve as a flexible toolbox allowing its users toinvestigate a range of research questions. Such couldinclude, but are not limited to, the following: • The impact of different matching algorithms onthe (learned) behaviour and revenues of (adaptive)trader agents inhabiting a given limit order book(LOB); • The amount of strategic decision making requiredto explain some of the important statistical prop-erties of these LOBs; • The response of strategic trader agent behavior toa change in the rules of the order matching, aswell as to changing infrastructural effects such ascommunication delays. • Conversely, the impact of different learning behav-iors of the trading agents on the ensuing marketdynamics.To address the need for such a toolbox, we introduce aMulti-Agent eXchange Environment (MAXE), a gen-eral code environment for the simulation of agent-basedmodels of electronic exchanges and other financial mar-kets. For the sake of generality, its architecture is basedaround a generic messaging interface that can be in-stantiated to reflect the rules and protocols of a widerange of existing exchanges. For convenience, MAXEalso provides a Python API to facilitate rapid prototyp-ing of artificial agents. However, since the meaningful-ness of ABMs often rests on the capability to simulatelarge multi-agent populations of market participants,the core of the implementation was written in C++,with an eye for computational and memory efficiency,as well as for support of native multi-threading. Tosupport model calibration as well as studies of agent1 a r X i v : . [ q -f i n . C P ] A ug ehavior on historical market data, our toolbox also in-tegrates market replay capabilities, in addition to sup-port of pure ABM systems.The remainder of this paper is structured as follows:After placing our toolbox into the context of previ-ous, related simulator packages in Sec. 2, Sec. 3 pro-ceeds with introducing the architecture of MAXE. Wepresent different use cases of our framework. Sec. 4illustrates an application of our simulation toolbox toagent-based modelling of pro-rata markets. Sec. 5 con-tains an illustration of a simple study of the effectsof communication delays. Concluding remarks can befound in Sec. 6. Beyond simple market replay approaches, there still isa need for publicly available ABM software sufficientlygeneric to be capable of simulating the markets at scale.Our toolbox was designed to meet this demand. Themost closely related toolboxes we are aware of includeAdaptive Modeler [5], Swarm [17], and ABIDES [4]. Inwhat is to follow, we briefly summarise the features ofthese packages in relation to ours.
Adaptive Modeler [5] is a “freemium” specialized mar-ket simulator first released in 2003 and still maintained.At the core of the software is a virtual market featur-ing a predefined set of classes of agents that may befurther adjusted by the user by changing various pa-rameters such as the population sizes, agent wealth, orclass mutation probability. Once an environment con-sisting of traders and traded assets is specified, the usermay start the simulation whilst keeping track of out-puts such as the event log, quotes, or various economicstatistics. All of these functionalities are – or can eas-ily be – implemented in MAXE as well. In additionhowever, MAXE also allows the creation of completelycustomised agents with arbitrary behavior and simu-late them on an arbitrary timescale, as the unit timestep is not bound to any physical measure of time andcan thus be chosen to represent an arbitrarily smallfraction of a second.
Swarm [17] is an open-source ABM package for sim-ulating the interaction of agents and their emergentcollective behaviour. First released in 1999, it remainsmaintained today. Whilst not directly designed for fi-nancial modelling, it has been used to create the SantaFe Artificial Stock Market [13] that, for the first time,reproduced a number of stylized facts about the be-haviour of traders and further emphasized the impor-tance of modelling of financial markets. Unlike swarm,MAXE comes with an incorporated time-tracking unitthat takes care of the delivery of messages betweenthe agents involved and the advancement of simulationtime. This allows for a transparent unified channel ofinter-agent communication, enabling simple scheduling of agent tasks (as outlined in an example in Fig. 1)and greatly simplifying output generation and debug-ging.
ABIDES [4] is the newest open source market mod-elling tool. Released as recently as 2019, it was specif-ically designed for LOB simulation. Aimed to closelyresemble NASDAQ by implementing the NASDAQITCH and OUCH messaging protocols it hopes to offeritself as a tool for facilitation of AI research on the ex-change. Just as MAXE, ABIDES and allows users toimplement their own agents in Python. However, sinceMAXE also allows specification in C++ we expect thatMAXE has an edge in terms of the execution efficiencyand scalability. Moreover, MAXE, being based on acompiled binary core interacting directly with the op-erating system allows for multi-threaded execution ofsimulations, which becomes an advantage when sim-ulating a range of similar simulations differing onlyin a number of input parameters. Apart from that,MAXE comes with the implicit support for the trad-ing at multiple exchanges at once and for limit orderbooks matched with different matching algorithms, inparticular pro-rata matching. MAXE is also highlymodular due to the option to develop a database ofagents first, and then configure a set of simulations viaan XML configuration file.
MAXE is based on a message-driven, incremental pro-tocol. Its core logic steps forward time and deliversmessages. As such, it could also be utilised for mod-elling many multi-agent systems – not just financial ex-changes. However, our focus throughout this documentremains on applications to exchange trading.Every relevant entity of a trading system one wouldwish to model (e.g. exchanges, traders, news outletsor social media) can be implemented as an agent. Thisis different to the usual approach to agent-based mod-elling of exchanges where at the centre of the simula-tion is the exchange concerned and the communicationprotocol between the entities of the trading system ismade to resemble the one of the real exchange, oftento ease the transition of any models developed thereinto production environments. As it is the case withany common implementation of message-driven frame-works, agents taking part in the simulation remain dor-mant at any point in simulation time unless they havebeen delivered a message. When a message is due tobe delivered, the simulation time freezes as all agentsthat have been delivered at least one message beginto take turns to deal with their inbox. Each agent isgiven an unlimited amount of execution time to pro-cess the messages they have been delivered and to sendmessages on their own. Messages can be dispatched ei-ther immediately (i.e. with zero delay) or scheduled2igure 1: A sequence diagram of an example commu-nication between a trading agent, exchange agent, andthe simulation environment.to be delivered later in the future by specifying a non-negative delay which can be used to model latency forexample.At the beginning of a simulation, each agent is deliv-ered a message that allows them to take initial actionsand possibly schedule a wake-up in the future by ad-dressing a message to themselves. At the end of thesimulation, a message of similar nature is sent out toall agents to allow them to process and save any datathey might have been gathering up to that point forfurther analysis outside the simulation environment.Fig. 1 shows an example communication of an agentthat trades based on regular L1 quote data from theexchange.Aside from its core, MAXE also contains a small ini-tial repository of common agents that can be expandedupon by its users. This initial repository includes anexchange agent that can operate a number of differentmatching mechanism, as well as a collection of zero-intelligence and other simple agents. An overview ofthe top level of the hierarchy of available agents is de-picted in Fig. 2. Further details on the various agentscan be found in the code repository [14].For simplicity and in order to facilitate convenient pro-totyping of trading system models, MAXE has beenbuilt with an interactive console interface and designedto read the simulation configurations from a hand-editable XML file. Once a simulation is running, itis up to the user to record any information of inter-est, although a few agents have been supplied to allow for monitoring of the most common events and statis-tics. Furthermore, despite the overall emphasis on theperformance of the simulator, MAXE comes with aPython interface, further allowing for fast prototypingand the use of common scientific packages available inthat language.
Different exchanges employ different matching rules.One of the most popular matching logic is price-timepriority which has been intensively studied (see e.g.[1]). Another important matching logic is pro-rata (seee.g. [8]). In pro-rata markets, at a given price level,orders are not executed in chronological order as inprice-time priority, but in proportion of their size onthe price level. Previous research into pro-rata markets[8] showed that traders develop the tendency to over-offer the volume they are willing to buy or sell in orderto guarantee or speed up the execution of the quantitythey actually intend to trade.
To demonstrate the flexibility of our simulator, wepresent a naive learning model for traders’ behaviorsand show that the trading agents also develop suchtendency after learning and interacting on an artificialexchange. These trading agents make zero-intelligenceeconomic decisions about the price of the asset theywish to acquire or sell similar to the setting in [7] andthen use an order placement strategy based on themoving average of order-to-trade volume ratios.The aforementioned model is implemented as follows:We introduce an exchange agent , dedicated to manag-ing a limit order book matched with a pure pro-rataalgorithm [10]. We then add a population of tradingagents (traders) , which, for ease of illustration, are ho-mogeneous and very simple: Each trader places ordersat time points distributed according to a Poisson pro-cess of rate r p . Each order is then either immediatelymarketable with probability f m , or non-marketable andwill hence enter the limit order book at B + ∆ P , where B denotes the current best price of the resting queueand ∆ P is uniformly distributed on an interval of fixedlength that is a parameter of the simulation. If thecurrent order is filled before a new order is scheduledto arrive (i.e. before the end of its maximum lifetime T m , which is precisely the inter-arrival time of the or-der arrival Poisson process and is thus exponentiallydistributed with the rate r p independently of all othermaximum lifetimes), a new order is immediately dis-patched. Each trader is only allowed to have one out-standing order, and, if the current order is not yet filledat the time another order of the same agent is due to3igure 2: The class diagram of the Simulation-Agent hierarchy of the simulator.arrive, the remaining volume of the current order iscancelled. Either of the events, firstly, that the partic-ular realised maximum lifetime t m of the given orderhas elapsed or, secondly, that the order has been filled,marks the end of the actual realised lifetime t r (note t r ∈ (0 , t m ]).For each order they place, agents desire to trade afixed volume v before the end of the order’s maxi-mum lifetime. The maximum lifetime (or, indirectly, r p ) then represents the maximum permitted simulationtime within which the agent tries to trade v . It can beinterpreted as the urgency of the need to trade v . Dueto the nature of pro-rata matching, only a fraction ofthe outstanding order might be filled before the timeis up, and hence the agent will instead place an orderof volume v offered .The trader thus interacts with the environment of themarket by placing its orders, of which there is exactlyone active at a time, and cancelling them if they remainunfilled for what it deems is “too long”. As mentionedabove, the time of order placement, the type of theorder (i.e. whether it is a market order or a not imme-diately marketable limit order), the price at which theorder is placed by the trader, and the order maximumlifetime (i.e. the sense of what is “too long”) are alldetermined at random.Thus, the actions (in game-theoretic sense) of theagents are the choices of quantities v offered , and theobjective of the agent is to learn to offer the quantity v offered such that the quantity executed in T m units isas close to v as possible.Hence the essence of its learning can be characterizedby defining its history of observations to be the recordof fractions of order volumes executed and the respec-tive realised lifetimes of the respective orders as a func-tion of tick distance at which the order was placed F fill (∆ p ).Suppose that an order is being placed and its volume v offered needs to be decided. Let ∆ p be the particularrandomly generated tick distance and let n = n (∆ p ) ≥ p from the best price at the time theywere being placed. Then the agent needs to choose theaction v (∆ p,n +1)offered and F fill (∆ p ) is simply F fill (∆ p ) := f (∆ p, t (∆ p, r f (∆ p, t (∆ p, r ... ... f (∆ p,n )fill t (∆ p,n ) r (1)where t (∆ p,n ) r is the realised lifetime of the order (∆ p, n )and f (∆ p,i )fill := v (∆ p,i )executed v (∆ p,i )offered . Here v (∆ p,i )executed is the volume of order (∆ p, i ) that wasexecuted during its realised lifetime in the book and v (∆ p,i )offered is the volume that was placed into the book.The action of the agent is v offered and the policy giventhe history of observations is v offered = n (cid:88) k =( n − K ) ∧ f (∆ p,k ) fill t (∆ p,k ) rn (cid:88) k =( n − K ) ∧ t (∆ p,k ) r where ∧ denotes the minimum of the values on eitherside and K the size of the window for the moving av-erage.4 .2 The Findings Every run of the simulation lasted for 10 r p time unitsand the simulation was run 100 times. At the end ofeach simulation, we recorded the final v offered for eachagent. If for some values of ∆ p there had been no or-ders placed by the agent, we did not record anything.We show the mean over-offering tendency (computedas the mean of recorded values and expressed as themultiple of v to be offered with the intention of filling v within the order lifetime) in Fig. 3. In the senseof order flow into the exchange, increasing the numberof agents in the simulation environment simply corre-sponds to increasing the order arrival rate, and sincewe give this example for demonstration purposes only,we settled for an agent population of 100 and treatedit as a constant.Using this model, we aimed to confirm the over-offeringcharacteristic for pro-rata-matched LOBs reported by[16], demonstrating that:(i) a significant proportion of orders of any lots wouldend up being cancelled before being fully filled,(ii) traders would have the tendency to over-offer, withthe tendency increasing with increasing values of∆ p in a positive neighborhood of 0.We stress that our main purpose was to demonstratethe flexibility of MAXE in a simple case study ratherthan to venture into a rigorous study of trader over-offering in pro-rata markets.Figure 3: The over-offering tendency of the naive learn-ing agents in the set-up given.The fraction of all orders placed by agents in our modelthat ended up being cancelled by the agents that placedthem before they were filled varied between 80 and95%, suggesting a result similar to the one in [8]. Themean over-offering tendency also seems to have var-ied with the tick distance of the order placement pricefrom the respective best price as depicted in Fig. 3, which is consistent with the intuition. Further naiveexperimentation with the relevant parameters hintedthat the mean over-offering tendency might be inde-pendent of the size of the window for the moving av-erage ( K ), of the mean maximal order lifetime ( r p ),and the proportion of marketable orders entering theexchange ( f m ). To demonstrate MAXE’s ability to simulate some as-pects of “market physics”, we utilised it to examinethe effect processing or communication delays have onvarious statistics of the market dynamics following alarge trade.
The core of the model consists of one exchange agentwith a modifiable choice of matching algorithm and apopulation of zero-intelligence trading agents interact-ing with the exchange. The exchange agent maintainsthe limit order book and executes orders submitted bythe trading agents. At the beginning of the simula-tion, the LOB contains two small orders, one on eachside of the book with the initial bid-ask spread S , toserve as the indicators of the opening prices for furthertrading.Following the start of the simulation, traders place or-ders and are given a fixed period of time to reconstructthe LOB to match the empirical average shape from [2]by placing orders in a manner described below. In thesimulation runs focused on statistics not related to thestudy of impactful trades, the remaining time is used tomeasure those. The other type of simulations experi-ences an impact agent entering the exchange and mak-ing an impactful trade, following which more statisticsare computed. The simulation runs over a fixed timehorizon of 40000 t p , chosen by experimentation focusedon the setup appearing to have dealt with the largestof the trades used in our experiment.The behaviour of our trading agent is similar to the be-haviour presented in [2] that has been previously shownto be able to reconstruct the LOB’s shape to be resem-bling the one of real LOBs of highly liquid stocks on theParis Bourse. The behavior presented in [2] is furtheradjusted by some features of the behaviour presented in[7], which has been shown to be able to explain someof the dynamic properties of the LOB, including thevariance of the bid-ask spread. For a detailed specifi-cation of the agents’ behaviour we refer the reader to[14].According to the L1 information available to the traderat the time it is making the decision (which may beoutdated due to the communication delay between the5 a) (b) (c) Figure 4: Statistics of the simulation L1 data plotted against d (in multiples of t p ) for different values of f m .trader and the exchange), each trader places both mar-ket and not immediately marketable limit orders ac-cording to a Poisson process with rate r p , with thefraction of the market orders f m being a parameter ofthe simulation. The simulation was run for values of f m ranging from 5 to 20%.Each order has lifetime distributed according to theexponential distribution with mean t l that was a pa-rameter of the simulation. The simulation was run forvalues of t l from 200- to 3200-times t p = r p . Thus, thestream of the cancellation orders can be thought of asa marked Poisson process with rate r c = l o and wherethe marking probability is inversely proportional to thenumber of orders in the LOB. The price of the order isdrawn from the empirical power-law distribution rela-tive to the best price at the time of observation.We define the processing delay d , or simply delay to bethe duration between the time the information aboutthe state of the limit order book is produced for tradingagents and the time when the exchange processes theagent’s order against the LOB. This time includes thetwo-way latency between the agent and the exchange,the time it takes the exchange to process the queue ofincoming orders, and decision time on the trader’s side.Furthermore, taking the zero-intelligence approach tomodel the trading and the limit order book as a whole,the processing delay can also be thought of as encap-sulating the time it takes the trader to decide whetherand how to trade and possibly evaluating their strategygiven the information becoming available during thattime, and we we shall use this fact when interpretingour findings.We also define greed g to be the size of a large marketorder expressed as a fraction of the total volume (i.e.,considering the volume of all price levels) in the queueit is meant to be executed against. When simulating, we treated the placement frequency r p as fixed and looked at the effects of the other twotime-based parameters, r c and d , relative to it. Theobserved effects turned out to be independent of thematching algorithm used. Perhaps somewhat moresurprisingly, the cancellation rate r c appeared not tohave had any effect on the statistics considered (seebelow). Notation: If Q is the quantity we are observing,let e [ Q ] denote the empirical simulation-time-weightedmean of Q and v [ Q ] the empirical simulation-time-weighted variance of Q . Bid-ask spread
We found that the mean bid-ask spread e [ S ] increasedlinearly with the fraction of market orders f m (witha hint of convexity), decreased with d , and appearedto converge to the bid-ask spread of the initial setup S , coming within a few ticks distance of S for allsufficiently large delays d . The relationship betweenthe parameters involved is depicted in Fig. 4a and fitted( R = 0 . e [ S ] ≈ S + s f m e − s d . This was in approximate agreement with the relation-ship for e [ S ] as a function of f m provided in [7] whichconsiders the price-time matching logic.The variance of the spread v [ S ] gave an appearancequalitatively resembling the amplitude of oscillations ofa simple driven damped oscillator with respect to theprocessing delay ( d being the frequency in this analogy,see Fig. 4b), with the resonance delay d constant withrespect to all free parameters of the simulation.6 a) (b) (c) Figure 5: Absolute mean climb, mean fall, and mean long-term impact (in price ticks) plotted against theprocessing delay d (in multiples of t p ) for fixed values of f m and varying values of greed g .Figure 6: Shown is the shape of the average best priceevolution after suffering a large aggressing trade. Variance of the best price
The time-weighted variance of the best bid and askprices (simply the “best” price B ( t ) at time t as thebehavior is the same for both sides of the queue, seeFig. 4c) appeared to monotonously decrease with in-creasing d and, to increase exponentially with increas-ing f m , coming to a negligible distance from 0 for suf-ficiently large values of the delay d . Shape of the average impact scenario
Turning our attention to the scenario of an impactfultrade occurring at time t I , we define the climb C to bethe immediate increase in the best price B following alarge (10-100x the size of average market order) tradeagainst the respective order queue. We further define F to be the difference between the highest and the lowestpoint the best price attains after t I , and I to be the longterm impact of the trade, i.e. the difference between theequilibrium best price prior to the impactful trade andthe equilibrium price to which the best price “settles”long after t I . We expressed the volume of the largetrade considered as a fraction of the volume availableon the respective order queue at the time the trade is executed and denote it by g .We have found empirically that, irrespective of the vol-ume of the large trade affecting the best price, e [ B ]( t )seemed to exhibit the same feature of going through thephases of fall , overreaction , and settlement (see Fig. 6).The climb in the best price itself occurred almost in-stantly after t I in the vast majority of cases, with theexception when a delayed limit order unaware of thesudden price movement significantly improved the newbest price but was quickly eliminated by newly incom-ing marketable orders. The first phase, fall, exhibited asteep best price fall towards the future equilibrium andits steepness decreased with increasing latency d . Thefall was succeeded by something that could describedas an overreaction, a phase during which the best pricedived further below the future equilibrium price and hitthe absolute minimum at the time at which the bid-askspread was also minimal. The best bid and ask pricesthen diverged again towards their new equilibrium inthe settlement phase.The identification of such patterns has the potential ofbeing of practical utility. They might endow us witha method for predicting the price at which the bestprice will settle after a large trade given the informa-tion about the long-term variance of and current infor-mation about the values of the bid-ask spread. The large trade scenario
We observed that both e [ C ] and e [ F ] decreased linearlyfor large delays and small delays with small values of g (Fig. 5a and Fig. 5b). In addition, large values of g seemed to allow the climb and fall to peak at a specificsmall delay.The long-term impact appeared to be mostly linearwith d with the downwards slope decreasing with theincreasing values of greed, increases linearly with f m (Fig. 5c). Furthermore, it did not seem to exhibit the7ame peak as climb and fall do, demonstrating thatthese two compensated for each other in the long run.Furthermore, the logarithm of the long term impact in-creased proportionally to the volume traded, in keepingwith the results presented in [15].We shall say that the best price has reached stability ifthe moving average with a fixed window of size w fallswithin the distance of (cid:113) v [ B ] w .Whilst we found significant evidence that the impactof a large trade on the best price depends on the greedparameters, perhaps surprisingly, the mean and vari-ance of the time did not seem to exhibit any notabledependence on the level of greed, i.e. the best price ap-pears to converge to stability in time independent ofthe size of the large trade nor the share of the mar-ketable orders f m (Fig. 7b).Further evidence of such behavior was found when pro-ducing the results depicted in Fig. 7c. Here, we lookedat the proportion of the runs of the simulation in whichthe price fulfilled the post-impact stability criteriongiven above before the simulation was terminated. Ascan be seen from the plot, simulation runs for highervalues of the parameter f m would see the price suc-ceed to become stabilised in the time horizon of thesimulation more often than for the lower values, butthe greed parameter had again little to no effect on theproportion of the runs that would become stabilisedfor varying values of d . This is further supported bysetting a time limit on convergence in the distant fu-ture from the impactful trade and measuring the con-vergence success rate, defined as the proportion of thesimulation runs that succeeded in converging beforethat time (see Fig. 7c). We have introduced a new multi-agent simulationframework for finanical market microstructure, calledthe Multi-Agent eXchange Environment (MAXE).There are a number of distinctive advantages MAXEoffers over alternative simulation frameworks such asABIDES [4]. Most notably our framework is fast andflexible; it allows to model different matching rules andcan model latency.We have also demonstrated its potency for researchinto market dynamics. In particular, we used MAXEto conduct a simple empirical study highlighting anover-offering characteristic in pro-rata markets ensuingfrom agents that adapt their strategies with a simplemoving-average learning approach. Furthermore, weutilised MAXE to showcase a mini study of the im-pact the delay in processing order has on a few LOBstatistics and on the behaviour of the best prices aftera large trade is registered with the exchange. In conclusion, MAXE offers a general and efficient sim-ulation environment that can be easily employed for re-search into properties of various markets or as a bench-mark environment for agent-based testing of tradingstrategies.Expanding on our illustrative case studies would be in-teresting in particular, given the dearth of studies util-ising ABM in the context of pro-rata matching rules.We hope such research would be greatly aided by ourMAXE package, providing a standardised, scalable andeasily customisable toolbox to support this kind of re-search.
The simulator is available on GitHub [14] under theMIT License. Documentation and the QuickStartGuide can be found on the GitHub pages under the doc folder.
References [1] Bouchaud, J.-P., Bonart, J., Donier, J. and Gould,M. [2018],
Trades, quotes and prices: financialmarkets under the microscope , Cambridge Univer-sity Press.[2] Bouchaud, J.-P., M´ezard, M., Potters, M. et al.[2002], ‘Statistical properties of stock order books:empirical results and models’,
Quantitative fi-nance (4), 251–256.[3] Buchanan, M. [2009], ‘Meltdown modelling: couldagent-based computer models prevent another fi-nancial crisis?’, Nature (7256), 680–683.[4] Byrd, D., Hybinette, M. and Balch, T. H. [2019],‘Abides: Towards high-fidelity market simulationfor ai research’, arXiv:1904.12066 .[5] Capterra [2019], ‘Adaptive modeler’, . Accessed: 2019-12-19.[6] Cont, R. [2007], Volatility clustering in financialmarkets: empirical facts and agent-based mod-els, in ‘Long memory in economics’, Springer,pp. 289–309.[7] Farmer, J. D., Gillemot, L., Iori, G., Krishna-murthy, S., Smith, D. E. and Daniels, M. G.[2006], ‘A random order placement model of priceformation in the continuous double auction’, TheEconomy as an Evolving Complex System , 133–173.[8] Field, J. and Large, J. [2008], Pro-rata matchingand one-tick futures markets, Technical report,8 a) (b) (c) Figure 7: Convergence statistics shown against d (as a multiple of t p ) for different values of f m . The time isalso expressed as a multiple of the mean order placement rate r p . Oxford-Man Institute, University of Oxford. CFSWorking Paper.[9] Iori, G. and Porter, J. [2012], ‘Agent-based mod-elling for financial markets’.[10] Janecek, K. and Kabrhel, M. [2007], ‘Match-ing algorithms of international exchanges’, https://pdfs.semanticscholar.org/6d92/0528fc5a3a25cb7a627b93ae3e7d5789bde8.pdf .[11] Luna, F. and Stefansson, B. [2012],
EconomicSimulations in Swarm: Agent-based modelling andobject oriented programming , Vol. 14, SpringerScience & Business Media.[12] Paddrik, M., Hayes, R., Todd, A., Yang, S., Bel-ing, P. and Scherer, W. [2012], An agent basedmodel of the e-mini s&p 500 applied to flash crashanalysis, in ‘2012 IEEE Conference on Compu-tational Intelligence for Financial Engineering &Economics (CIFEr)’, IEEE, pp. 1–8.[13] Palmer, R., Arthur, W. B., Holland, J. H. andLeBaron, B. [1999], ‘An artificial stock market’, Artificial Life and Robotics (1), 27–31.[14] Peter Belcak, Jan-Peter Calliess, S. Z. [2020],‘Maxe github repository’, https://github.com/maxe-team/maxe . Accessed: 2020-08-17.[15] Potters, M. and Bouchaud, J.-P. [2003], ‘More sta-tistical properties of order books and price im-pact’, Physica A: Statistical Mechanics and itsApplications (1-2), 133–140.[16] Preis, T. [2011], Price-time priority and pro ratamatching in an order book model of financial mar-kets, in ‘Econophysics of Order-driven Markets’,Springer, pp. 65–72.[17] Swarm [n.d.], ‘Swarm main page’,