Integrating Book Orders and Market Makers

No Gravatar

[Cross-posted from Pancrit.org.]

Dave Pennock gave a gentle introduction to the Market Scoring Rule invented by Robin Hanson. In the comments, Sid asked for an explanation of how to integrate the MSR with an order book. Dave asked me privately if I&#8217-d be willing to tackle that, and this post is the result. Robin&#8217-s short note on integrating an order book and a market maker covers a lot of territory very quickly. In Robin&#8217-s defense, it was written to clarify some ideas in the midst of a conversation we were having at the time, and hasn&#8217-t been cleaned up for publication. I&#8217-ll expand on it here so it has a chance of making sense to others. The paper couches things in terms of the MSR, a particular AMM, but none of the implementation depends on which AMM is used.

There&#8217-s a working example of the integration we&#8217-re talking about in the code for Zocalo. The code that does this is currently in transition since I&#8217-m adding support for multi-outcome markets. For the moment, I recommend reading the code for version 375, since the current code is more complex and possibly incomplete. You can either download the complete source code for release 2006.5 of the Zocalo Prediction Market, or browse the code directly using the SVN interface.

The paper starts by giving a very compressed introduction to the idea of a prediction market and market maker (hereafter AMM for Automated Market Maker). Unless you&#8217-re very familiar with the details and the formalisms that Robin uses to describe them, you&#8217-d be better off reading the original papers (Logarithmic Market Scoring Rules, Combinatorial Information Market Design) than trying to pick anything up from the first four paragraphs of the note.

The fourth paragraph slips into the idea of integrating an order book with the AMM he&#8217-s talked about to that point. (&#8221-If instead [the AMM price resulting from buying the entire quantity is higher than the user’s max marginal price], a portion […] could be traded with the market maker, leaving a book order for the remaining quantity&#8221-). From that point, he talks about how to integrate the two markets.

If new orders get the advantage of any order price overlap

In book order systems, if orders arrive asynchronously, you will often see orders that &#8220-overlap&#8221-, i.e. orders to buy at a higher price than the best offer to sell, or orders to sell lower than the best offer to buy. The system has to have policy about what price to transact at in these cases. The system could tell each party that they got the price they requested, and pocket the difference- it could use the book order&#8217-s price or the new offer&#8217-s price- or it could split the difference in the interest of fairness. If any choice is made other than using the stated price of the order in the book, investors have an incentive to carefully submit bids a little at a time (aka &#8220-structure&#8221- their bids) so they won&#8217-t pay more than they have to if new orders should arrive. Robin argued elsewhere (I can&#8217-t find the reference at the moment) that you should just transact at the book order price so that people submitting market price orders don&#8217-t waste their resources and yours on this optimization.

That choice also simplifies the calculation for accepting new offers. As Robin says, &#8220-each book order […] imposes a constraint on the market maker price&#8221-. The AMM should fulfill orders up to that limit, then let trade continue with the book order. This requires a loop, in which you buy from the AMM until you reach the limit imposed by the best order(s), then trade up to the book order&#8217-s available quantity, then go back to the AMM until you reach the next book order. You can see the approach in Zocalo&#8217-s method Market.buyFromBothBookAndMaker(&#8230-). (The method starts at line 237.)

At every step,

  • find the remaining quantity q of the new order
  • find the price p available from the best existing order
  • if the AMM&#8217-s price is no better than the book order, trade up to q with the book
  • otherwise trade with the AMM to the lesser of p or q

The loop stops either when the new order is fulfilled or the price limit specified by the new order is reached.

That&#8217-s the simple version for a one-dimensional AMM. The multi-dimensional version arises if you implement the AMM as described in &#8220-Combinatorial Information Market Design&#8221-. There are two open source implementations of this approach available for reading by hard-core hackers. Robin built an implementation in Lisp, and I wrote a version in E. Neither is more than a demonstration of how the market engine works, since no serious user interface was written for either one.

