Code covered by the BSD License

# Price call and put options using Constant Elasticy of Variance model

### Hanan Kavitz (view profile)

02 Jan 2013 (Updated )

An alternative to using Black and Scholes model is using Constant Elasticity of Variance model.

[call,put]=constantElasticity(S,K,r,T,sigma,q,alpha)
```function [call,put]=constantElasticity(S,K,r,T,sigma,q,alpha)
%
%
% An alternative to using Black and Scholes model is using Constant Elasticy
% of Variance model.
% This is a diffusion model where the risk nuetral process for a stock is
%     dS=(r-s)*S*dt - sigma*S^alpha*dZ
%
% Input:
% S- underlying price.
% K- strike price
% r- risk free rate
% T- time to maturity
% sigma- std of the underlying asset
% q- yeild to maturity of the underlyin asset
% alpha- Elasticity of variance
%
% Outputs:
% call- the price of call option
% put- the price of put option
%
% Example:
%
% [call,put]=constantElasticity(50,50,0.04,1,0.3,0,1)
%
% Reference:
%
% [1] Options,Futures and other Derivatives, seventh edition by John Hull
%
v=sigma.^2./(2*(r-q).*(alpha-1)).*(exp(2*(r-q).*(alpha-1).*T)-1);
a=(K.*exp(-(r-q).*T)).^(2*(1-alpha))/((1-alpha).^2.*v);
b=1/(1-alpha);
c=S.^(2*(1-alpha))./((1-alpha).^2.*v);

if alpha<1 && alpha>0
call=S.*exp(-q.*T).*(1-ncx2cdf(a,b+2,c))-K.*exp(-r.*T).*ncx2cdf(c,b,a);
put=K.*exp(-r.*T)*(1-ncx2cdf(c,b,a))-S.*exp(-q.*T).*ncx2cdf(a,b+2,c);
elseif alpha>1
call=S.*exp(-q.*T).*(1-ncx2cdf(c,-b,a))-K.*exp(-r.*T).*ncx2cdf(a,2-b,c);
put=K.*exp(-r.*T).*(1-ncx2cdf(a,2-b,c))-S.*exp(-q.*T).*ncx2cdf(c,-b,a);
elseif alpha==1
[call,put]=blsprice(S,K,r,T,sigma,q);
else
error('alpha must be larger than 0');
end
```