Wednesday, February 21, 2018

batch auctions with liquidity sale type

One of the less celebrated problems with this blog is that it doesn't know what its audience is; sometimes I assume very little background knowledge, and sometimes I assume quite a bit, and sometimes I assume knowledge of some arcane or advanced concepts and yet explain basic ones in the same post. This post could be written in a number of different ways; I'm going to assume I can talk about "convexity" in high-dimensional Euclidean spaces, but will define "Minkowski sum", but will only allude, and only in this very sentence, to the large expanse of follow-on ideas that can be pursued by those who know what support functions are.

There has been talk for many years about replacing the continuous double auction of the stock market with frequent batch auctions; orders to buy or sell would be accumulated over the course of five minutes, a price set to clear the market, the executable trades at that price executing against each other. The New York Stock Exchange does this twice a day — at the beginning and end of the trading day — and I have in the recesses of my head the notion that there was an ECN 15–20 years ago that in fact did frequent auctions of the sort I'm going to build to, and maybe they used some of the math I've redeveloped to do it. Perhaps they did so without glossing over a problem I'm going to gloss over: I'm going to assume that shares and money are arbitrarily divisible, so that if you ask to buy 100 shares for no more than $5,000, I'm allowed to have you buy 33.2 shares for $1,565.1934 (because that's less than $50 per share times 33.2 shares).

So here's a mathematical way of representing the problem: let x be the number of shares of the stock I want to sell, and y the number of dollars I want for those shares; if I'm trying to buy, these numbers are negative. I'm going to represent the order as a (straight) line segment connecting the origin to this point (x,y). If I take all of the orders, I can construct the Minkowski sum of the corresponding line segments, which is the set of points in the x-y plane that can be achieved by taking one point on each line segment and adding them together. (For example, if I have two line segments that are not parallel, the result will be a parallelogram.) For any point in the Minkowski sum, then, I have an x-coordinate and a y-coordinate, and they correspond to some[1] set of executions[2] of the various trades, with the x-coordinate corresponding to the total (net) number of shares sold, and the y-coordinate to the minimum number of dollars demanded in exchange for that number of shares. In particular, points in the Minkowski sum of the orders — we'll call this set M — for which the x-coordinate is 0 represent combinations of executions that clear the market — the same number of shares are bought as sold — and points in M for which x is 0 and y is negative represent such combinations that clear the market and allow at least some of the market participants to get a better price than they had insisted on.[3] We are especially interested in the point in M with x=0 and the smallest possible value of y; we are also interested in the slope of the boundary of M there.[4] It turns out that this slope is the "correct" price to use; anyone who wants to buy at a higher price or sell at a lower price can trade the full amount of their order at that price, while those orders with that exact per-share price may be filled, not filled, or partially filled in order to make sure that the net number of shares traded is 0.

Now, the slightly more interesting thing I might want to do — and, again, I think there was an ECN doing this at the turn of the millennium — is say "I'd like to buy 100 shares of ABC minus 50 shares of XYZ for up to $2,000, but am only willing to trade insofar as I get them in that 2:-1 ratio."[5] Now we have two kinds of shares, and we have line segments in a three-dimensional space: one dimension for each kind of stock (x1 and x2, say), and one for money (still y). Minkowski sums can be constructed as well in three dimensions as in two, and now we're looking for the smallest y such that x1=x2=0 and the "slope" there is now two slopes,[6] and we thus get prices for both stocks, but with orders of this sort in the mix, they aren't independent of each other; they have to be calculated jointly.[7]

Well, here's an idea I've had that I don't think was in that ECN, possibly for good reason. One problem with infrequent batch auctions would be how brokers and shareholders would handle margin calls; if the value of my portfolio drops enough in an auction to trigger a margin call, such that I'm compelled to sell stock, which stock I sell may depend on the stocks' price. To the extent that the previous auction's results are likely to be similar to the next one's, there may be a clear choice, but it struck me as interesting and perhaps possible to allow trades of the form, "sell whichever of (list of five baskets of stocks) has the highest price"; in fact, I can include a limit price, such that I don't sell any of them if the price is below a certain level.[8] The order is no longer a line segment; it is now a simplex[9] with six vertices, one at the origin and one at (basket,limit price) for each basket. The rest, perhaps surprisingly, goes through as before; the slope of the boundary of the Minkowski sum at the point at which the markets clear most profitably will set the prices of the stocks and (therefore) of the baskets.[10]




[1] not necessarily unique

[2] Or partial executions, or non-executions; some fraction between 0 and 1 of the trade has executed.

[3] Note that the origin is in each line segment, and thus is also in the Minkowski sum; we can always choose not to execute any orders, and thus no shares will be bought and no shares sold.

[4] It will always be possible to draw a line that intersects M at this point in such a way that no point in M lies below the line. If M has a vertex at that point, then there may be several such lines, in which case you're welcome, as far as I currently care, to pick any of them, and suppose that the slope to which I refer is the slope of that line.

[5] A possibly interesting special case would have a limit price of 0; "I'll swap my 50 shares of XYZ for 100 shares of ABC (but am unwilling to put in dollars to do it)."

[6] With, perhaps, a whole suite of planes such that M dips below none of them, but intersect all of them at (0,0,y); again, there is at least one such plane, and if there are more, any is suitable, and has a slope in the x1 direction as well as in the x2 direction.

