Visual display of a panic distribution.

plot_panic_distribution(pnl, p = NULL, breaks = 200)

Arguments

pnl

An univariate time series with the PnL marginal distribution.

p

A double vector of probabilities. If NULL, `p` is automatically set to 1 over n.

breaks

An integer with the number of break point to be used to plot the marginal panic distribution.

Value

A ggplot2 object.

Examples

x <- diff(log(EuStockMarkets))
x <- panic_copula(x = x, n = 10000, panic_prob = 0.02)
w <- rep(0.25, 4)
pnl <- as.matrix(x$simulation) %*% w
plot_panic_distribution(pnl = pnl, p = x$p)