In a capital adequacy framework, risk measures are used to determine the minimal amount of capital that a financial institution has to raise and invest in a portfolio of prespecified eligible assets in order to pass a given capital adequacy test. From a capital efficiency perspective, it is important to be able to do so at the lowest possible cost and to identify the corresponding portfolios, or, equivalently, their payoffs. We study the existence and uniqueness of such optimal payoffs as well as their behavior under a perturbation or an approximation of the underlying capital position. This behavior is naturally linked to the continuity properties of the set‐valued map that associates to each capital position the corresponding set of optimal eligible payoffs. Upper continuity can be ensured under fairly natural assumptions. Lower continuity is typically less easy to establish. While it is always satisfied in a polyhedral setting, it generally fails otherwise, even when the reference risk measure is convex. However, lower continuity can often be established for eligible payoffs that are close to being optimal. Besides capital adequacy, our results have a variety of natural applications to pricing, hedging, and capital allocation problems.