Compute the Greeks of a Solar Option index

solarOption_index_greeks(model, moments, elasticities = FALSE)

Note

Version 1.0.0.

Examples

# Model fit
model <- solarModel$new(spec)
model$fit()
#> No outliers!

t_now <- as.Date("2024-01-01")
t_hor <- as.Date("2024-12-31")
dates <- seq.Date(t_now+1, t_hor, 1)
mom <- purrr::map_df(dates, ~model$Moments(t_now, .x))
#> Error in map(.x, .f, ...):  In index: 1.
#> Caused by error in `.f()`:
#> ! attempt to apply non-function
solarOption_index_greeks(model, mom, elasticities = TRUE)
#> Error: object 'mom' not found
mom_test <- mom
#> Error: object 'mom' not found
mom_test$beta <- mom_test$beta*1.01
#> Error: object 'mom_test' not found
solarOption_index_greeks(model, mom_test, elasticities = TRUE)
#> Error: object 'mom_test' not found