Rather than attempt to explain how the approach translates to the multi-dimensional case now, I&#8217-d prefer to wait until after I write an explanation of the n-dimensional combination market, and that depends on a gentle introduction to conditional and combinatorial betting which I haven&#8217-t written yet. Having someone ask about Robin&#8217-s note raises my priority for writing these prerequisites.

Other Articles in this series

    PM intro: basic formats (2005-12-30)

  • PMs with Open-ended Prices (2006-01-05)
  • Looking at Both Sides (2006-04-17)
  • Book and Market Maker (2006-04-28)
  • Liquidity in N-Way claims (2006-07-19)
  • Continuous Outcomes using Bands and Ladders (2006-09-20)

MESSAGE TO JIM CHANOS: MIDAS ORACLE WOULD PUBLISH YOUR REBUTTAL.

Hello Mister James Chanos,

I&#8217-m Chris Masse, the Blog Administrator and Editor of Midas Oracle .ORG.

I see this message posted at Deal Breaker.com:

No one from &#8220-MidasOracle&#8221- or DealBreaker.com attempted to contact me before running this false and malicious story. Jim Chanos

Posted by: James Chanos | January 10, 2007 12:33 AM

This open letter is to tell you that Midas Oracle is a group blog where 28 post authors have published Op&#8217-Eds, and you&#8217-re more than welcome to have your rebuttal published here, or linked to, whatever you prefer.

For your information, bloggers seldom contact people they write about, contrary to Press journalists &#8212-Steve Roman (the blog author of Insight or Connection – How Kynikos Associates Profited from the Gaming Bill) thus fits the current convention/standard of the Blogosphere. Note that there is a difference between the print Press and the Web-based blogs: a blog is defined as a published conversation, and the person who is blogged about can enter the conversation and let the readers know his/her viewpoint(s). Contrary to the print Press, no editor will censor your &#8220-letter to the editor&#8221-.

Once this blog post is published on Midas Oracle, I will try to send its URL via e-mail.

Chris Masse

&#8212-

External Link: James Chanos: Genius Short-Seller or Politically Well-Connected? Or Is There A Difference? – by John Carney – 2007-01-09

