R/RcppExports.R

Defines functions pide_kou_price pide_kou_greeks pide_kou_grid pide_merton_price pide_merton_greeks pide_merton_grid pde_gbm_price pde_gbm_greeks pde_gbm_grid mgf_dkou

Documented in pde_gbm_greeks pde_gbm_grid pde_gbm_price pide_kou_greeks pide_kou_grid pide_kou_price pide_merton_greeks pide_merton_grid pide_merton_price

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

mgf_dkou <- function(t, prob, alpha, beta, ku, kd) {
    .Call('_OptionPricer_mgf_dkou', PACKAGE = 'OptionPricer', t, prob, alpha, beta, ku, kd)
}

#' Solve a PDE/variational inequality under GBM dynamics
#' 
#' @param spot the spot price
#' @param strike the strike sprice
#' @param maturity the maturity of the option contract
#' @param rate the risk-neutral rate
#' @param div the dividend yield rate
#' @param volat the volatility
#' @param N the time resolution
#' @param M the space resolution
#' @param what the payoff to use
#' @param style 'european' for PDE/PIDE problems, 'american' for variational inequalities
#' 
#' @description {Solve a PDE/variational equality under GBM dynamics using an implicit finite difference scheme}
pde_gbm_grid <- function(spot, strike, maturity, rate, div, volat, N, M, what = "call", style = "american") {
    .Call('_OptionPricer_pde_gbm_grid', PACKAGE = 'OptionPricer', spot, strike, maturity, rate, div, volat, N, M, what, style)
}

#' Solve a PDE/variational inequality under GBM dynamics
#' 
#' @param spot the spot price
#' @param strike the strike sprice
#' @param maturity the maturity of the option contract
#' @param rate the risk-neutral rate
#' @param div the dividend yield rate
#' @param volat the volatility
#' @param N the time resolution
#' @param M the space resolution
#' @param what the payoff to use
#' @param style 'european' for PDE/PIDE problems, 'american' for variational inequalities
#' 
#' @description {Solve a PDE/variational equality under GBM dynamics using an implicit finite difference scheme}
pde_gbm_greeks <- function(spot, strike, maturity, rate, div, volat, N, M, what = "call", style = "american") {
    .Call('_OptionPricer_pde_gbm_greeks', PACKAGE = 'OptionPricer', spot, strike, maturity, rate, div, volat, N, M, what, style)
}

#' Solve a PDE/variational inequality under GBM dynamics
#' 
#' @param spot the spot price
#' @param strike the strike sprice
#' @param maturity the maturity of the option contract
#' @param rate the risk-neutral rate
#' @param div the dividend yield rate
#' @param volat the volatility
#' @param N the time resolution
#' @param M the space resolution
#' @param what the payoff to use
#' @param style 'european' for PDE/PIDE problems, 'american' for variational inequalities
#' 
#' @description {Solve a PDE/variational equality under GBM dynamics using an implicit finite difference scheme}
pde_gbm_price <- function(spot, strike, maturity, rate, div, volat, N, M, what = "call", style = "american") {
    .Call('_OptionPricer_pde_gbm_price', PACKAGE = 'OptionPricer', spot, strike, maturity, rate, div, volat, N, M, what, style)
}

#' Solve a PIDE/variational inequality under Merton's jump-diffusion dynamics
#' 
#' @param spot the spot price
#' @param strike the strike sprice
#' @param maturity the maturity of the option contract
#' @param parameters the vector of parameters, see details.
#' @param N the time resolution
#' @param M the space resolution
#' @param L the jump resolution
#' @param what the payoff to use
#' @param style 'european' for PDE/PIDE problems, 'american' for variational inequalities
#' 
#' @description {Solve a PIDE/variational equality under Merton's jump-diffusion dynamics using an implicit-explicit finite difference scheme. A composite trapezoid rule
#' is used to approximate the jump-integral term.}
#' @details {The vector \code{parameters} must contain:
#' \itemize{
#' \item \code{rate} the risk-neutral rate
#' \item \code{div} the dividend yield rate
#' \item \code{volat} the annual volatility
#' \item \code{lambda} the mean rate of jumps per year
#' \item \code{jm} the mean size of jumps
#' \item \code{jv} the volatility of the size of jumps
#' }}
pide_merton_grid <- function(spot, strike, maturity, parameters, N = 100L, M = 100L, L = 51L, what = "call", style = "american") {
    .Call('_OptionPricer_pide_merton_grid', PACKAGE = 'OptionPricer', spot, strike, maturity, parameters, N, M, L, what, style)
}

