[R-SIG-Finance] Conflicting "spd" function estimates

alexios ghalanos alexios at 4dscape.com
Wed Oct 29 20:48:17 CET 2014


On 29/10/2014 17:30, Gareth McEwan wrote:
> Hi there
>
> I have searched high and low, but haven't found how to combine a parametric
> GPD fitting of upper and lower tails to a non-parametric Gaussian kernel
> interior. So I need to go with the "spd" function, but I have quite
> conflicting results using this function.

I can't honestly believe that you've searched "high and low". The point 
of using open source software is that the code is readily available. Did 
you look in the spd package to see how the estimation and related 
functions work?

>
> spd.fit.ALBI=spdfit(sorted.ALBI.std.resids, upper=0.9, lower=0.1,
> tailfit="GPD", type="mle", kernelfit="normal", information="observed")
> show(spd.fit.ALBI)
> Output:
> # Upper Tail: Threshold = 1.22226
> The above tail threshold is different to 1.218522 using the quantile
> function on the same data at the same 90% cutoff point.
> # Estimated Parameters
> #     xi           beta
> #   -0.18608   0.48698
> These estimates are different to -0.1996078 and 0.4973661, respectively
> (using "evir", "ismev" and "fExtremes" packages), but far more so than the
> estimates below..
>
> # Lower Tail: Threshold = -1.22126 (compared to -1.213646 using quantile
> function on negative of the sorted.ALBI.std.resids, at the equivalent of a
> 10% cutoff point)
> # Estimated Parameters
> #     xi           beta
> #    0.06574   0.76526
> These estimates are quite different to the 0.1051834 and  0.7098641,
> respectively, using the abovementioned packages.
>
> I am aware that there are only a few data points used in the fitting, so
> would this sort of discrepancy be acceptable?
>
> I am not sure how the "spdfit" function selects the upper and lower tail
> thresholds (versus the quantile function I am using from literature), but I
> think the manner in which the thresholds are selected is what contributes
> to the conflicting estimates. Is there a way I can improve my technique at
> all? I would prefer to combine the upper tail, interior and lower tail
> manually, but I would need help putting it together. The next best option
> is the "spd" function, but I'd like to know if the evident discrepancies
> would be acceptable?

If you read the documentation on "quantile", you'll likely see 9 
different methods for calculating this. Whether the small discrepancy 
you detected on a small dataset is acceptable is up to you to decide. 
The spd package has a simulation function, as does the gdp distribution 
from the fExtremes package so you can do your own simulations and decide 
whether this is within acceptable tolerance.

>
> Many thanks
> Gareth
>

Regards,

Alexios



More information about the R-SIG-Finance mailing list