From 63902a6b0bb9b344e08cb34e01eb534eb16ff870 Mon Sep 17 00:00:00 2001 From: hudde Date: Wed, 31 Jan 2024 12:56:14 +0100 Subject: [PATCH] refactoring: removing unnessery interal functions --- R/Malliavin_Geometric_Asian_Greeks.R | 6 ------ 1 file changed, 6 deletions(-) diff --git a/R/Malliavin_Geometric_Asian_Greeks.R b/R/Malliavin_Geometric_Asian_Greeks.R index fbb7dce..15caaa2 100644 --- a/R/Malliavin_Geometric_Asian_Greeks.R +++ b/R/Malliavin_Geometric_Asian_Greeks.R @@ -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) }