A general estimator for the extreme value index: applications to conditional and heteroscedastic extremes