From 23984a21df311334f072b8413d4a5ab9644a98f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pelletier?= Date: Sat, 22 Feb 2014 13:31:04 -0500 Subject: [PATCH] =?UTF-8?q?retrait=20de=20dampedcfcallCarrMadan=20qui=20?= =?UTF-8?q?=C3=A9tait=20pas=20dans=20le=20bon=20paquet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/dampedcfcallCarrMadan.R | 44 ------------------------------------ man/dampedcfcallCarrMadan.Rd | 37 ------------------------------ 2 files changed, 81 deletions(-) delete mode 100644 R/dampedcfcallCarrMadan.R delete mode 100644 man/dampedcfcallCarrMadan.Rd diff --git a/R/dampedcfcallCarrMadan.R b/R/dampedcfcallCarrMadan.R deleted file mode 100644 index 8a29c74..0000000 --- a/R/dampedcfcallCarrMadan.R +++ /dev/null @@ -1,44 +0,0 @@ -# Damped characteristic function of the call option log-price -# -# Author: Francois Pelletier -# -# LGPL 3.0 -############################################################################### - - -#' Damped characteristic function of the call option log-price -#' @param u Transform variate -#' @param char.fn Characteristic function of the log-price process -#' @param eval.time Evaluation time -#' @param expiry.time Expiry time -#' @param rate Continuously compounded interest rate (force of interest) -#' @param alpha Damping parameter -#' @param ... Parameters of the characteristic function -#' @param moneyness Boolean for moneyness of call option -#' (TRUE if strike price is lower than stock price) -#' @return Characteristic function value -#' -#' @author Francois Pelletier -dampedcfcallCarrMadan <- function(u,char.fn,eval.time,expiry.time,rate,alpha,...,moneyness=TRUE) -{ - if(moneyness) - { - exp(-rate*(expiry.time-eval.time))* - char.fn(u-1i*(alpha+1),expiry.time-eval.time,...) / - (alpha^2+alpha-u^2+1i*u*(2*alpha+1)) - } - else - { - auxiliairyf <- function(u,char.fn,eval.time,expiry.time,rate,alpha,...) - { - exp(-rate*(expiry.time-eval.time))* - (1/(1+1i*u)-exp(rate*(expiry.time-eval.time))/ - (1i*u)-char.fn(u-1i,expiry.time-eval.time,...)/(u^2-1i*u)) - } - (auxiliairyf(u-1i*alpha,char.fn,eval.time,expiry.time,rate,alpha,...)- - auxiliairyf(u+1i*alpha,char.fn,eval.time,expiry.time,rate,alpha,...))/2 - } - -} - - diff --git a/man/dampedcfcallCarrMadan.Rd b/man/dampedcfcallCarrMadan.Rd deleted file mode 100644 index 49450de..0000000 --- a/man/dampedcfcallCarrMadan.Rd +++ /dev/null @@ -1,37 +0,0 @@ -\name{dampedcfcallCarrMadan} -\alias{dampedcfcallCarrMadan} -\title{Damped characteristic function of the call option log-price} -\usage{ -dampedcfcallCarrMadan(u, char.fn, eval.time, expiry.time, rate, alpha, ..., - moneyness = TRUE) -} -\arguments{ - \item{u}{Transform variate} - - \item{char.fn}{Characteristic function of the log-price - process} - - \item{eval.time}{Evaluation time} - - \item{expiry.time}{Expiry time} - - \item{rate}{Continuously compounded interest rate (force - of interest)} - - \item{alpha}{Damping parameter} - - \item{...}{Parameters of the characteristic function} - - \item{moneyness}{Boolean for moneyness of call option - (TRUE if strike price is lower than stock price)} -} -\value{ -Characteristic function value -} -\description{ -Damped characteristic function of the call option log-price -} -\author{ -Francois Pelletier -} -