We characterize cost function market makers designed to elicit traders’ beliefs about the expectations of an infinite set of random variables or the full distribution of a continuous random variable. This characterization is derived from a duality perspective that associates the market maker’s liabilities with market beliefs, generalizing the framework of Abernethy et al. [2011, 2013], but relies on a new subdifferential analysis. It differs from prior approaches in that it allows arbitrary market beliefs, not just those that admit density functions. This allows us to overcome the impossibility results of Gao and Chen  and design the first automated market maker for betting on the realization of a continuous random variable taking values in [0,1] that has bounded loss without resorting to discretization. Additionally, we show that scoring rules are derived from the same duality and share a close connection with cost functions for eliciting beliefs.