# GEV: Generalized Extreme Value Distribution In QRM: Provides R-Language Code to Examine Quantitative Risk Management Concepts

## Description

Density, quantiles, cumulative probability, and fitting of the Generalized Extreme Value distribution.

## Usage

 ```1 2 3 4 5``` ```pGEV(q, xi, mu = 0, sigma = 1) qGEV(p, xi, mu = 0, sigma = 1) dGEV(x, xi, mu = 0, sigma = 1, log = FALSE) rGEV(n, xi, mu = 0, sigma = 1) fit.GEV(maxima, ...) ```

## Arguments

 `log` `logical`, whether log values of density should be returned, default is `FALSE`. `maxima` `vector`, block maxima data `mu` `numeric`, location parameter. `n` `integer`, count of random variates. `p` `vector`, probabilities. `q` `vector`, quantiles. `sigma` `numeric`, scale parameter. `x` `vector`, values to evaluate density. `xi` `numeric`, shape parameter. `...` ellipsis, arguments are passed down to `optim()`.

## Value

numeric, probability (pGEV), quantile (qGEV), density (dGEV) or random variates (rGEV) for the GEV distribution with shape parameter xi, location parameter mu and scale parameter sigma. A list object in case of `fit.GEV()`.

`GPD`

## Examples

 ```1 2 3 4 5 6 7 8 9``` ```quantValue <- 4.5 pGEV(q = quantValue, xi = 0, mu = 1.0, sigma = 2.5) pGumbel(q = quantValue, mu = 1.0, sigma = 2.5) ## Fitting to monthly block-maxima data(nasdaq) l <- -returns(nasdaq) em <- timeLastDayInMonth(time(l)) monmax <- aggregate(l, by = em, FUN = max) mod1 <- fit.GEV(monmax) ```

### Example output

```Loading required package: gsl
Loading required package: Matrix
Loading required package: mvtnorm
Loading required package: numDeriv
Loading required package: timeSeries
Loading required package: timeDate

Attaching package: 'QRM'

The following object is masked from 'package:base':

lbeta

 0.7814556
```

QRM documentation built on April 14, 2020, 6:49 p.m.