We compute the MLE for the \(\gamma\) and \(\sigma\) parameters of the truncated GPD.
For numerical reasons, we compute the MLE for \(\tau=\gamma/\sigma\) and transform this estimate to \(\sigma\).
The log-likelihood is given by
$$(k-1) \ln \tau - (k-1) \ln \xi- ( 1 + 1/\xi)\sum_{j=2}^k \ln (1+\tau E_{j,k}) -(k-1) \ln( 1- (1+ \tau E_{1,k})^{-1/\xi})$$
with \(E_{j,k} = X_{n-j+1,n}-X_{n-k,n}\).
In order to meet the restrictions \(\sigma=\xi/\tau>0\) and \(1+\tau E_{j,k}>0\) for \(j=1,\ldots,k\), we require the estimates of these quantities to be larger than the numerical tolerance value eps
.
See Beirlant et al. (2017) for more details.