plot_panic_distribution: Visualize a Panic Distribution

View source: R/plot_panic_distribution.R

plot_panic_distributionR Documentation

Visualize a Panic Distribution

Description

Visual display of a panic distribution.

Usage

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)

Reckziegel/CMA documentation built on July 13, 2022, 10:31 p.m.