Generalized Credit Portfolio Model