scenario_density {ffp}R Documentation

Plot Scenarios

Description

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.

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).

Value

A ggplot2 object.

Examples

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

scenario_density(x, p, 500)

scenario_histogram(x, p, 500)

[Package ffp version 0.2.2 Index]