Skip to content

Commit

Permalink
refactoring: removing unnessery interal functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hudde committed Jan 31, 2024
1 parent 40afbcf commit 63902a6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions R/Malliavin_Geometric_Asian_Greeks.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,10 @@ Malliavin_Geometric_Asian_Greeks <- function(
payoff <- function(x, exercise_price) {
return(pmax(0, x - exercise_price))
}
dpayoff <- function(x, exercise_price) {
return((x > exercise_price) + 0)
}
} else if (payoff == "put") {
payoff <- function(x, exercise_price) {
return(pmax(0, exercise_price - x))
}
dpayoff <- function(x, exercise_price) {
return(-(x < exercise_price) + 0)
}
} else if (payoff == "digital_call") {
payoff <- function(x, exercise_price) {ifelse(x >= exercise_price, 1, 0)
}
Expand Down

0 comments on commit 63902a6

Please sign in to comment.