Optimization of the capital structure