View source: R/scenario_density.R
scenario_density | R Documentation |
This functions are designed to make it easier to visualize the impact of a View in the P&L distribution.
scenario_density(x, p, n = 10000) scenario_histogram(x, p, n = 10000)
x |
An univariate marginal distribution. |
p |
A probability from the |
n |
An |
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
).
A ggplot2
object.
x <- diff(log(EuStockMarkets))[, 1] p <- exp_decay(x, 0.005) scenario_density(x, p, 500) scenario_histogram(x, p, 500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.