A model to analyse financial fragility