* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Automated Market Makers - A Survey
Survey
Document related concepts
Transcript
Automated Market Makers - A Survey Greg Pastorek (Dated: May 4, 2016) I. INTRODUCTION Prediction markets allow participating agents, called traders, to be on the outcome of events, which pay off if correct. For example, in sports betting markets, the traders can be for or against a variety of outcomes, such as a particular team winning. Prediction markets are useful in information aggregation, since when each trader quotes a price or makes trades, it is revealing its (sometimes private) information about its belief on the outcome. These are superior to other methods, such as polls, since the participants are incentived financially to reveal their own information. One example of a successfully information aggregation prediction market is the Iowa Electronic Market, a University run market that lets traders bet on a variety of outcomes ranging from presidential elections to weather events. The information gathered from the market is available for students to use in research. Another example is the New York Stock Exchange, which helps aggregate company valuations through their stock prices. Formally, prediction markets are continuous double auction markets, with both buyers and sellers, where orders are matched if the buyer’s price is higher than the sellers, matched at the price of the person who made the offer first. Traders buy and sell these bets continuously, called securities. The aforementioned market introduces some problems. One, is that a trader will often have difficulty finding a counter party for there offer, depending on the level of activity. Since the market is zero-sum, if a trader wants to make a trader it belives is profitable, it must assume another trader has the opposite opinion. Thus finding a counter party is difficult and the trader must wait. Even worse, traders will not want to wait, and thus it will not even want to enter the market. This creates a vicious cycle of low activity and low liquidity. Another problem is that while a trader quotes a price and waits, it has revealed its private information by providing a quote. This may tip off other traders and prevent them from trading with the current quote. [7] A solution to these problems is to introduce a market making agent. Automated market makers are algorithmic agents that provide liquidity in prediction markets, by offering quoted prices for buying and selling at all times. In our sports betting example, the bookie acts as a market maker since they always offer both sides of every bet. These agents will inherently run at a loss, although we will later discuss ways to collect profit. II. MATHEMATICAL FORMULATION We are in a market betting on the outcome of an event {ω}n , with possible outcomes ω1 , ..., ωn . Assume we have one market maker in the market. Its current position can be describe by the payout vector x ∈ Rn , where each element of the vector x describes the payout of a potential event. For example, if ωi occurs, then the market maker will receive xi . When a trade is made with the market maker, the payout vector is transformed x → x0 . For example, suppose we are in a market for the outcome of a coin flip. ω1 is heads, ω2 is tails. Traders can buy and sell two securities, s1 and s2 . s1 pays $1 if ω1 (heads) occurs, and s2 pays $2 if ω2 (tails) occurs. Suppose the market maker holds nothing, and then buys one tails contract s2 from a trader. It’s payout vector changes from {0, 0} → {0, 1} 1. Cost Functions A market maker’s behavior is defined by how it sets its prices based on its past actions and beliefs about the future. Securities are priced according to the market maker’s cost function (also referred to as a risk measure). A cost function is a function C : Rn → R, that takes the market makers payout vector as an input. We use the difference in cost functions between two payout vectors to price the trade. For example, suppose the market maker has payout vector q and cost function C, and a trade comes in an wants to buy r and thus change the market maker’s payout vector to q − r. The transaction will cost the trader C(q) − C(q − r). Since the change in the cost function determines the price the market charges, the instantanious price for any security is the partial derivative of the cost function with respect to the quantity of the security. That is the price for security i is: pi (x) = −∂C(x)/∂xi 2. Desired Properties of Cost Functions Othman et al [7] outlines 5 desired properties of cost functions as the basis for the types we will build. They are outlined below: • Convexity: 2 That is C(ax + (1 − a)y) ≤ aC(x) + (1 − a)C(y) for all a ∈ [0, 1]. This desired property encourages diversification. That is, the cost of two portfolios held by the same entity should be less than or equal to the sum of the cost of the two portfolios held separately. A risk measure that is not convex can produce bizarre degeneracies. For instance, Artzner et al. (1999) point out that a non-convex risk measure can produce cases of intra-firm arbitrage. If a firm uses a non-convex risk measure, it can be advantageous for two traders to report their specific portfolios x and y separately, rather than to report their desks common exposure as x+y. Since the firm itself exists as (and is exposed to) the sum total of its risks, this division should be discouraged. • Monotonicity: For all x and y such that xi ≤ yi ∀i, C(x) ≤ C(y). This property prevents arbitrage. Since y will always produce a greater payout than x, C(y) must be greater than C(x) so that buying y costs more. Suppose it didn’t, then the trade x → y would have a negative cost to the trader (they would be selling to the market maker), yet the trader would be gauranteed a better payout than previously. Monotonicity can prevent this type of arbitrage. • Bounded loss Bounded loss means supx [maxi (xi ) − C(x)] < ∞. We desire bounded loss to prevent bankruptcy, and unbounded worst-case loss is clearly undesirable. • Translation invariance For all x and scalar α, C(x + α1) = C(x) + α. That is, adding α to every payout in the world will cost α. • Positive homogeneity For all x and scalar γ > 0, C(γx) = γC(x). Positive homogeneity ensures a scale-independent price response. One way to intuitively think of this is that the cost function is currency independent. Show by Arrow (Arrow 1963), it is impossible to have all 5 of these properties besides one cost function. That function is C(x) = maxi (xi ). However, max is a poor cost function for many reasons. Consider the following example, a trader wishes to make a bet and move market maker’s payout vector from {5, 3} to {5, 3} costs nothing! We will relax the 5 desired properties. We prioritize the bounded loss requirement, thus we compromise to relax positive homogeneity or translation invariance. A. Convex Risk Measures Convex risk measures relax the positive homogeneity requirement. Thus, they are translation invariance, have bounded loss, are monotonic, and convex. This section will cover two instances of convex cost functions, the Logarthmic Market Scoring Rule (LMSR) and Constantutility cost-functions. 1. LMSR The Logarithmic Market Scoring Rule (LMSR) [4] was originally developed by Hanson et al. It is popular because of its simplicity - its cost and first derivatives have a simple closed-form. C(x) = b log( P i exp( xbi )) And the prices (∂C(q)/∂q) are: pi (x) = Pexp(xi /b) j exp(xj /b) The LMSR has worst-case bounded loss of b log(n). It has one parameter, b, referred to as the liquidity parameter. This parameter adjusts the sensitivity of the price changes with respect to trade size. The higher b, the less sensitivty the market. For example: With b = 10, C({6, 3}) − C({5, 3}) ≈ 0.56 With b = 1, C({6, 3}) − C({5, 3}) ≈ 0.92 2. Constant-Utility Cost Functions Constant-utility cost functions are a more general representation of convex cost functions developed by Chen and Pennock [3]. They work by keeping the market makers expected utility constant for all payout vectors. To define these, we first define a utility function, some strictly increasing concave function u : U → R+ , where U is an open inerval on the positive real line. We define the cost cost utility function as follows, let u be some utility function and let x0 ∈ domu. Let πi be the market makers belief on the probability of ωi occuring. The cost function C is thus the implicit solution to: P i πi u(C(x) − xi ) = u(x0 ) Computation is done by running a binary-search over the possible values of C(x). Chen and Pennock [3] note that this is a general representation of convex cost functions. For instance. the popular LMSR is the constant-utility cost function with πi = 1/n and u(x) = −exp(−x/b) 3 3. Extensions The market makers discussed so far run at a loss, and they are also liquidity insensitive. Liquidity insensitivity means that the pricing influence of trades does not depend on the level of activity in the market. This is not desirable, consider the following: should buying one security when no other trades have occurred move the market just as much when 10,000 trades have occurred? Most will disagree. Othman and Sandholm [6] propose an extension to constant-utility cost functions that make them profit-taking and liquidity sensitive. Let f and g be non-decreasing functions R+ → R, with f (0) = g(0) = 0. Call f the liquiduty function and g the profit function. Also, let d be some distance function Rn Rn → R Finally, maintain some state s, where s = 0 initially. If a trader wants to move the market maker’s payout vector from x to y, it will be charged M (x, y). This is defined below: thus increases (becomes more liquidity) with trading activity. No expressivenenss is lost, since we can just double the set of securities to include one security for each sale. Under this scheme, we redefine how pricing works, rather than paying C(q)−C(q 0 ) to move the market from q 0 → q, the trader now pays C(q) − mean(q) − C(q 0 ). Thus, the market maker is always buying securities. Note that this constraint also adds profit taking, consider a round trip with two securities, where one is the shortversion of the other. C({1, 1}) − 1 − C({0, 0}) will be positive, even though {1, 1} and {0, 0} are equivalent. This not only adds liquidity sensitivity, but also removes the non-intuitive liquidity parameter. While there is a still a parameter α, in [5] Othman et al show that α relates to the profit taking by the market maker. The α parameter affects the profit taking, and it can be v related to the maximum commission taken. If α = n logn , the commission will not exceed v. The closed form solution for the price function is: pi (x) P Solve for C(y) (we know C(x) from the last iteration) 0 i πi u(C(y) − yi + f (s + d(x, y))) = u(x + f (s + d(x, y))) j = αlog( P j exp(xj /b(x))) + xj exp(xi /b(x))−sumj xj exp(xj /b(x)) P j xj exp(xj /b(x)) P C. Kelly-Criterion Market Maker The total cost is then: M (x, y) = C(y) − C(x) + f (s + d(x, y)) − f (s) + g(s + d(x, y)) − g(s) Also, update the state s ← s + d(x, y) There are a few restrictions on the choice of f , g, and d outlined by Othman and Sandholm [4]. For example, it is required that lims→∞ f 0 (s) = lims→∞ f 00 (s) = lims→∞ g 00 (s) = 0 B. Homogeneous Cost Functions Homogeneous Cost Functions are another family, where we relax the translation invariance requirement and add positive homogeneity. Recall, that is C(γx) = γC(x) for scalar γ > 0. One type of homogeneous market maker with some desirable properties is the OPRS Market Maker developed by Othman et al. [5]. The OPRS Market Maker is a homogeneous analgoue to the LMSR function. It is liquidity sensitive and profit taking. The cost function is defined below: P C(x) = b(x) log( i exp(xi /b(x))), where b(x) = P α i xi We constrain that all elements of x are positive, thus b(x) can capture the level of activity in the market and Othman describes in his thesis a way to design a superior market maker when we have a good prior on the future. This is realistic for many applications, such as prop trading desks, where extensive research is put in to predictive models. This market maker is base on the Kelly-criterion, which is a way to make bets that maximizes expected log-utility. In this model, traders are anonymous, and at each time step one is selected to trade with at arandom. The state of the market is (t, w), where t is the current traders index and w is the market maker’s payoff vector. Let π be the market makers pricing function, p be the market makers probability distribution on the outcomes, and let V be the expected utility. At termination, based on the Kelly-Criterion, the expected utility is: V (tf , w) = P i pi log(wi ) The optimal pricing function π ∗ must be solved for as follows: Let δ(t)betheprobabilitythatthesessionterminatesattimet(whiletr π) be the probability that the trader takes bet x at price π(x) (note that traders are anonymous so is does not depend on t). P V (t, w) = (1 − δ(t)) x P (x, π)V (t + 1, w − x + π(x)) + δ(t)V (tf , w) π ∗ (t, w) = argmaxπ V (t, w) 4 from the market is show in figure 1. FIG. 1. Distribution of probabilities time series III. This experiment showed some problems with the automated market maker. In particular, the prices has a ”spikiness” element to them. That is, prices for very similar securities were wildly inconsistent. This is nonsense, because there is no reason that a certain day should be significantly less likely than the days immediately before and after it (weekends and holidays aside). Figure 2 shows the ”spikiness” of the prices. It turns out that the LMSR actually induces spikey prices. It is because Oi pi (x) > Oj pj (x) for some x whenevr pi (x) > pj (x), thus the prices are pushed up higher as trades are made for higher prices faster than lower prices, so the spikiness grows. APPLICATIONS The experiment analyzed successful trader strategies. Most involved spike-dampening. With the realization that these spikes were nonsense, traders could enter a A. Gates-Hillman Prediction Market The Gates-Hillman Prediction Market was an experimental prediction market run at Carnegie Mellon University [1]. The prediction market was run to predict the opening date of a new building. The participants used raffle tickets instead of real money, and they could be redeemed for prizes. The market used an automated market maker (LMSR with b = 32). The event space was the set of days in a year (n = 365). Each day has one security that pays out if the building opens on that day. Trades would trade using an interface that let them bet for or against spans of days, thus they would buy securities in bundles. FIG. 2. Prices across securities showing spikiness statistical arbitrage by betting against spikes and betting for undervalued spans, and waiting for the spikes to even out, or otherwise getting positive expected value on the trades made against the spikes. The implicit probability distribution of opening days [1] Othman, Sandholm. The Gates Hillman Prediction Market https://www.cs.cmu.edu/~sandholm/Gates-Hillman\ %20prediction\%20market.RevEconDesign13.pdf [2] Das, Brahma, Chakraborty, Lavoie, Magdon-Ismail. A Bayesian Market Maker. http://www.cse.wustl.edu/~allenlavoie/papers/bmm. pdf [3] Chen, Pennock. A Utility Framework for Bounded-Loss Market Makers. https://arxiv.org/ftp/arxiv/papers/1206/1206. 5252.pdf [4] Hanson. Logarithmic Market Scoring Rules for Modular Combinatorial Information Aggregation http://mason.gmu.edu/~rhanson/mktscore.pdf [5] Othman, Sandholm, Reeves. A Practical LiquiditySensitive Automated Market Maker http://www.eecs.harvard.edu/cs286r/courses/ fall12/papers/OPRS10.pdf [6] Othman, Sandholm. Automated Market Makers That Enable New Settings: Extending Constant-Utility Cost Functions http://repository.cmu.edu/cgi/viewcontent.cgi? article=3781&context=compsci [7] Othman. Automated Market Making: Theory and Practice