Skip to content
Prev 580 / 15274 Next

NIG Option Pricing

Hello,
As it turns out - neither was I.  I was able to narrow the problem
down and identify my programing error.  I apologize for the noise
on the list.

Anyway, to those that might be interested (and to prevent anyone
else wasting their time on this).  Basically, my mistake was to
assume that the default arguments to the function "nigpdf" were
evaluated at runtime. In fact, they are evaluated at the time
of the function defnition. Hence both integrate calls were
returning identical values.  The fix is, change the calls to
integrate from:

intg2 <- integrate(nigpdf, iblower, ibupper)$value
....
intg2 <- integrate(nigpdf, iblower, ibupper)$value

To:

intg2 <- integrate(nigpdf, iblower, ibupper,
  alpha=alpha, beta=beta, delta=delta, mu=0)$value
....
intg2 <- integrate(nigpdf, iblower, ibupper,
  alpha=alpha, beta=beta, delta=delta, mu=0)$value

In the callnig() function.

Regards,

--Dan