Predicting financial crashes using discrete scale invariance