This is hacked-together code (I'm not a Python pro) and I didn't really intend for anyone to go through it. I'm just providing it here for the sake of transparency in case anyone wants to check that I'm not gimmicking the results. If you do want to play with the module, it lets you do some cool what-if stuff (see below) intradeurls.txt contains the URLs to the relevant contracts getval.pl gets the current price for a state states.py contains the stuff that uses the probabilities (Note: If intrade changes its URLs, you can use scour.pl to hunt them down.) To use it, open python and import the states.py file. For starters, pull the current probabilities from intrade at least once: >>> probs=states.intradelist(states.statenames) The function montehyp, the main simulation function, takes (number_of_runs, probs, [Obama states], [McCain states]) Normal sim, no constraints: >>> states.montehyp(5000, probs, [], []) You can also run the simulation, say, assuming that Obama wins VA and McCain wins a bunch of other states: >>> states.montehyp(5000, probs, ['VA'], ['NC', 'FL', 'OH', 'CO']) And it will give you the odds given the remaining possible state combinations.