#' Solve a PIDE/variational inequality under Merton's jump-diffusion dynamics
#' 
#' @param spot the spot price
#' @param strike the strike sprice
#' @param maturity the maturity of the option contract
#' @param parameters the vector of parameters, see details.
#' @param N the time resolution
#' @param M the space resolution
#' @param L the jump resolution
#' @param what the payoff to use
#' @param style 'european' for PDE/PIDE problems, 'american' for variational inequalities
#' 
#' @description {Solve a PIDE/variational equality under Merton's jump-diffusion dynamics using an implicit-explicit finite difference scheme. A composite trapezoid rule
#' is used to approximate the jump-integral term.}
#' @details {The vector \code{parameters} must contain:
#' \itemize{
#' \item \code{rate} the risk-neutral rate
#' \item \code{div} the dividend yield rate
#' \item \code{volat} the annual volatility
#' \item \code{lambda} the mean rate of jumps per year
#' \item \code{jm} the mean size of jumps
#' \item \code{jv} the volatility of the size of jumps
#' }}
pide_merton_greeks <- function(spot, strike, maturity, parameters, N = 100L, M = 100L, L = 51L, what = "call", style = "american") {
    .Call('_OptionPricer_pide_merton_greeks', PACKAGE = 'OptionPricer', spot, strike, maturity, parameters, N, M, L, what, style)
}

#' Solve a PIDE/variational inequality under Merton's jump-diffusion dynamics
#' 
#' @param spot the spot price
#' @param strike the strike sprice
#' @param maturity the maturity of the option contract
#' @param parameters the vector of parameters, see details.
#' @param N the time resolution
#' @param M the space resolution
#' @param L the jump resolution
#' @param what the payoff to use
#' @param style 'european' for PDE/PIDE problems, 'american' for variational inequalities
#' 
#' @description {Solve a PIDE/variational equality under Merton's jump-diffusion dynamics using an implicit-explicit finite difference scheme. A composite trapezoid rule
#' is used to approximate the jump-integral term.}
#' @details {The vector \code{parameters} must contain:
#' \itemize{
#' \item \code{rate} the risk-neutral rate
#' \item \code{div} the dividend yield rate
#' \item \code{volat} the annual volatility
#' \item \code{lambda} the mean rate of jumps per year
#' \item \code{jm} the mean size of jumps
#' \item \code{jv} the volatility of the size of jumps
#' }}
pide_merton_price <- function(spot, strike, maturity, parameters, N = 100L, M = 100L, L = 51L, what = "call", style = "american") {
    .Call('_OptionPricer_pide_merton_price', PACKAGE = 'OptionPricer', spot, strike, maturity, parameters, N, M, L, what, style)
}

