I just wrote two functions in Matlab which calculates the swaption prices based on the Lognormal model and on the Normal model, although I have the idea that the Normal model is wrong because the swaption price is (I think) too high.
Hereby the Lognormal function in Matlab:
function [Receiver, Payer] = BlackSwaptionModel(K,S,Bvol,Time,Reonia,TenorSwap)
d1 = (log(S/K) + 1/2*Bvol^2*Time) / (Bvol*sqrt(Time));
d2 = d1 - (Bvol * sqrt(Time));
Receiver = ((1-1/(1+S)^(TenorSwap)) / S) * exp(-Reonia*Time) * (S*normcdf(d1) - K*normcdf(d2)); %Value receiver swaption Black Model
Payer = ((1-1/(1+S)^(TenorSwap)) / S) * exp(-Reonia*Time) * (K*normcdf(-d2) - S*normcdf(-d1)); % Value payer swaption Black Model
end
Plus the Normal model function in Matlab:
function [Receiver, Payer] = NormalSwaptionModel(K,S,Nvol,Time,Reonia,TenorSwap)
d1 = (S-K) / (Nvol * sqrt(Time));
d2 = -(S-K) / (Nvol * sqrt(Time));
Receiver = Nvol * sqrt(Time) * (d1*normcdf(d1) + normpdf(d1)) * ((1-1/(1+S)^(TenorSwap)) / S) * exp(-Reonia*Time);
Payer = Nvol * sqrt(Time) * (d2*normcdf(d2) + normpdf(d2)) * ((1-1/(1+S)^(TenorSwap)) / S) * exp(-Reonia*Time);
end
Could anybody see what's going wrong here. Thanks.