Statistical and computational methods for credit portfolio loss and financial state-space models