function op=nigcall(S0,K,r,T,alpha,beta,delta,nsim,seed)
%prices a call option with nig increment where under Q, optionprice=Emax(S0exp(X)-K,0), 
%mu is determined to satisfy martingale condition. also need alpha>|1+beta|
% e.g. nigcall(1116.84,1125,.05,.3699,95.23,-4.72,.016,20000,1)
X=nigrnd(nsim,alpha,beta,delta,0,seed);
mu=log(1/mean(exp(X)))
X=X+mu;
op=zeros(1,length(K));
for i=1:length(K)
op(i)=mean(max(0,S0*exp(X)-K(i)));
end
%mean(exp(X))
%sqrt(var(X))