Oxperts,
I find a bug in the financialNR package.
Try the test program for Merton's Jump diffusion model
with the following parameter.
#include <oxstd.h>
#import <packages/financialNR/financialNR>
test_merton()
{
decl S=100;
decl X=110;
decl r=0.05;
decl sigma=0.2;
decl time = 0.2;
decl lambda = 2;
decl kappa = 0.1;
decl delta = 0.1;
println(" Merton's jump diffusion, Call price =
",
option_price_call_merton_jump_diffusion(S,X,r,sigma,time,
lambda,kappa,delta));
}
main()
{
println("START testing alternative formulas");
test_merton();
println("DONE testing alternative formulas");
}
The output is:
START testing alternative formulas
Merton's jump diffusion, Call price = -1.88266
DONE testing alternative formulas
A negative call price is impossible. It looks like the
program merton_jump_diff_call.ox in the SRC directory
calls the B_S option price program in the wrong way.
We should switch the third and fourth parameters of
the function call (r and sigma). BTW, the original
documentation contains the same error.
LS
__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/
|