Consider the collection of all derivative contracts written on an asset that deliver the same payoff distribution as a direct investment of $1 in the asset. We refer to the cheapest such derivative as the optimal measure preserving derivative. Using the Hardy-Littlewood rearrangement inequality, we obtain an explicit solution for the optimal measure preserving derivative in terms of the payoff distribution and pricing kernel of the underlying asset. The optimal measure preserving derivative corresponds to a direct investment of $1 in the underlying asset if and only if the pricing kernel is monotone decreasing. We obtain conditions under which an estimated optimal measure preserving derivative formed from estimates of the underlying payoff distribution and pricing kernel will be consistent in a particular sense. Building on an existing empirical study, we estimate the optimal measure preserving derivative for the S&P 500 index in October 1986 and April 1992, using a 31-day time horizon. We find that the precrash optimal derivative roughly coincides with a direct investment in the index, while the postcrash optimal derivative does not. The estimated price of the postcrash optimal derivative corresponds to nearly half a percentage point increase in monthly returns compared to a direct investment in the index.