Substantial academic research has explained why firms should hedge, but little work has addressed how firms should hedge. We assume that firms face costly states of nature and derive optimal hedging strategies using vanilla derivatives (e.g., forwards and options) and custom "exotic" derivative contracts for a value-maximizing firm that faces both hedgable (price) and unhedgable (quantity) risks. Optimal hedges depend critically on price and quantity volatilities, the correlation between price and quantity, and profit margin. A close relationship exists between the optimal number of forward contracts and the optimal custom hedge: At the forward price of the traded good, the optimal forward hedge and the optimal exotic hedge have identical "deltas". At prices different from the forward price, the exotic contract fine-tunes the firm's exposure by including a non-linear payoff component. We also determine the benefits from choosing customized exotic derivatives over vanilla contracts for different types of firms. Customized exotic derivatives are typically better than vanilla contracts when correlations between prices and quantities are large in magnitude and when quantity risks are substantially greater than price risks.