% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Greeks.R
\name{Greeks}
\alias{Greeks}
\title{Computes the Greeks of various options in the Black Scholes model or
both in the Black Scholes model or a Jump Diffusion model in the case of Asian
Options, or in the Binomial options pricing model}
\usage{
Greeks(
  initial_price,
  exercise_price,
  r,
  time_to_maturity,
  volatility,
  dividend_yield = 0,
  model = "Black_Scholes",
  option_type = "European",
  payoff = "call",
  greek = c("fair_value", "delta", "vega", "theta", "rho", "gamma"),
  antithetic = TRUE,
  ...
)
}
\arguments{
\item{initial_price}{\itemize{
\item initial price of the underlying asset
}}

\item{exercise_price}{\itemize{
\item strike price of the option
}}

\item{r}{\itemize{
\item risk-free interest rate
}}

\item{time_to_maturity}{\itemize{
\item time to maturity in years
}}

\item{volatility}{\itemize{
\item volatility of the underlying asset
}}

\item{dividend_yield}{\itemize{
\item dividend yield
}}

\item{model}{\itemize{
\item the model to be chosen in ("black_scholes", "jump_diffusion")
}}

\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",
"cash_or_nothing_put", "asset_or_nothing_call", "asset_or_nothing_put")
}}

\item{greek}{\itemize{
\item Greeks to be calculated in c("fair_value", "delta", "vega",
"theta", "rho", "epsilon", "lambda", "gamma", "vanna", "charm", "vomma",
"veta", "vera", "speed", "zomma", "color", "ultima")
}}

\item{antithetic}{\itemize{
\item if TRUE, antithetic random numbers will be chosen to
decrease variance
}}

