1
$\begingroup$

So im trying to replicate an code from the Quantative Risk Management Book (https://github.com/qrmtutorial/qrm/blob/master/code/09_Market_Risk/09_Standard_methods_for_market_risk.R). But when i try a rolling window estimation -last 1000 observations- using the 'POT' method in my data ( log loss of "PETR4.SA" , Petrobras ticker in BOVESPA , from 2006 to end of 2020 ), i got an error ( around "2006-01-16/ + 1000 days" ) message telling that the Risk measure is not implemented for negative shape parameter of the GPD. I've read the book (QRM) and other papers about GPD for tail estimation but i could not find any reference to the restriction in the shape must being positive. The code for the VaR and ES estimation are below:

VaR_95 <- u + (beta/shape)(((1-alpha_95)/length(excess) / length(Losses))^(-shape)-1) ES_95 <- (VaR_95 + beta-shapeu) / (1-xi)

$\endgroup$
1
$\begingroup$

it's me again... So i find out what a negative shape parameter in Generalized Pareto Distribuition means and why it's not possible to calculate EVT with it. negative shape parameter means that the distribuition has a limit, not quite what you are looking for when fitting an extreme value theory model.

$\endgroup$
1
  • $\begingroup$ Thank you for getting back to us. This information may be helpful to others in the future. $\endgroup$ – noob2 Mar 7 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.