Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hudde committed Mar 20, 2024
1 parent 27df208 commit 4cddf63
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/Malliavin_Geometric_Asian_Greeks.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,13 @@ Malliavin_Geometric_Asian_Greeks <- function(

if ("delta" %in% greek) {
result[i, "delta"] <-
2*exp(-(r-dividend_yield)*time_to_maturity)/(initial_price*volatility*time_to_maturity) *
mean(payoff(I_0_geom, exercise_price) * W_T)
(2/(initial_price*volatility*time_to_maturity)) * E_I_0_geom(W_T)
} #delta

if ("rho" %in% greek) {
result[i, "rho"] <-
(W_T/volatility - time_to_maturity) %>%
E()
E_I_0_geom()
} #rho

if ("theta" %in% greek) {
Expand Down

0 comments on commit 4cddf63

Please sign in to comment.