Simulate multiple scenarios of solar radiation with a solarModel object.

solarScenario_by(
  model,
  from = "2010-01-01",
  to = "2011-01-01",
  by = "1 year",
  theta = 0,
  nsim = 1,
  seed = 1,
  quiet = FALSE
)

Arguments

model

object with the class solarModel. See the function solarModel for details.

from

character, start Date for simulations in the format YYYY-MM-DD.

to

character, end Date for simulations in the format YYYY-MM-DD.

by

character, steps for multiple scenarios, e.g. 1 day (day-ahead simulations), 15 days, 1 month, 3 months, ecc. For each step are simulated nsim scenarios.

theta

numeric, shift parameter for the mixture.

nsim

integer, number of simulations.

seed

scalar integer, starting random seed.

quiet

logical

Note

Version 1.0.1

Examples

# Solar Model
model <- solarModel$new(spec)
model$fit()
#> No outliers!
scenario <- solarScenario_by(model, "2005-01-10", "2020-01-01", theta = 0, nsim = 4, by = "1 year")
#> 
  |                                                        
  |                                                  |   0%
  |                                                        
  |####                                              |   7%
  |                                                        
  |                                                  |   0%
  |                                                        
  |#######                                           |  14%
  |                                                        
  |                                                  |   0%
  |                                                        
  |###########                                       |  21%
  |                                                        
  |                                                  |   0%
  |                                                        
  |##############                                    |  29%
  |                                                        
  |                                                  |   0%
  |                                                        
  |##################                                |  36%
  |                                                        
  |                                                  |   0%
  |                                                        
  |#####################                             |  43%
  |                                                        
  |                                                  |   0%
  |                                                        
  |#########################                         |  50%
  |                                                        
  |                                                  |   0%
  |                                                        
  |#############################                     |  57%
  |                                                        
  |                                                  |   0%
  |                                                        
  |################################                  |  64%
  |                                                        
  |                                                  |   0%
  |                                                        
  |####################################              |  71%
  |                                                        
  |                                                  |   0%
  |                                                        
  |#######################################           |  79%
  |                                                        
  |                                                  |   0%
  |                                                        
  |###########################################       |  86%
  |                                                        
  |                                                  |   0%
  |                                                        
  |##############################################    |  93%
  |                                                        
  |                                                  |   0%
  |                                                        
  |##################################################| 100%
# Plot
solarScenario_plot(scenario, nsim = 2)

# Solar Option
solarOption_scenario(model, scenario)
#> ------------------------ Solar Option Payoffs (put) ------------------------ 
#> Yearly payoff: 179.75
#> Monthly payoffs: 
#>   Jan: 3.90   Feb: 10.5   Mar: 13.9
#>   Apr: 21.3   May: 31.4   Jun: 24.9
#>   Jul: 14.0   Ago: 13.7   Sep: 14.7
#>   Oct: 14.3   Nov: 10.6   Dec: 6.38
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