From 970ae630d958f3975bbb2bdb19306f00fddc2538 Mon Sep 17 00:00:00 2001 From: hudde Date: Thu, 31 Aug 2023 12:34:08 +0200 Subject: [PATCH] bugfix --- DESCRIPTION | 2 +- R/Greeks_UI.R | 8 +++++++- man/Greeks.Rd | 5 ++--- man/Implied_Volatility.Rd | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 476022b..fdd78e9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: greeks Title: Sensitivities of Prices of Financial Options and Implied Volatilites -Version: 1.2.0 +Version: 1.2.1 Authors@R: person(given = "Anselm", family = "Hudde", diff --git a/R/Greeks_UI.R b/R/Greeks_UI.R index 8a4c0bc..2d8c5bc 100644 --- a/R/Greeks_UI.R +++ b/R/Greeks_UI.R @@ -409,7 +409,13 @@ Greeks_UI <- function() { unlist() %>% unname() - x_bounds <- input[[eval(paste(params_list[[input$x_axis]], "_2", sep = ""))]] + if (input$option_type == "Asian") { + x_bounds <- + input[[eval(paste(params_list[[input$x_axis_asian]], "_2", sep = ""))]] + } else { + x_bounds <- + input[[eval(paste(params_list[[input$x_axis]], "_2", sep = ""))]] + } x_from <- x_bounds[1] x_to <- x_bounds[2] diff --git a/man/Greeks.Rd b/man/Greeks.Rd index ce7c01f..fa5e43f 100644 --- a/man/Greeks.Rd +++ b/man/Greeks.Rd @@ -47,9 +47,8 @@ Greeks( \item the model to be chosen }} -\item{option_type}{in c("European", "American", "Asian", "Digital", -"Binomial) - the -type of option to be considered} +\item{option_type}{in c("European", "American", "Asian", "Geometric Asian", +"Digital", "Binomial) - the type of option to be considered} \item{payoff}{\itemize{ \item in c("call", "put", "cash_or_nothing_call", diff --git a/man/Implied_Volatility.Rd b/man/Implied_Volatility.Rd index c08945f..840373c 100644 --- a/man/Implied_Volatility.Rd +++ b/man/Implied_Volatility.Rd @@ -49,7 +49,7 @@ Implied_Volatility( }} \item{option_type}{in c("European", "American", "Asian", "Digital") - the -type of option to be considered} +type of option to be considered TODO: Is this complete?} \item{payoff}{\itemize{ \item in c("call", "put")