[..] Stephen Roman at MidasOracle.org suspects that there may have been something more at play here than good luck or good research—namely, James Chanos’ political connection. Some of the biggest supporters of anti-online gambling legislation have been the big casino operators, and, of course, the Senator from Vegas—err, Nevada—John Ensign. Now according to Roman, Ensign likely knew that the online gambling legislation was likely to be passed through his connections to Senate leader Bill Frist. What’s more, Roman thinks its very possible that Ensign could have passed this information on to Nevada Attorney General George Chanos, who just happens to be the cousin of Kynikos’ James Chanos. [&#8230-]

Is any of this true? We have no idea. It wouldn’t be the first time that this sort of “honest graft” has helped make someone rich or richer. And the question of the legality of trading on inside information about upcoming legislation has long been debated. Frankly, the whole chain of information Roman proposes seems unnecessary. Even if it didn’t happen exactly like that—Frist to Ensign to Chanos to Chanos—it wouldn’t be surprising if James Chanos connections to Nevada’s gambling community helped him anticipate the legislation.

&#8212-

Addendum:

Contact Form

Read the previous blog posts by Chris. F. Masse:

Contract on US Economy going into Recession – REDUX

Last time, when I said that there was a problem with the TradeSports chart, nobody believed me and Caveat Bettor treated me like a decerebrated idiot. See the problem??? The TradeSports chart spans on one day, only.

Let&#8217-s try again the TradeSports code lines (pasted here in order to generate a dynamic chart &#8211-i.e., a chart that will update itself in the future):

Chart

There is OBVIOUSLY a technical problem.

Anyway.

James Hamilton has managed to better the TradeSports-InTrade US recession contract:

Given the concerns expressed by Stephen Kirchner about the original details of the Tradesports contract, I suggested to Tradesports a tighter definition of what it means for the U.S. to go into a recession, which they&#8217-ve now adopted. The current contract declares that the U.S. will be said to have experienced a recession in 2007 if the Commerce Department numbers as reported on February 15, 2008 show 2 consecutive quarters of negative real GDP growth between 2006:Q4 and 2007:Q4.

Here&#8217-s what Stephen Kirchner had written:

As is often the case with prediction markets, the contract specification raises more questions than it answers. There is no reference to whether the contract expires with the advance, preliminary or final GDP releases. The potential expiry with the Q3 release still leaves open the possibility of a recession in 2007 as a result of revisions to historical data. You could be right about a recession in 2007 and still lose money with this contract specification. And why do we need the media to confirm data released by the BEA? Perhaps Intrade are trying to avoid the problems that arose with their North Korean missile launch contract.

TradeSports-InTrade John Delaney should take advice from economists BEFORE setting up any economics-related prediction markets. He&#8217-s probably not humble enough to do that. I have always said that creating prediction markets requires a dual competency, which prediction exchange managers are unlikely to possess &#8212-they are managers, not thinkers, I will tell you. Thus, the need for experts advising prediction exchanges &#8212-that&#8217-s how the &#8220-humility&#8221- factor comes in.

Addendum: Professor James Hamilton of Econ Browser tells me that he has slightly modified the TradeSports code line to read now:

Price for US Economy in Recession at TradeSports.com

Finally!!!!!! It works.

Addendum: Professor James Hamilton says, in a comment:

CEO John Delaney has been extremely gracious in all his dealings with me, and responded very quickly to my suggestions on the recession contract. He’s also invited me to consult with them prior to launching future economic contracts. So I think he’s on board for your message.

OK.


Author Profile&nbsp-Editor and Publisher of Midas Oracle .ORG .NET .COM &#8212- Chris Masse&#8217-s mugshot &#8212- Contact Chris Masse &#8212- Chris Masse&#8217-s LinkedIn profile &#8212- Chris Masse&#8217-s FaceBook profile &#8212- Chris Masse&#8217-s Google profile &#8212- Sophia-Antipolis, France, E.U. Read more from this author&#8230-


Read the previous blog posts by Chris. F. Masse:

  • Are David Pennock’s search engine prediction markets the worst marketing disaster since the New Coke?
  • Midas Oracle is incontestably [*] the best vertical portal to prediction markets.
  • Comment spam paid by Emile Servan-Schreiber of NewsFutures-Bet2Give
  • BetFair Games needs a Swedish provider to develop its gambling offerings.
  • When Markets Beat the Polls – Scientific American Magazine
  • Robin Hanson has some fanboy in India. Great. Tiny caveat: The parroting Indian writer does not acknowledge Robin Hanson by name.
  • Molecular Nanotechnology

Combining forecasts

No Gravatar

I have been suggesting that the best statistical approach, when confronted with conflicting signals such as the employment estimates from the BLS payroll survey, the separate BLS household survey, or the huge database from the private company Automatic Data Processing, is not to selectively throw some of the data out but rather to combine the different measures. Judging from some of the comments this suggestion has received at Econbrowser, Calculated Risk and Outside the Beltway, I thought it might be useful to say a little more about the benefits of combining forecasts.

Suppose we have available two polls that have surveyed voters for a particular election. The first surveyed 1,000 voters, and found that 52% of those surveyed favored candidate Jones, with a margin of error of plus or minus 3.2%. [By the way, in case you’ve forgotten your Stat 101, those margins of error for purposes of evaluating the null hypothesis of no difference between the candidates can be approximated as (1/N)0.5, or 0.032 when N = 1,000]. The second poll surveyed 500 voters, of whom 54% favored candidate Jones, with the margin of error for the second poll of plus or minus 4.5%. Would you (a) throw out the second poll, because it&#8217-s less reliable than the first, and (b) then conclude that the evidence for Candidate Jones is unpersuasive, because the null hypothesis of no difference between the candidates is within the first poll&#8217-s margin of error?

If that&#8217-s the conclusion you reach, you&#8217-re really not making proper use of the data in hand. You should instead be reasoning that, between the two polls, we have in fact surveyed 1,500 voters, of whom a total of 520 + 270 = 790 or 52.7% favor Jones. In a poll of 1,500 people, the margin of error would be plus or minus 2.6%. So, even though neither poll alone is entirely convincing, the two taken together make a pretty good case that Jones is in the lead.

In the above example, it&#8217-s pretty obvious how to combine the two polls, just by counting the raw number of people covered by each poll and then combining the two as if it were one big sample. But this example illustrates a statistical procedure that works in more general settings as well. We have two different estimates, 0.52 and 0.54, of the same object. We know that the variance of the first estimate is (0.5)2/1000, while the variance of the second estimate is (0.5)2/500 [again, does that sound familiar from Stat 101?]. If we followed the general principle of taking a weighted average of the two, with weights inversely proportional to the variances, that would mean in this case calculating [(1000)(0.52) + (500)(0.54)]/(1000 + 500) = 0.527, which amounts to combining the two estimates in exactly the way that common sense requires for the two-poll example. That principle, of taking a weighted average of different estimates, with weights inversely proportional to the sampling variance of each, turns out to be a good way not just to combine two polls but also to combine independent estimates that may have come from a wide range of different statistical problems.

But what if the second poll not only covered fewer people, but is also less reliable because it is a week older? One way to think about the issue in that case is to notice that the second poll&#8217-s estimate differs from the true population proportion because of the contribution of two terms. The first is the sampling error in the original poll (correctly measured by the (0.5)2/500 formula), and the second is the change in that population proportion over the last week. If we knew the variance governing how much public preferences are likely to change within a week, we would just add this to the sampling variance to get the total variance associated with the second estimate, and use this total variance rather than (0.5)2/500 to figure out how strongly to downweight the earlier poll. The earlier poll would then get much less weight than the newer one, but you&#8217-d still be better off making some use of the data rather than throwing it out altogether.

And what if you believe that one of the polls is systematically biased, but you&#8217-re not sure by how much? Many statisticians in that case might give you the OK to go ahead and ignore the second poll. On the other hand, there are many of us who would still want to make some use of that data, accepting some bias in the estimate in order to achieve a smaller mean squared error. In doing so, we acknowledge that we may make a systematic error in inference that you will avoid, but we will nevertheless be closer to the truth most of the time than you will if there are substantial benefits to bringing in extra data.
Examples where such an approach is quite well-established are estimating a spectrum (where we use the value of the periodogram at nearby frequencies, even though we know it would be a biased estimate of the spectrum at the point of interest) and nonparametric regression (where we use the value when x takes on values other than the one we&#8217-re interested in, even though again our assumption is doing so necessarily introduces some bias to the final estimate).

Robert Clemen, in a paper in the International Journal of Forecasting in 1989 surveyed over 200 different academic studies, and concluded:

Consider what we have learned about the combination of forecasts over the past twenty years&#8230-. The results have been virtually unanimous: combining multiple forecasts leads to increased forecast accuracy. This has been the result whether the forecasts are judgmental or statistical, econometric or extrapolation. Furthermore, in many cases one can make dramatic performance improvements by simply averaging the forecasts.

If I ask you what you think U.S. employment growth was in December, and your answer is the December BLS payroll number, one could say you have decided that the optimal weights to use for &#8220-combining&#8221- the payroll, household survey, and ADP estimates are 1.0, 0.0, and 0.0 respectively. But there&#8217-s an awful lot of statistical theory and practical experience to suggest those aren&#8217-t the best possible weights.

Or to put it another way, even though the payroll numbers were encouraging, the fact that ADP estimates that the U.S. lost 40,000 jobs in December should surely make you a little less confident about the robustness of employment growth than you otherwise would have been.

Would prediction registries obtain 80% of the benefits of prediction markets?

No Gravatar

Smart *** Mike Linksvayer (who has an opinion on anything) doubts that the number is that high. (How does he know??? How dare of him to contredict Robin Hanson, the master of the Universe???) What do you think, guys and gals?

(((And I renamed the Midas Oracle post category, &#8220-Track Records&#8221-, to read now &#8220-Prediction Registries&#8220-. See, even though I roast Mike Linksvayer publicly, he has a profound impact on moi.)))

HSX = an advanced indicator for TradeSports traders??? – REDUX 2

No Gravatar

This is a recent picture of traitor Mike Linksvayer (much better than the New York Times picture where he looked like an angry chimp):

Mike Linksvayer
&#8212-

First, Mike Linksvayer sided with moi:

[Hollywood Stock Exchange] could be an indicator that the [TradeSports] price is wrong and in which direction, which is enough for a [TradeSports] trader to place an order.

Then, as soon as I turned my back, he sold me down the river (I should have known!!!!!!):

I agree with everything you [you = Sacha Peter] write in the last comment (and your original challenge to CFM to put his money where his mouth is).

&#8212-

#1. HSX &#8220-prices&#8221- are predictive (see The effectiveness of pre-release advertising for motion pictures – PDF – by Anita Elberse and Bharat Anand – 2005-03-05):

Despite the fact that the simulation does not offer any real monetary incentives, collectively, HSX traders generally produce relatively good forecasts of actual box office returns (e.g. Elberse and Eliashberg 2003, Spann and Skiera 2003). According to Pennock, Lawrence, Giles and Nielsen (2001a- 2001b), who analyzed HSX&#8217-s efficiency and forecast accuracy, arbitrage closure on HSX is quantitatively weaker, but qualitatively similar, relative to a real-money market. Moreover, in direct comparisons with expert judges, HSX forecasts perform competitively.

#2. You can investigate accuracy and precision scientifically- no need to back one&#8217-s research paper with one&#8217-s money.

#3. My original question was: “Should I use HSX info to speculate at TradeSports?”. Looking at HSX and TradeSports odds, maybe The Departed is correctly priced or underpriced at TradeSports, and maybe Babel is underpriced at TradeSports.

Iran – Is Something Really Up?

No Gravatar

Both Spook86 and Michael Ledeen suggested a few days ago that the USA might be adopting a stronger position towards Iran. Are we?

Look at Tradesports&#8217- price history for its AIRSTRIKE.IRAN.DEC07 contract:

(Click the thumbnail to display a large version of this chart.)

So what does this combination of an increase in stern American and British rhetoric, and stagnant odds in the geopolitical wagering market, mean? I think it&#8217-s clear. The rhetoric is most likely not intended as a prelude to action by us. It is intended as a substitute for action. This is business as usual and not at all encouraging.

(See also this post.)

Cross-posted at Chicago Boyz, an Intrade affiliate.

NewsFuturess explainer on prediction markets

No GravatarNo definition, but there&#8217-s an example, here &#8212-static, alas.

(((In passing, I see that NewsFutures &#8220-will use the Brookings Institution&#8217-s Iraq Index as a source to measure troop levels.&#8221- Good. But what it they fail to deliver, like the US DOD in the NKM scandal?)))

Previous blog posts by Chris F. Masse:

  • Is that HubDub’s Nigel Eccles on the bottom left of that UK WebMission pic?
  • Collective Error = Average Individual Error – Prediction Diversity
  • When gambling meets Wall Street — Proposal for a brand-new kind of finance-based lottery
  • The definitive proof that it’s presently impossible to practice prediction market journalism with BetFair.
  • The Absence of Teams In Production of Blog Journalism
  • Publish a comment on the BetFair forum, get arrested.
  • If I had to guess, I would say about 50 percent of the “name pros” you see on television on a regular basis have a negative net worth. Frightening, I know.