Compute the price of a solarOption

solarOption_pricing(
  moments,
  sorad,
  lambda = 0,
  put = TRUE,
  link = "invgumbel",
  control_options = control_solarOption()
)

Arguments

moments

Tibble containing the forecasted moments for different days ahead. See the function solarMoments for more details.

sorad

An object of the class solarOption.

lambda

Numeric, Sugeno parameter.

put

Logical, when TRUE, the default, will be computed the price for a put contract, otherwise for a call contract.

control_options

Named list with control parameters. See control_solarOption for more details.

Note

Version 1.0.0.

Examples

# Model
model = solarModel$new(spec)
model$fit()
#> No outliers!
moments <- filter(model$moments$conditional, Year == 2022)
# Pricing without contracts
solarOption_pricing(moments[1,])
#> # A tibble: 1 × 9
#>   date        Year Month   Day side  premium exercise strike max_payoff
#>   <date>     <dbl> <dbl> <int> <chr>   <dbl>    <dbl>  <dbl>      <dbl>
#> 1 2022-01-01  2022     1     1 put     0.140    0.334   1.20       1.03
# Pricing with contracts specification
sorad <- solarOption$new()
sorad$set_contract("2021-12-31", "2022-01-01", "2022-04-20", moments$GHI_bar[1])
solarOption_pricing(moments[1,], sorad)
#> # A tibble: 1 × 9
#>   date        Year Month   Day side  premium exercise strike max_payoff
#>   <date>     <dbl> <dbl> <int> <chr>   <dbl>    <dbl>  <dbl>      <dbl>
#> 1 2022-04-20  2022     4    20 put     0.140    0.334   1.20       1.03
solarOption_pricing(moments[1,], sorad, lambda = 0.02)
#> # A tibble: 1 × 9
#>   date        Year Month   Day side  premium exercise strike max_payoff
#>   <date>     <dbl> <dbl> <int> <chr>   <dbl>    <dbl>  <dbl>      <dbl>
#> 1 2022-04-20  2022     4    20 put     0.138    0.329   1.20       1.03
solarOption_pricing(moments[1,], sorad, lambda = -0.02)
#> # A tibble: 1 × 9
#>   date        Year Month   Day side  premium exercise strike max_payoff
#>   <date>     <dbl> <dbl> <int> <chr>   <dbl>    <dbl>  <dbl>      <dbl>
#> 1 2022-04-20  2022     4    20 put     0.142    0.338   1.20       1.03