\item{...}{\itemize{
\item ...    Other arguments passed on to methods
}}
}
\value{
Named vector containing the values of the Greeks specified in the
parameter \code{greek}.
}
\description{
Greeks are derivatives of the option value with respect to
underlying parameters.
For instance, the Greek
\eqn{\Delta = \frac{\partial \text{fair\_value}}{\partial \text{initial\_price}}}
(Delta) measures how the price of an option changes with a minor change in
the underlying asset's price, while
\eqn{\Gamma = \frac{\partial \text{fair\_value}}{\partial \text{initial\_price}}}
(Gamma) measures how \eqn{\Delta} itself changes as the price of the
underlying asset shifts.
Greeks can be computed for different types of options:
For
\itemize{
\item \strong{European Greeks} see also \link{BS_European_Greeks} and \link{Malliavin_European_Greeks}
\item \strong{American Greeks} see also \link{Binomial_American_Greeks}
\item \strong{Asian Greeks} see also \link{BS_Malliavin_Asian_Greeks} and \link{Malliavin_Asian_Greeks}
\item \strong{Geometric Asian Greeks} see also \link{BS_Geometric_Asian_Greeks} and \link{Malliavin_Asian_Greeks}
}

The Greeks are defined as the following partial derivatives of the option
value:
\itemize{
\item \code{Delta} = \eqn{\Delta = \frac{\partial \text{fair\_value}}{\partial \text{initial\_price}}}, the derivative with respect to the price of the
underlying asset
\item \code{Vega} = \eqn{\mathcal{V} = \frac{\partial \text{fair\_value}}{\partial \text{volatility}}},
the derivative with respect to the volatility
\item \code{Theta} = \eqn{\Theta = -\frac{\partial \text{fair\_value}}{\partial \text{time\_to\_maturity}}},
the negative derivative with respect to the time until expiration of the
option
\item \code{rho} = \eqn{\rho = \frac{\partial \text{fair\_value}}{\partial r}},
the derivative with respect to the risk-free interest rate
\item \code{Epsilon} = \eqn{\epsilon = \frac{\partial \text{fair\_value}}{\partial \text{time\_to\_maturity}}},
the derivative with respect to the dividend yield of the underlying asset
\item \code{Lambda} = \eqn{\lambda = \Delta \times \frac{\text{initial\_price}}{\text{exercise\_price}}}
\item \code{Gamma} = \eqn{\Gamma = \frac{\partial^2 \text{fair\_value}}{\partial \text{initial\_price}^2}}, the second derivative with respect to the price of
the underlying asset
\item \code{Vanna} = \eqn{\frac{\partial \Delta}{\partial \text{volatility}} = \frac{\partial^2 \text{fair\_value}}{\partial \text{intial\_price} \, \partial \text{volatility}}}, the derivative of \eqn{\Delta} with respect to the volatility
\item \code{Vomma} = \eqn{\frac{\partial^2 \text{fair\_value}}{\partial \text{volatility}^2}}, the second derivative with respect to the volatility
\item \code{Veta} = \eqn{
\frac{\partial \mathcal V}{\partial r}
= \frac{\partial^2 \text{fair\_value}}{\partial \text{volatility} \, \partial \text{time\_to\_maturity}}},
the derivative of \eqn{\mathcal V} with respect to the time until expiration
of the option
\item \code{Vera} = \eqn{\frac{\partial^2 \text{fair\_value}}{\partial \text{volatiliy} \, \partial \text{r}}},
the derivative of \eqn{\mathcal V} with respect to the risk-free interest rate
\item \code{Speed} = \eqn{\frac{\partial \Gamma}{\partial \text{initial\_price}} = \frac{\partial^3 \text{fair\_value}}{\partial \text{initial\_price}^3}},
the third derivative of the option value with respect to the price of the
underlying asset
\item \code{Zomma} = \eqn{\frac{\Gamma}{\text{volatility}} = \frac{\partial^3 \text{fair\_value}}{\partial \text{volatility}^3}},
the derivative of Gamma with respect to the volatility
\item \code{Color} = \eqn{\frac{\partial \Gamma}{\partial \text{r}} = \frac{\partial^3 \text{fair\_value}}{\partial \text{initial\_price}^2 \partial \text{r}}},
the derivative of Gamma with respect to the risk-free interest rate
\item \code{Ultima} = \eqn{\frac{\partial \text{Vomma}}{\partial \text{volatility}} = \frac{\partial^3 \text{fair\_value}}{\partial \text{volatility}^3}},
the third derivative with respect to the volatility
}

\link{Greeks} computes Greeks for the following option types:
\itemize{
\item \strong{European put- and call options}, which give to option holder the right
but not the obligation to sell (resp. buy) the underlying asset for a
specific price at a specific date.
If $K$ is the exercise price, and \eqn{S_T} the value of the underlying asset
at time-to-maturity \eqn{T}, a European options pay off the following amount
at expiration:
\itemize{
\item \eqn{\max\{K - S_T, 0\}} for a \strong{put-option}
\item \eqn{\max\{S_T - K, 0\}} for a \strong{call-option}
}
\item \strong{American put- and call options} are like European options, but allow
the holder to exercise at any time until expiration
\item \strong{European cash-or-nothing put- and call options} provide the holder with
a fixed amount of cash, if the value of the underlying asset is below (resp.
above) a certain strike price
\item \strong{European asset-or-nothing put- and call options} are similar to
cash-or-nothing options, but provide the holder with one share of the asset.
\item \strong{Asian put- and call options} have a similar payoff to European put- and
call options but differ from European options in that they are path dependent.
Not the price \eqn{S_T} of the underlying asset at time-to-maturity \eqn{T}
is evaluated, but the arithmetic average
\eqn{\frac{1}{T} \int_0^T S_t dt}.
We get the payoffs
\itemize{
\item \eqn{\max\{K - \frac{1}{T} \int_0^T S_t dt, 0\}} for an Asian
\strong{put-option}
\item \eqn{\max\{\frac{1}{T} \int_0^T S_t dt - K, 0\}} for an Asian
\strong{call-option}
}
\item \strong{Geometric Asian options} differ from Asian options in that the geometric
average
\eqn{\exp \left( \frac{1}{T} \int_0^T \ln S_t dt \right)} is evaluated.
}

For reference see Hull (2022) or

\href{https://en.wikipedia.org/wiki/Greeks_(finance)}{en.wikipedia.org/wiki/Greeks_(finance)}.
}
\examples{
Greeks(initial_price = 100, exercise_price = 120, r = 0.01,
time_to_maturity = 5, volatility = 0.30, payoff = "call")

Greeks(initial_price = 100, exercise_price = 100, r = -0.005,
time_to_maturity = 1, volatility = 0.30, payoff = "put",
option_type = "American")

}
\references{
Hull, J. C. (2022). Options, futures, and other derivatives (11th Edition). Pearson

\href{https://en.wikipedia.org/wiki/Greeks_(finance)}{en.wikipedia.org/wiki/Greeks_(finance)}
}
\seealso{
\link{BS_European_Greeks} for option_type = "European"

\link{Binomial_American_Greeks} for option_type = "American"

\link{BS_Geometric_Asian_Greeks} for option_type = = "Geometric Asian"
and model = "black_scholes"

\link{BS_Malliavin_Asian_Greeks} for option_type = = "Asian"
and model = "black_scholes" and greek in c("fair_value", "delta", "rho",
"vega")

\link{Malliavin_Asian_Greeks} for more general cases of Asian Greeks

\link{Greeks_UI} for an interactive visualization
}
