Compute average premium on simulated Data
solarOption_scenario(
model,
scenario,
nmonths = 1:12,
put = TRUE,
nsim,
control_options = control_solarOption()
)An object with the class solarModel. See the function solarModel for details.
object with the class solarModelScenario. See the function solarModel_scenarios for details.
Numeric vector, months in which the payoff should be computed. Can vary from 1 (January) to 12 (December).
Logical, when TRUE, the default, will be computed the price for a put contract, otherwise for a call contract.
number of simulation to use for computation.
control function, see control_solarOption for details.
An object of the class solarOptionPayoff.
Version 1.0.2
# Solar model
model <- solarModel$new(spec)
model$fit()
#> No outliers!
# Simulate scenarios
scenario <- solarScenario_by(model, from = "2011-01-01", to = "2012-01-01", by = "1 month", nsim = 10, seed = 3)
#>
|
| | 0%
|
|#### | 8%
|
| | 0%
|
|######## | 17%
|
| | 0%
|
|############ | 25%
|
| | 0%
|
|################# | 33%
|
| | 0%
|
|##################### | 42%
|
| | 0%
|
|######################### | 50%
|
| | 0%
|
|############################# | 58%
|
| | 0%
|
|################################# | 67%
|
| | 0%
|
|###################################### | 75%
|
| | 0%
|
|########################################## | 83%
|
| | 0%
|
|############################################## | 92%
|
| | 0%
|
|##################################################| 100%
solarOption_scenario(model, scenario)
#> ------------------------ Solar Option Payoffs (put) ------------------------
#> Yearly payoff: 8.0793
#> Monthly payoffs:
#> Jan: 7.76 Feb: 0.315 Mar: NA
#> Apr: NA May: NA Jun: NA
#> Jul: NA Ago: NA Sep: NA
#> Oct: NA Nov: NA Dec: NA
solarOption_historical(model)
#> ------------------------ Solar Option Payoffs (put) ------------------------
#> Yearly payoff: 183.73
#> Monthly payoffs:
#> Jan: 7.40 Feb: 11.0 Mar: 15.5
#> Apr: 21.8 May: 30.7 Jun: 22.9
#> Jul: 13.6 Ago: 13.2 Sep: 14.6
#> Oct: 15.0 Nov: 11.4 Dec: 6.63
solarScenario_plot(scenario)