The Dancer and the Dance: Agents, Beliefs and Actions in Prediction Markets