Functional inequalities, regularity and computation of the deficit and surplus variables in the financial equilibrium problem