Description Usage Arguments Value
View source: R/compute_option_scenarios.R
Compute option price scenarios at a given point in time
1 2 3 4 5 6 7 8 9 10 11 | compute_option_scenarios(
option_leg,
scenario_datetime,
underlyer_prices,
underlyer_min,
underlyer_max,
underlyer_margin = 20,
vol_min = 0.7,
vol_max = 1.3,
n_scenarios = 20
)
|
option_leg |
Option Leg object |
scenario_datetime |
Datetime at which to compute option price scenarios |
underlyer_prices |
Vector of underlyer closing prices, matching the option leg prices |
underlyer_min |
Minimum underlyer price |
underlyer_max |
Maximum underlyer price |
underlyer_margin |
Integer specifying padding at margins of PnL graph |
vol_min |
Lower bound of volatility scenarios as a fraction of current volatility |
vol_max |
Upper bound of volatility scenarios as a fraction of current volatility |
n_scenarios |
Number of scenarios to compute for underlyer volatility |
Matrix of option prices for different underlyer prices and volatility
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.