#' Solve a PIDE/variational inequality under Kou's jump-diffusion dynamics
#' 
#' @param spot the spot price
#' @param strike the strike sprice
#' @param maturity the maturity of the option contract
#' @param parameters the vector of parameters, see details.
#' @param N the time resolution
#' @param M the space resolution
#' @param L the jump resolution
#' @param what the payoff to use
#' @param style 'european' for PDE/PIDE problems, 'american' for variational inequalities
#' 
#' @description {Solve a PIDE/variational equality under Merton's jump-diffusion dynamics using an implicit-explicit finite difference scheme. A composite trapezoid rule
#' is used to approximate the jump-integral term.}
#' @details {The vector \code{parameters} must contain:
#' \itemize{
#' \item \code{rate} the risk-neutral rate
#' \item \code{div} the dividend yield rate
#' \item \code{volat} the annual volatility
#' \item \code{lambda} the mean rate of jumps per year
#' \item \code{prob} the probability of upward jump
#' \item \code{alpha} the mean size of upward jumps
#' \item \code{beta} the mean size of downward jumps
#' \item \code{ku} the displacement from the origin of upward jumps
#' \item \code{kd} the displacement from the origin of downward jumps
#' }}
pide_kou_grid <- function(spot, strike, maturity, parameters, N = 100L, M = 100L, L = 51L, what = "call", style = "american") {
    .Call('_OptionPricer_pide_kou_grid', PACKAGE = 'OptionPricer', spot, strike, maturity, parameters, N, M, L, what, style)
}

#' Solve a PIDE/variational inequality under Kou's jump-diffusion dynamics
#' 
#' @param spot the spot price
#' @param strike the strike sprice
#' @param maturity the maturity of the option contract
#' @param parameters the vector of parameters, see details.
#' @param N the time resolution
#' @param M the space resolution
#' @param L the jump resolution
#' @param what the payoff to use
#' @param style 'european' for PDE/PIDE problems, 'american' for variational inequalities
#' 
#' @description {Solve a PIDE/variational equality under Merton's jump-diffusion dynamics using an implicit-explicit finite difference scheme. A composite trapezoid rule
#' is used to approximate the jump-integral term.}
#' @details {The vector \code{parameters} must contain:
#' \itemize{
#' \item \code{rate} the risk-neutral rate
#' \item \code{div} the dividend yield rate
#' \item \code{volat} the annual volatility
#' \item \code{lambda} the mean rate of jumps per year
#' \item \code{prob} the probability of upward jump
#' \item \code{alpha} the mean size of upward jumps
#' \item \code{beta} the mean size of downward jumps
#' \item \code{ku} the displacement from the origin of upward jumps
#' \item \code{kd} the displacement from the origin of downward jumps
#' }}
pide_kou_greeks <- function(spot, strike, maturity, parameters, N = 100L, M = 100L, L = 51L, what = "call", style = "american") {
    .Call('_OptionPricer_pide_kou_greeks', PACKAGE = 'OptionPricer', spot, strike, maturity, parameters, N, M, L, what, style)
}

#' Solve a PIDE/variational inequality under Kou's jump-diffusion dynamics
#' 
#' @param spot the spot price
#' @param strike the strike sprice
#' @param maturity the maturity of the option contract
#' @param parameters the vector of parameters, see details.
#' @param N the time resolution
#' @param M the space resolution
#' @param L the jump resolution
#' @param what the payoff to use
#' @param style 'european' for PDE/PIDE problems, 'american' for variational inequalities
#' 
#' @description {Solve a PIDE/variational equality under Merton's jump-diffusion dynamics using an implicit-explicit finite difference scheme. A composite trapezoid rule
#' is used to approximate the jump-integral term.}
#' @details {The vector \code{parameters} must contain:
#' \itemize{
#' \item \code{rate} the risk-neutral rate
#' \item \code{div} the dividend yield rate
#' \item \code{volat} the annual volatility
#' \item \code{lambda} the mean rate of jumps per year
#' \item \code{prob} the probability of upward jump
#' \item \code{alpha} the mean size of upward jumps
#' \item \code{beta} the mean size of downward jumps
#' \item \code{ku} the displacement from the origin of upward jumps
#' \item \code{kd} the displacement from the origin of downward jumps
#' }}
pide_kou_price <- function(spot, strike, maturity, parameters, N = 100L, M = 100L, L = 51L, what = "call", style = "american") {
    .Call('_OptionPricer_pide_kou_price', PACKAGE = 'OptionPricer', spot, strike, maturity, parameters, N, M, L, what, style)
}
shill1729/OptionPricer documentation built on June 11, 2020, 12:18 a.m.