Let the demand for the contract from A and B be a and b respectively. Negative values of a or b correspond to a desire to sell the contract short. Expected log wealth for A will is
This has derivative with respect to a of
Setting the derivative to 0 and solving for a we find
Setting a+b=0 and solving for r we obtain
(p-r)*X/(r*(1-r)) + (q-r)*Y/(r*(1-r)) = 0
(p-r)*X + (q-r)*Y = 0
So the market clearing price is just the weighted average of the opinions of A and B as to the correct price.
If you have any problems you think we might enjoy, please send them in. All replies should be sent to: firstname.lastname@example.org