I'm trying to build my own prediction market, and I'm thinking about algorithms. That is to say, how to adjust the price of a contract based on the amount of call and put orders. The basic algorithm I am using now is of two kinds:
For yes/no events (i.e., either the events happens or doesn't) I am just taking the percentage of people who say it will happen, and make that the contract price. If 90% say it will happen, the price in $90 (fake money). The contracts cash out at $100 if the event occurs, $0 is it doesn't.
For events that have a certain value (let's say a athlete's "power rating"), I set an IPO (my guess as to where the thing will cash out) and the apply a percentage increase to the IPO. So if there are 80% more calls than puts then I add 80% to the IPO. I add a little stabilizer so that the early orders don't cause huge jumps (i.e, the first order doubling the price).
Bear in mind this isn't a real market, the players don't trade contracts, they just make call or put orders against the system.
The first thought I had was that I should weigh the more recent calls and puts as they have nore relevant information presumably (like say the athlete just broke his foot). These guys would know more than the guy who bought a contract three months ago.
Any other ideas?