Analysis of a decision model in the context of equilibrium pricing and order book pricing
Daniel C. Wagner, Thilo A. Schmitt, Rudi Schäfer, Thomas Guhr, Dietrich E. Wolf
AAnalysis of a decision model in the context ofequilibrium pricing and order book pricing
D.C. Wagner a, ∗ , T.A. Schmitt a, , R. Sch¨afer a , T. Guhr a , D.E. Wolf a a Faculty of Physics, University of Duisburg-Essen, Lotharstrasse 1, 47057 Duisburg,Germany
Abstract
An agent-based model for financial markets has to incorporate two aspects:decision making and price formation. We introduce a simple decision modeland consider its implications in two different pricing schemes. First, we studyits parameter dependence within a supply-demand balance setting. We findrealistic behavior in a wide parameter range. Second, we embed our decisionmodel in an order book setting. Here we observe interesting features whichare not present in the equilibrium pricing scheme. In particular, we find anontrivial behavior of the order book volumes which reminds of a trend switchingphenomenon. Thus, the decision making model alone does not realisticallyrepresent the trading and the stylized facts. The order book mechanism iscrucial.
Keywords: decision making, agent-based modeling, order book, herdingbehavior
PACS:
1. Introduction
A common method in the economic literature to determine the price of anasset is the concept of equilibrium pricing [1, 2]. The price is the result ofthe available supply and demand. In the context of stock markets supply anddemand are often identified with the market expectation of the traders to sellor buy a stock. For example, such a pricing scheme is frequently employedwithin Ising-type models [3–5], where the market expectation of each trader issymbolized by a spin on a lattice. There the decision to sell or buy a stockis mapped to spin down and up. In each time step an update of the marketexpectations is performed by taking the market expectations of the nearestneighbors into account [3]. A possible criterion to derive the equilibrium priceis to take the average of all market expectations. ∗ Corresponding Author: D.C. Wagner; Email, [email protected]; Phone, +49 203379 4737
Preprint submitted to Physica A September 18, 2018 a r X i v : . [ q -f i n . T R ] A p r n contrast, the standard pricing mechanism at stock exchanges is the doubleauction order book [6, 7]. The order book lists all current propositions to sellor buy at a given price. This information is available to all traders. Here, theprice is the result of a new incoming order matching a limit order already in thebook.The empirical return time series show a collection of remarkable properties,which are called stylized facts, see Ref. [8] for a review. The empirical distribu-tion of returns has heavy tails, i.e. , the tails are more pronounced compared toa normal distribution [9–12]. In the literature many approaches are discussedto explain this feature [13–21]. One point of view claims that large tradingvolumes are responsible for the heavy tails [13–18]. Another approach holdsgaps in the order book structure responsible. If gaps are present between theprice levels occupied by limit orders, even small volumes can cause large priceshifts [19]. According to this reasoning the order book plays an important rolein the emergence of heavy tails.Agent-based modeling makes it possible to microscopically understand trad-ing mechanisms [22–30] and to study trading strategies [31, 32]. Here, we extendthe agent-based stock market introduced by Schmitt et al. [33] which imple-ments a double auction order book. The model is capable of reproducing thegap structure described in Ref. [19] and yields heavy-tailed return distributions.The traders employed in the model act randomly, independently of each otherand follow no strategy.We extend this model by designing a trader that acts with respect to adecision model. The traders are indirectly coupled to each other because theirdecisions influence the price which, in turn, affects their decision to buy or to sellan asset, see Sec. 2. Since the model has two parameters we initially analyzethe parameters’ influence on the price with an equilibrium pricing. Then weanalyze the persistence of this behavior if we put the traders’ decision modelinto an order book setting. As results of our simulations we discuss the returndistribution and the order book structure in Sec. 3. We conclude our results inSec. 4.
2. Model
We present a decision model in an equilibrium pricing and discuss how toimplement it in an order book driven agent-based model. In reality, tradersemploy all kinds of strategies. Unfortunately, it is not possible to capture thedecision making process of any trader. Furthermore, his strategy could be er-ratic or could at least contain erratic elements, so that it would be impossibleto exactly determine how he would react in a particular case. Also, the morecomplex a system is, the less it is possible to trace back features in the observ-ables, e.g. the price, to individual decisions. Therefore we restrict ourselves toa simple decision model where this is still possible.In an agent-based model for a financial market the decisions of every trader(agent) and their influence on the price are simulated. Thus, agent-based mod-els have to take into account two different aspects: decision making and price2ormation. A decision model describes how a trader reacts on events, e.g. whenthe price changes, and price formation is a mechanism describing how deci-sions manifest themselves in the price. Here we analyze one decision model incombination with two different pricing models:Our decision model demands that every trader has his own price estimationfor a traded asset. Of course this influences his market expectation and, thus,his decision either to buy or sell. Depending on the current asset price hisindividual price estimation develops in time. He changes his decision to buy orto sell, respectively, depending on the relative deviation between the individualand the asset price; a distribution function determines the probability that hechanges his market expectation.The first pricing model calculates the relative price change between twotime steps as the mean value of the market expectations of all traders. Thiscorresponds to an equilibrium pricing, balancing supply and demand. In thesecond price formation scheme the price is determined in the framework of anorder book setting. Here we embed the decision model into an agent-basedmodel with a double auction order book pricing. We will now look deeper intothese aspects.
By their very nature decision making models are capable of describing alarge variety of scenarios, wherever a choice between alternatives has to bemade. Contrary to approaches in the literature where the decisions are basedon mutual decisions between the agents [34], the decisions in the present settingare only made with the reference to a general trend, which can be understoodas a mean field.Let us consider i = 1 , . . . , N agents who order to buy or offer to sell a certainasset. Only a single asset is considered. Its supply, quality, usefulness etc. arenot taken into account. Whether an agent orders to buy or offers to sell dependson his market expectation m i ( t ) about the current price. If he thinks the assetis overpriced m i ( t ) = − m i ( t ) = 1, he buys. To determine what an agent regards asthe appropriate price constitutes the crucial part of the model. For simplicityit is assumed that every agent follows the price evolution from the time instanton when he last changed his market expectation. We call this time “individualreset time” τ i,j , where j just enumerates those instants of time. What an agentthought before that instant is forgotten. Between individual reset times theindividual market expectation m i ( t ) is constant.At the reset time an agent i changes his market expectation because at thistime instant agent he felt the asset was more mispriced than he would tolerate.A simple ansatz for what he regards as the appropriate price at this time instantis s i ( τ i,j ) = S ( τ i,j )(1 + m i ( τ i,j )) . (1)The function S ( t ) describes the time development of the asset price. Here, S ( τ i,j ) is the current price at the individual reset time τ i,j . We distinguish the3uantity s i which is used to assess the benefit of the trader’s market expectationwith reference to the present price from the quantity m i which is a binarymeasure for the trader’s market expectation. Eq. (1) is a rather bold ansatz.Its advantage is the absence of free parameters. It means that the asset becomesworthless to the agent s i ( τ i,j ) = 0, if he decides that he wants to sell m i ( τ i,j ) = −
1. If he decides to buy, however, he thinks the appropriate price may be asmuch as twice as high as the current price s i ( τ i,j ) = 2 S ( τ i,j ).As long as agent i does not change his market expectation again, the pricehe thinks appropriate evolves during a discrete time step ∆ t according to s i ( t + ∆ t ) = (1 − α ) s i ( t ) + αS ( t + ∆ t ) . (2)The parameter α ∈ [0 ,
1] quantifies how readily the agent adjusts his estimationwhat the appropriate price should be compared to the actual price, taking thetrend into account which explains why we use S ( t + ∆ t ) instead of S ( t ) on theright-hand side. Trivial cases are α = 0 (no adjustment) and α = 1 (currentprice always regarded as appropriate).The last ingredient of the model concerns the condition that leads agent i to change his market expectation. It depends on the relative deviation h i ( t ) ofthe current price from the one he regards as appropriate, h i ( t ) = s i ( t ) − S ( t ) S ( t ) . (3)If m i ( t ) h i ( t ) >
0, there is no incentive to change. Either the actual price islower than what is regarded as appropriate and the agent orders to buy, orthe actual price is higher than what is regarded as appropriate and the agentwants to sell. However, if m i ( t ) h i ( t ) < m i ( t ).In this model, changing ones market expectation happens with a certainprobability w i ( m i ( t ) h i ( t )) which approaches zero for m i ( t ) h i ( t ) → ∞ and onefor m i ( t ) h i ( t ) → −∞ . A possible choice is w i ( m i ( t ) h i ( t )) = min(1 , − βm i ( t ) h i ( t )) (4)if m i ( t ) h i ( t ) < /β has the meaning of tolerance of an agent, ranging from zero toinfinity. The changing probability is asymmetric, that is, depending on β , thetrader only changes his market expectation if m i ( t ) h i ( t ) is less than zero. It isworth mentioning that for β → , . (cid:61) Β (cid:61)
Β (cid:61) (cid:45) (cid:45) m i (cid:72) t (cid:76) h i (cid:72) t (cid:76) w i (cid:72) m i (cid:72) t (cid:76) h i (cid:72) t (cid:76)(cid:76) Figure 1: Comparison of the changing probability Eq. (4) for several values of β decrease of the price for increasing t . Furthermore we found that for w i (0) = 0 . vice versa , vanishes from one time step to thenext. For a simple price formation the relative price change is only determined bythe mean value of the variables m i ( t ): S ( t + ∆ t ) − S ( t ) S ( t ) = 1 N N (cid:88) i =1 m i ( t ) . (5)Furthermore N should be odd, so that this quantity is never exactly zero. At a stock exchange the clearing office manages an order book which ispublicly available. The order book is filled by limit orders so that it containsthe information about prices and volumes of all bids and asks. If the best ( i.e. lowest) ask is at least equal to the best ( i.e. highest) bid, a trade takes place.The traded price at this moment constitutes the current stock price. A traderdecides if he wants to buy or sell a specific amount of stocks and he decides onthe price he would agree with. In addition, the trader determines how long thislimit order should exist in the order book at most. This is the so-called lifetimeof an order. If he does not care about the price he is also able to submit amarket order. Such a market order is executed immediately. As market orders5 id ask
45 3
26 4 3 00
22 43000 5 Figure 2: Exemplary order book with bids/asks and their quantitiesremove limit orders, they enlarge the bid-ask spread in the order book andreduce liquidity.In the exemplary order book in Fig. 2 there are gaps at the prices 9 . .
05 to 10 .
07 and 10 .
09. They can appear if limit orders vanish due to lifetimeexpiration or if no limit orders have been placed at that price level. If marketorders remove enough volume, including multiple price levels with gaps, largerprice shifts ( i.e. larger returns) occur.
3. Results
It is our goal to study how different pricing mechanisms, equilibrium or orderbook pricing, respectively, influence the observables considering our decisionmodel.
We study our decision model using the equilibrium pricing in Eq. (5) where50 traders start with m i (0) = − m i (0) = 1. The simulated pricetime series behave like a geometric Brownian motion for α = 0 . β = 0 . α and β , we find three regimes, see Fig. 3: • exponential increase of the price (strong positive drift), • fluctuations of the price without a drift and • exponential decrease of the price (strong negative drift).6n principle, α and β determine the drift of the price time series. It turns outthat there is a large parameter space (ln (cid:104) S (cid:105) ≈
0) in which the price neitherdiverges nor decays. This is important to generate sufficiently long time seriesfor better statistics. We find that the returns are normal distributed. Giventhe equilibrium pricing the price time series of our decision model follows ageometric Brownian motion. Α Β ln (cid:88) S (cid:92) (cid:45) (cid:45) (cid:45) (cid:45) (cid:45) (cid:45) Figure 3: Natural logarithm of the mean price (cid:104) S (cid:105) depending on α and β as amean value of 100 seeds after 10 time steps In combination with the equilibrium pricing the price time series does notshow any interesting features: Our simple decision model only yields a geometricBrownian motion. We are now going to investigate whether this is still the casein an order book setting.We extend the agent-based model program by Schmitt et al. [33] whichimplements a double auction order book. The hitherto used equilibrium pricingin Eq. (5) is no longer relevant, but for decision making the relation in Eq. (4)is still used. Our model traders (200 of them are used in our simulations)only submit market orders. Their market expectations m i ( t ) determine if theysubmit a sell or a buy market order. In our simulations 400 RandomTrader s actas liquidity providers; they fill the order book with limit orders whose values arerandomly drawn from a normal distribution with a mean value of the currentbest bid or best ask, respectively. Their order lifetime influences the kurtosis of7he return distribution drastically and is chosen in such a way that the returndistribution is normal without any of our model traders, see [33].Our program adapts real trading behavior in so far as not every trader acts atevery time step (here: one second). During 10 seconds the traders each submit1500 orders on average. In the decision model the individual price expectation s i updates every second. As time steps can be skipped in the course of thesimulation, every time an agent trades we have to calculate the individual priceexpectation for the corresponding delay afterwards. Therefore we will see that α abm ∼ α/ β (inversetolerance) is of minor importance. The simulations are almost independent ofthis parameter if it is within [0 . , β = 0 . S (0) = 100, (cid:45) (cid:45) (cid:45) Α abm (cid:88) S (cid:92) (cid:72) Α a b m (cid:76) Figure 4: Mean price (cid:104) S (cid:105) depending on α abm as a mean value of 100 seeds after10 time steps ( S (0) = 100 as starting value for every simulation)we analyze α abm = 10 − : The return distribution which we calculated for a re-turn interval of 120 s is heavy-tailed with a kurtosis of about six, see Fig. 5. Asalready mentioned above, this shape can be modified by varying the lifetime ofthe limit orders.Another feature of this decision model is the herding behavior which canbe observed on the order book volume, see Fig. 6. There are time intervals inwhich much more sell orders are stored in the order book and time intervals in8hich much more buy orders are stored therein. This behavior is a feature ofour decision model and cannot be reproduced by solely using RandomTrader s. (cid:45) (cid:45) (cid:45) R Ρ (cid:72) R (cid:76) Figure 5: Return distribution for α abm = 10 − with return interval 120 s and anormal distribution for comparison
4. Conclusion
For the equilibrium pricing we see a large space of parameters for which themodel produces sustainable price time series, i.e. , the price does not divergeor collapse. Heavy tails are not observed. The time series is reminiscent of ageometric Brownian motion where α and β determine its global trend.Embedding the decision model into an agent-based model with order bookpricing causes the scale of the parameters to change. However, the parameter α of the decision model has comparable ramifications for the price time series.More importantly, we observe heavy tails for the return distribution. Thus, weconclude that an order book is necessary for the emergence of heavy tails in thecontext of our decision model. Combining a decision model with an order bookpricing allows us to study the effects of the decision model within a realisticenvironment. We emphasize that in contrast to Schmitt et al. [33] the lifetimeof the RandomTrader s’ limit orders is chosen so that near the best prices lessgaps exist. At deeper price levels gaps do exist, but typically they play norole because the order volumes of the
RandomTrader s do not dig deep enoughinto the order book. The herding behavior of our model traders leads to aunidirectional stress to either the available ask or bid volume. By acting in thesame direction the model traders are able to remove the densely occupied pricelevels around the best ask or bid and reach the gaps deeper in the order book.This is a crucial factor in generating heavy tails.9igure 6: Typical order book volume with sell (above) and buy orders (below)In general, implementing a decision model in the setting of an order bookpricing leads to new insights and gives the possibility to study it in a realisticenvironment. The order book makes it possible to gain the understanding ofa microscopic level and to access new features. Put differently, decision mak-ing models that are not embedded into an order book environment can yieldunrealistic or even misleading results.
Acknowledgments
We thank S´ılvio R. Dahmen and Ana L.C. Bazzan for preliminary studieson the model.