This article develops a unifying framework for allocating the aggregate capital of a financial firm to its business units. The approach relies on an optimization argument, requiring that the weighted sum of measures for the deviations of the business unit's losses from their respective allocated capitals be minimized. The approach is fair insofar as it requires capital to be close to the risk that necessitates holding it. The approach is additionally very flexible in the sense that different forms of the objective function can reflect alternative definitions of corporate risk tolerance. Owing to this flexibility, the general framework reproduces several capital allocation methods that appear in the literature and allows for alternative inte...