ecd.erfq: Quartic scaled error function

View source: R/ecd-erfq-method.R

ecd.erfqR Documentation

Quartic scaled error function

Description

The scaled error function in quartic pricing model that encaptulates both scaled erfi and erfc functions into a single representation. This is used to provide an elegant expression for the MGF and local option prices, L_{c,p}. When sgn=-1, it is √{π}e^{-x^2} erfi(x), which twice of Dawson function. When sgn=1, it is √{π}e^{x^2} erfc(x). ecd.erfq_sum is the summation implementation with truncation rule set forth in the quartic pricing model. It achieves high precision when x > 4.5.

Usage

ecd.erfq(x, sgn)

ecd.erfq_sum(x, sgn)

Arguments

x

numeric

sgn

an integer of 1 or -1

Value

The mpfr object

Examples

x <- ecd.erfq(c(5,10,15), 1)
y <- ecd.erfq(c(5,10,15), -1)

ecd documentation built on May 10, 2022, 1:07 a.m.