Skip to content

Commit

Permalink
selection of the faster function BS_Malliavin_Asian_Greeks in more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
hudde committed Aug 31, 2023
1 parent c1d87b2 commit c22c893
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/Greeks.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ Greeks <-
}

else if (tolower(option_type) == "asian" && tolower(model) == "black_scholes" &&
unique(greek)[1] == "fair_value" && unique(greek)[2] == "delta" &&
unique(greek)[3] == "rho" && length(greek) == 3) {
("fair_value" %in% greek || "delta" %in% greek || "rho" %in% greek)) {
return(BS_Malliavin_Asian_Greeks(payoff = payoff,
greek = greek,
initial_price = initial_price,
Expand Down

0 comments on commit c22c893

Please sign in to comment.