This article shows how to construct an optimal capital structure for a private firm. Since the agents who supply the firm’s capital are risk averse, they diversify by holding both debt and equity. This can mitigate, or even eliminate, the classical risk shifting problem. There is a wealth effect since the optimal capital structure, which can involve multiple types of debt, depends on the amount of wealth that each agent contributes to the firm. However, it is shown that the agents’ equity holdings do not depend on the contributed amounts of wealth. Thus the model can produce a wedge between ownership rights and equity cashflow rights. These features are illustrated in a firm with three agents.