compute credit risk