Python pairs trading with MongoDB