Haar wavelets-based approach for quantifying credit portfolio losses