Skip to contents

This functions are designed to make it easier to visualize the impact of a View in the P&L distribution.

Usage

scenario_density(x, p, n = 10000)

scenario_histogram(x, p, n = 10000)

Arguments

x

An univariate marginal distribution.

p

A probability from the ffp class.

n

An integer scalar with the number of scenarios to be generated.

Value

A ggplot2 object.

Details

To generate a scenario-distribution the margins are bootstrapped using bootstrap_scenarios. The number of resamples can be controlled with the n argument (default is n = 10000).

Examples

x <- diff(log(EuStockMarkets))[, 1]
p <- exp_decay(x, 0.005)

scenario_density(x, p, 500)


scenario_histogram(x, p, 500)