Financial fragility and credit risk: A simulation model