Description Usage Arguments Value Examples
View source: R/plot_sensivities.R
This function loops over one of the arguments in simulate_strategy
to make explicit the impact of a variable in the desired allocation policy.
1 | plot_sensivities(strategy, variable, from, to, size, ...)
|
strategy |
An object of the |
variable |
A |
from |
An |
to |
An |
size |
A |
... |
Currently not used. |
A ggplot2
object.
1 2 3 4 5 6 7 8 9 10 11 | # stress-test the `max_utility` strategy by changing the `allocation` parameter
x <- simulate_strategy()
plot_sensivities(strategy = x, variable = "allocation", from = 0.0, to = 1, size = 20)
# stress-test the `cppi` strategy by changing the `floor` parameter
y <- simulate_strategy(strategy = "cppi")
plot_sensivities(strategy = y, variable = "floor", from = 7000, to = 9000, size = 20)
# stress-test on the `obpi` strategy by changing the risk-free rate
y <- simulate_strategy(strategy = "obpi")
plot_sensivities(strategy = y, variable = "rf", from = 0, to = 0.2, size = 20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.