Text this: Haircut Capital Allocation as the Solution of a Quadratic Optimisation Problem.