<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The right way to implement a multi-outcome prediction market: Linear programming</title>
	<atom:link href="http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/</link>
	<description>Musings of a computer scientist and Yahoo on prediction markets, gambling, and estimating the odds of everything</description>
	<lastBuildDate>Sat, 13 Mar 2010 09:56:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: aj</title>
		<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/comment-page-1/#comment-268</link>
		<dc:creator>aj</dc:creator>
		<pubDate>Tue, 05 Aug 2008 08:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/#comment-268</guid>
		<description>Ah, of course; the linear programming bit is easy if you&#039;re only solving it in the reals and hard if you&#039;re limiting yourself to integers.</description>
		<content:encoded><![CDATA[<p>Ah, of course; the linear programming bit is easy if you&#8217;re only solving it in the reals and hard if you&#8217;re limiting yourself to integers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aj</title>
		<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/comment-page-1/#comment-267</link>
		<dc:creator>aj</dc:creator>
		<pubDate>Sun, 03 Aug 2008 06:55:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/#comment-267</guid>
		<description>Ooops. HTML and less-than isn&#039;t friendly, is it...

So, by my count the equations seem to go something like this...

O is your set of outstanding orders.
W is your set of possible states.

Each order, o, specifies a maximum quantity q(o), a price-per-unit p(o) and a proportion of each state wanted (A(o,w) for each state w in W).

At the end of the day, x(o) (amount satisfied) is found for each order, and the order submitter receives A(o,w)*x(o) shares in state w, at a cost of p(o)*x(o).

We add some &quot;phantom&quot; orders to round things off:

The &quot;creation&quot; order will create or destroy shares, so assigning it the identifier C, with A(c,w) = 1 for all w, and p(o) = 1. x(c) is unconstrained.

Some &quot;leftovers&quot; orders, L_w, will account for leftover shares for each w (say Alice buys share 1 for 50c, B buys share 2 for 50c, the share 3 onwards are leftover). In this case A(L_w, w&#039;) = 1 if w=w&#039; and 0 otherwise, p(L_w) = 0, and x(L_w) \gteq 0.

Then it&#039;s just a question of balancing everything. So, set O&#039; to all the orders (O + {C} + {L_w...}), then...

(a) All the money goes somewhere:

   Sum {o \in O&#039;} x(o) * C(o) = 0

(b) All the shares are accounted for:

   Forall {w \in W}
      Sum {o \in O&#039;} x(o) * A(o,w) = 0

For completeness there&#039;s also:

   Forall {o in O} 0 \lteq x(o) \lteq q(o)
   Forall {o in O} x(o)*p(o) \lteq BALANCE(o)

Sum {w \in W} p(L_w) represents an increment of profit for the marketplace.

x(C)*p(C) represents how much (less) the marketplace is holding in trust until the market can be settled as a result of these trades.

I&#039;m not following quite how that all works though -- shouldn&#039;t this be just as hard as the (multiple?) knapsack problem, ie Hard?

But aren&#039;t the inequalities defining a continuous solution space that includes the origin, and thus, in some sense Easy? It&#039;s been a &lt;i&gt;long&lt;/i&gt; time since I did inequalities though so maybe I&#039;m just confused.</description>
		<content:encoded><![CDATA[<p>Ooops. HTML and less-than isn&#8217;t friendly, is it&#8230;</p>
<p>So, by my count the equations seem to go something like this&#8230;</p>
<p>O is your set of outstanding orders.<br />
W is your set of possible states.</p>
<p>Each order, o, specifies a maximum quantity q(o), a price-per-unit p(o) and a proportion of each state wanted (A(o,w) for each state w in W).</p>
<p>At the end of the day, x(o) (amount satisfied) is found for each order, and the order submitter receives A(o,w)*x(o) shares in state w, at a cost of p(o)*x(o).</p>
<p>We add some &#8220;phantom&#8221; orders to round things off:</p>
<p>The &#8220;creation&#8221; order will create or destroy shares, so assigning it the identifier C, with A(c,w) = 1 for all w, and p(o) = 1. x(c) is unconstrained.</p>
<p>Some &#8220;leftovers&#8221; orders, L_w, will account for leftover shares for each w (say Alice buys share 1 for 50c, B buys share 2 for 50c, the share 3 onwards are leftover). In this case A(L_w, w&#8217;) = 1 if w=w&#8217; and 0 otherwise, p(L_w) = 0, and x(L_w) \gteq 0.</p>
<p>Then it&#8217;s just a question of balancing everything. So, set O&#8217; to all the orders (O + {C} + {L_w&#8230;}), then&#8230;</p>
<p>(a) All the money goes somewhere:</p>
<p>   Sum {o \in O&#8217;} x(o) * C(o) = 0</p>
<p>(b) All the shares are accounted for:</p>
<p>   Forall {w \in W}<br />
      Sum {o \in O&#8217;} x(o) * A(o,w) = 0</p>
<p>For completeness there&#8217;s also:</p>
<p>   Forall {o in O} 0 \lteq x(o) \lteq q(o)<br />
   Forall {o in O} x(o)*p(o) \lteq BALANCE(o)</p>
<p>Sum {w \in W} p(L_w) represents an increment of profit for the marketplace.</p>
<p>x(C)*p(C) represents how much (less) the marketplace is holding in trust until the market can be settled as a result of these trades.</p>
<p>I&#8217;m not following quite how that all works though &#8212; shouldn&#8217;t this be just as hard as the (multiple?) knapsack problem, ie Hard?</p>
<p>But aren&#8217;t the inequalities defining a continuous solution space that includes the origin, and thus, in some sense Easy? It&#8217;s been a <i>long</i> time since I did inequalities though so maybe I&#8217;m just confused.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aj</title>
		<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/comment-page-1/#comment-266</link>
		<dc:creator>aj</dc:creator>
		<pubDate>Sun, 03 Aug 2008 06:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/#comment-266</guid>
		<description>So, by my count the equations seem to go something like this...

O is your set of outstanding orders.
W is your set of possible states.

Each order, o, specifies a maximum quantity q(o), a price-per-unit p(o) and a proportion of each state wanted (A(o,w) for each state w in W).

At the end of the day, x(o) (amount satisfied) is found for each order, and the order submitter receives A(o,w)*x(o) shares in state w, at a cost of p(o)*x(o).

We add some &quot;phantom&quot; orders to round things off:

The &quot;creation&quot; order will create or destroy shares, so assigning it the identifier C, with A(c,w) = 1 for all w, and p(o) = 1. x(c) is unconstrained.

Some &quot;leftovers&quot; orders, L_w, will account for leftover shares for each w (say Alice buys share 1 for 50c, B buys share 2 for 50c, the share 3 onwards are leftover). In this case A(L_w, w&#039;) = 1 if w=w&#039; and 0 otherwise, p(L_w) = 0, and x(L_w) &gt;= 0.

Then it&#039;s just a question of balancing everything. So, set O&#039; to all the orders (O + {C} + {L_w...}), then...

(a) All the money goes somewhere:

   Sum {o \in O&#039;} x(o) * C(o) = 0

(b) All the shares are accounted for:

   Forall {w \in W}
      Sum {o \in O&#039;} x(o) * A(o,w) = 0

For completeness there&#039;s also:

   Forall {o in O} 0 long&lt;/i&gt; time since I did inequalities though so maybe I&#039;m just confused.</description>
		<content:encoded><![CDATA[<p>So, by my count the equations seem to go something like this&#8230;</p>
<p>O is your set of outstanding orders.<br />
W is your set of possible states.</p>
<p>Each order, o, specifies a maximum quantity q(o), a price-per-unit p(o) and a proportion of each state wanted (A(o,w) for each state w in W).</p>
<p>At the end of the day, x(o) (amount satisfied) is found for each order, and the order submitter receives A(o,w)*x(o) shares in state w, at a cost of p(o)*x(o).</p>
<p>We add some &#8220;phantom&#8221; orders to round things off:</p>
<p>The &#8220;creation&#8221; order will create or destroy shares, so assigning it the identifier C, with A(c,w) = 1 for all w, and p(o) = 1. x(c) is unconstrained.</p>
<p>Some &#8220;leftovers&#8221; orders, L_w, will account for leftover shares for each w (say Alice buys share 1 for 50c, B buys share 2 for 50c, the share 3 onwards are leftover). In this case A(L_w, w&#8217;) = 1 if w=w&#8217; and 0 otherwise, p(L_w) = 0, and x(L_w) &gt;= 0.</p>
<p>Then it&#8217;s just a question of balancing everything. So, set O&#8217; to all the orders (O + {C} + {L_w&#8230;}), then&#8230;</p>
<p>(a) All the money goes somewhere:</p>
<p>   Sum {o \in O&#8217;} x(o) * C(o) = 0</p>
<p>(b) All the shares are accounted for:</p>
<p>   Forall {w \in W}<br />
      Sum {o \in O&#8217;} x(o) * A(o,w) = 0</p>
<p>For completeness there&#8217;s also:</p>
<p>   Forall {o in O} 0 long time since I did inequalities though so maybe I&#8217;m just confused.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Pennock</title>
		<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/comment-page-1/#comment-265</link>
		<dc:creator>David Pennock</dc:creator>
		<pubDate>Thu, 21 Feb 2008 23:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/#comment-265</guid>
		<description>Thanks Robin. Good idea.

I believe the constraint corresponding to outcome w is something like:

Sum_O q_O*x_O(1_{w\in O} - p_O) &lt;= 0

where O is an order; we sum over all O
p_O &amp; q_O are the price &amp; quantity of order O
x_O is the fraction of order O accepted
1_{w\in O} equal 1 if the outcome is part of order O, and equals 0 otherwise

there is one such contraint for every outcome w</description>
		<content:encoded><![CDATA[<p>Thanks Robin. Good idea.</p>
<p>I believe the constraint corresponding to outcome w is something like:</p>
<p>Sum_O q_O*x_O(1_{w\in O} &#8211; p_O) <= 0</p>
<p>where O is an order; we sum over all O<br />
p_O &#038; q_O are the price &#038; quantity of order O<br />
x_O is the fraction of order O accepted<br />
1_{w\in O} equal 1 if the outcome is part of order O, and equals 0 otherwise</p>
<p>there is one such contraint for every outcome w</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Pennock</title>
		<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/comment-page-1/#comment-264</link>
		<dc:creator>David Pennock</dc:creator>
		<pubDate>Thu, 21 Feb 2008 22:24:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/#comment-264</guid>
		<description>Thanks Mike. You&#039;re exactly right: phantom bids could be much more general. In the extreme limit where every possible type of phantom bid is generated, I believe you&#039;d have something very similar to if not exactly like linear programming.</description>
		<content:encoded><![CDATA[<p>Thanks Mike. You&#8217;re exactly right: phantom bids could be much more general. In the extreme limit where every possible type of phantom bid is generated, I believe you&#8217;d have something very similar to if not exactly like linear programming.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Giberson</title>
		<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/comment-page-1/#comment-263</link>
		<dc:creator>Mike Giberson</dc:creator>
		<pubDate>Thu, 21 Feb 2008 14:30:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/#comment-263</guid>
		<description>Cool.  The LP formulation of the problem seems inherently pretty powerful.

But this approach doesn&#039;t strike me as an alternative to the phantom bid method, instead it seems like a more general/more powerful way to generate the phantom bids.

Also, it seems to me that there is nothing inherent in bundling that makes it incompatible with, say, the existing phantom bid approach of Newsfuture.  If Newsfuture wanted to enable bundling, they could define the necessary relationships (i.e., candidates 1...3 are in party A, candidates 4...9 are in party B) and then accept bids/asks for either a candidate to win or a party to win.

But using the LP formulation seems inherently more flexible and likely to be more efficient at finding matches among a diverse set of bids.</description>
		<content:encoded><![CDATA[<p>Cool.  The LP formulation of the problem seems inherently pretty powerful.</p>
<p>But this approach doesn&#8217;t strike me as an alternative to the phantom bid method, instead it seems like a more general/more powerful way to generate the phantom bids.</p>
<p>Also, it seems to me that there is nothing inherent in bundling that makes it incompatible with, say, the existing phantom bid approach of Newsfuture.  If Newsfuture wanted to enable bundling, they could define the necessary relationships (i.e., candidates 1&#8230;3 are in party A, candidates 4&#8230;9 are in party B) and then accept bids/asks for either a candidate to win or a party to win.</p>
<p>But using the LP formulation seems inherently more flexible and likely to be more efficient at finding matches among a diverse set of bids.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin Hanson</title>
		<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/comment-page-1/#comment-262</link>
		<dc:creator>Robin Hanson</dc:creator>
		<pubDate>Thu, 21 Feb 2008 12:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/#comment-262</guid>
		<description>&lt;i&gt;There is one constraint per outcome that ensures that the auctioneer never loses money across all outcomes.&lt;/i&gt;

Why not tell readers exactly what that constraint is?</description>
		<content:encoded><![CDATA[<p><i>There is one constraint per outcome that ensures that the auctioneer never loses money across all outcomes.</i></p>
<p>Why not tell readers exactly what that constraint is?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Pennock</title>
		<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/comment-page-1/#comment-260</link>
		<dc:creator>David Pennock</dc:creator>
		<pubDate>Wed, 20 Feb 2008 15:10:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/#comment-260</guid>
		<description>Thanks Chris for the kind words, glad it was useful. Thanks for the correction.</description>
		<content:encoded><![CDATA[<p>Thanks Chris for the kind words, glad it was useful. Thanks for the correction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Hibbert</title>
		<link>http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/comment-page-1/#comment-261</link>
		<dc:creator>Chris Hibbert</dc:creator>
		<pubDate>Wed, 20 Feb 2008 04:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.oddhead.com/2008/02/19/the-right-way-to-implement-a-multi-outcome-prediction-market-linear-programming/#comment-261</guid>
		<description>Good summary article Dave.  I can&#039;t think of anything that needs to be added.  I do feel compelled to correct you on the claim about Zocalo.  I&#039;ve described my approach in reasonable detail, but the code doesn&#039;t exist yet.  I&#039;d really like to implement it, but my clients have had other priorities so far.</description>
		<content:encoded><![CDATA[<p>Good summary article Dave.  I can&#8217;t think of anything that needs to be added.  I do feel compelled to correct you on the claim about Zocalo.  I&#8217;ve described my approach in reasonable detail, but the code doesn&#8217;t exist yet.  I&#8217;d really like to implement it, but my clients have had other priorities so far.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
