# PCTAlaplace: Poiraud-Casanova-Thomas-Agnan Laplace distribution In VaRES: Computes value at risk and expected shortfall for over 100 parametric distributions

## Description

Computes the pdf, cdf, value at risk and expected shortfall for the Poiraud-Casanova-Thomas-Agnan Laplace distribution due to Poiraud-Casanova and Thomas-Agnan (2000) given by

\begin{array}{ll} &\displaystyle f (x) = ≤ft\{ \begin{array}{ll} \displaystyle a ≤ft( 1 - a \right) \exp ≤ft\{ ≤ft( 1 - a \right) ≤ft( x - θ \right) \right\}, & \mbox{if $x ≤q θ$,} \\ \\ \displaystyle a ≤ft( 1 - a \right) \exp ≤ft\{ a ≤ft( θ - x \right) \right\}, & \mbox{if $x > θ$,} \end{array} \right. \\ &\displaystyle F (x) = ≤ft\{ \begin{array}{ll} \displaystyle a \exp ≤ft\{ ≤ft( 1 - a \right) ≤ft( x - θ \right) \right\}, & \mbox{if $x ≤q θ$,} \\ \\ \displaystyle 1 - ≤ft( 1 - a \right) \exp ≤ft\{ a ≤ft( θ - x \right) \right\}, & \mbox{if $x > θ$,} \end{array} \right. \\ &\displaystyle {\rm VaR}_p (X) = ≤ft\{ \begin{array}{ll} \displaystyle θ + \frac {1}{1 - a} \log ≤ft( \frac {p}{a} \right), & \mbox{if $p ≤q a$,} \\ \\ \displaystyle θ - \frac {1}{a} \log ≤ft( \frac {1 - p}{1 - a} \right), & \mbox{if $p > a$,} \end{array} \right. \\ &\displaystyle {\rm ES}_p (X) = ≤ft\{ \begin{array}{ll} \displaystyle θ - \frac {\log a}{1 - a} + \frac {\log p - 1}{(1 - a) p}, & \mbox{if $p ≤q a$,} \\ \\ \displaystyle θ - \frac {1}{a} + \frac {1}{p} - \frac {a}{(1 - a) p} + \frac {1 - p}{a p} \log ≤ft( \frac {1 - p}{1 - a} \right), & \mbox{if $p > a$} \end{array} \right. \end{array}

for -∞ < x < ∞, 0 < p < 1, -∞ < θ < ∞, the location parameter, and a > 0, the scale parameter.

## Usage

 1 2 3 4 dPCTAlaplace(x, a=0.5, theta=0, log=FALSE) pPCTAlaplace(x, a=0.5, theta=0, log.p=FALSE, lower.tail=TRUE) varPCTAlaplace(p, a=0.5, theta=0, log.p=FALSE, lower.tail=TRUE) esPCTAlaplace(p, a=0.5, theta=0) 

## Arguments

 x scaler or vector of values at which the pdf or cdf needs to be computed p scaler or vector of values at which the value at risk or expected shortfall needs to be computed theta the value of the location parameter, can take any real value, the default is zero a the value of the scale parameter, must be in the unit interval, the default is 0.5 log if TRUE then log(pdf) are returned log.p if TRUE then log(cdf) are returned and quantiles are computed for exp(p) lower.tail if FALSE then 1-cdf are returned and quantiles are computed for 1-p

## Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the values at risk or expected shortfall computed at p.

## Author(s)

 1 2 3 4 5 x=runif(10,min=0,max=1) dPCTAlaplace(x) pPCTAlaplace(x) varPCTAlaplace(x) esPCTAlaplace(x)