[R-sig-finance] NIG Option Pricing
dkf@specere.com
dkf at specere.com
Tue Dec 6 18:23:34 CET 2005
Hello,
> I am not sure of a few things you are doing
>
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
> The BS volatility in your function below is what you compute as "sd"
> below I don't think that makes sense. You'd have to
> imply the bs volatility from NiG call prices to compare NiG to B.S
>
> So you imply b.s. volatility and then price with that implied to get the
> B.S price. Also the reason your implicit values are odd is
> because "max" by default does the maximum across the list/array/vector
> object. What you probably want to do is to use "pmax" instead.
>
> Finally you would find AVT and wim schoutens posting on wilmott helpful.
> http://www.wilmott.com/messageview.cfm?catid=8&threadid=14313
>
> Cheers,
> Kris
>
>
More information about the R-sig-finance
mailing list