How should new securities be designed? Traditional theories have little to say on this: the literature on capital structure and general equilibrium theories with incomplete markets take the securities firms issue as exogenous. This paper explicitly incorporates the transaction costs of issuing securities and develops a model where the instruments that are traded are chosen optimally and the economy’s market structure is endogenous. Among other things, it is shown that the firm’s income stream should be split so that in every state all payoffs are allocated to the security held by the group that values them most.