[7] For example, if the price of ABC is low enough that my order fully executes, then I'm selling XYZ shares, perhaps pushing down their price; on the other hand, if a bunch of orders to buy ABC come in and push the price high enough that my order doesn't execute, that may then require a higher price for XYZ in order for that market to clear.

[8] This "limit" order may be less motivated by the notion of a margin call than other kinds of liquidity shocks; perhaps I have some valuable use for $5000, and would like to get it from whichever of these combinations of stocks allows it, but if the prices of the stocks are sufficiently low I'd rather just hang onto them.

[9] For what I'm writing here, I suppose that the five baskets are "linearly independent"; I can't think of a reason this limitation would chafe anyone.

[10] If the highest-value basket has a value exactly equal to the limit price, you might get a partial fill, and if two or more of the proffered baskets have the same value (higher than the others and the limit price), then you may end up executing a convex combination of those baskets.

Tuesday, January 16, 2018

costly signalling

Thinking about basics again, and it seems like a framework for the basics of costly signalling that is slightly more general than the average textbook version might be of some value.

The basics that an agent has some piece of information that it would like to credibly communicate, and has available a set of possible actions, some of which would directly lead to a lower payoff, but especially if the piece of information were false; as long as my gain from being believed exceeds the cost if my message is true, but is less than the cost if my message is false, then I can credibly and profitably use those actions to communicate my information so that other agents will behave in a way that helps me recoup my signaling cost.[1]

There are a variety of things I might like to incorporate into this, and what I'm particularly contemplating right now is something mechanism designish: if a designer can change the set of actions available and/or their costs, which such changes will improve welfare?  I think that the most interesting thing to note that requires a moment's thought but not a deep analysis is that, while reducing the costs of signalling seems like a good idea, everything falls apart if it becomes cheap to signal the information when it's false — unless the reduction in cost fully compensates you for being unable to communicate credibly, at least.  The clearest beneficial case, then, would be one in which you can make signalling cheaper when it's true, but without reducing the cost of sending a false signal.

I might want the information to be continuous, or at least richer than binary.  In that case, you're likely to get "partially pooling equilibria", such that if the agent wants it to be believed that a parameter is large, the agent behaves with some randomness, with some overlap in behavior between situations in which the parameter is small and when it's in-between, ultimately leading observers to make a higher guess for the value of the parameter when they see a "higher value" sort of signal, but not putting full confidence in it.  The mechanism designer then is likely to face a choice in which a lower cost of signalling in general makes the signals less informative, resulting in some knock-on inefficiency that has to be weighed against the direct cost.



[1] You could also have the cost of signalling be the same, regardless of truth, but the benefits of being believed higher when it's true; again, the sign of the net benefit should be positive if it's true and negative if it's false.

Thursday, January 11, 2018

finance conventions

I've asserted at various times that finance is easy, so they have to invent strange conventions to make it hard.[1]  In his Tuesday column, Matt Levine gave an example, sort of:
The difference is that if you buy a $100 Venezuela 9.25 percent bond a day before the semiannual interest payment is due, and the price is $20, then if it trades clean you pay the seller $20 for the bond plus like $4.60 of accrued interest, while if it trades flat you just pay the seller the $20.
This is correct in some sense, but the emphasis is not what I think a person not steeped in finance conventions would find natural; the way I would put it is
The difference is that if you buy a $100 Venezuela 9.25 percent bond a day before the semiannual interest payment is due, and you want to agree to a price of like $24.60, then if it trades clean you call the price $20 with like $4.60 of accrued interest, while if it trades flat you just call the price $24.60.
The effect of "accrued interest" is to smooth out price drops; for a bond trading at par, the day before a $2 payment, you'll pay $102 (more or less), while the next day you'll pay $100 (because you aren't getting the $2 payment, the seller is), and if it trades "clean" then, by convention, you call it $100 on both days. Stock traders just accept that the day a stock goes "ex-dividend" the price drops, and I think in a day when traders are sitting in front of computers, it's more straightforward to call the price the price instead of adopting weird rules to make it seem to behave differently from how it actually does.


[1] The hardest parts of finance, though, are law.  Conventions are second.

Monday, January 8, 2018

information and interaction

A point that I've made, but that has perhaps been better illustrated by Borges, is that extra information is less information; if you have 4MB of data, from which you need to find the 1k you want, you have, on some level, less information than if you just had the 1k.  (Maybe 12 bits less?  I don't know.)  As a related matter, if I need information from you, we may well be able to transmit it efficiently if we can go back and forth a bit than if not.  If I send one of 2n messages indicating a broad category, and you respond with one of 2m responses to help me clarify my next request, and that request is l bits, and the final answer is k bits, then we've exchanged a total of n+m+l+k bits; if I had to send a single request, I would need to send l bits for each of the 2m responses you might send to my initial message (plus perhaps the n bits as well); my request is 2ml bits, which is huge. If you know I need the information, but have to send it without my request, that's 22mlk bits you have to send me to make sure I get what I want.

I kind of got to thinking about this in the context of the Mars rover, for which two-way communication is possible, but with latency.  If the latency doubles, to the extent that analogues for n and l are appreciable, you've basically just halved the rate of information transmission; the ability to recover from that latency by transmitting extra information on spec is basically negligible.