Serving the Quantitative Finance Community

 
User avatar
tarunmakhija
Topic Author
Posts: 1
Joined: December 18th, 2006, 8:30 am

Normal Model for Swaption Pricing

March 13th, 2007, 7:09 pm

Hi,I am implementing a simple Normal Model for Swaption Pricing.I first try to price European Puts and European Calls as follows:BNCalls = normvol * sqrt(T) * (d1 * N(d1) + N'(d1))BNPuts = normvol * sqrt(T) * (d2 * N(d2) + N'(d2))where:d1 = +(F - K) / (normvol * sqrt(T))d2 = - (F - K) / (normvol * sqrt(T))F is the forward, K is the strike, T is the time to maturity.Following is a VBA code I use for the same. My problem is that I get negative values for BNPut whenever I have F > K(and similarly, negative values for BNCall whenever I have F < K). I am not able to understand what mistake I am making. Would be great if someone could advice. Thanks. Public Function Bnormcall(forward As Double, k As Double, sigma As Double, T As Double) As Double d1 = (forward - k) / (sigma * (T ^ 0.5)) Nd1 = WorksheetFunction.NormSDist(d1) Ndprimed1 = 1 / ((2 * WorksheetFunction.Pi) ^ 0.5) * Exp(-(d1 ^ 2) / 2) Bnormcall = sigma * (T ^ 0.5) * ((d1 * Nd1) + Nprimed1)End FunctionPublic Function Bnormput(forward As Double, k As Double, sigma As Double, T As Double) As Double d2 = -(forward - k) / sigma / T ^ 0.5 Nd2 = WorksheetFunction.NormSDist(d2) Ndprimed2 = 1 / ((2 * WorksheetFunction.Pi) ^ 0.5) * Exp(-(d2 ^ 2) / 2) Bnormput = sigma * T ^ 0.5 * (d2 * Nd2 + Nprimed2) End Function
 
User avatar
sanjaysivakumar
Posts: 0
Joined: March 27th, 2006, 6:32 am

Normal Model for Swaption Pricing

March 14th, 2007, 3:05 am

check your formulas. Its becouse of your d1 and d2. From the eq for d1, its clear that it is -ve for F>K. similarly for d2. I think there is some problem in the euqation. where did you find this.
 
User avatar
tarunmakhija
Topic Author
Posts: 1
Joined: December 18th, 2006, 8:30 am

Normal Model for Swaption Pricing

March 14th, 2007, 4:22 am

Hi Sanjay,I am using my lecture notes. Please see page 8 of the attached for the Normal model.Any hints would be appreciated!Thanks,Tarun
Attachments
swaptions.zip
(154.95 KiB) Downloaded 64 times
 
User avatar
sanjaysivakumar
Posts: 0
Joined: March 27th, 2006, 6:32 am

Normal Model for Swaption Pricing

March 14th, 2007, 4:58 am

tarunmakhija, i think its a draw back of the model.
 
User avatar
gc
Posts: 10
Joined: September 21st, 2002, 10:08 pm

Normal Model for Swaption Pricing

March 14th, 2007, 8:05 am

QuotePublic Function Bnormcall(forward As Double, k As Double, sigma As Double, T As Double) As Double d1 = (forward - k) / (sigma * (T ^ 0.5)) Nd1 = WorksheetFunction.NormSDist(d1) Ndprimed1 = 1 / ((2 * WorksheetFunction.Pi) ^ 0.5) * Exp(-(d1 ^ 2) / 2) Bnormcall = sigma * (T ^ 0.5) * ((d1 * Nd1) + Nprimed1)End FunctionThe formula on the paper is correct. Your implementation contains an error though: in the last line you want to write : Bnormcall = sigma * (T ^ 0.5) * ((d1 * Nd1) + Ndprimed1)instead of Bnormcall = sigma * (T ^ 0.5) * ((d1 * Nd1) + Nprimed1)Also, once you move from the evaluation of a single option to a swaption, don't forget the annuity term (L in your article) P.S. A modest (but really important) programming suggestion: always start your code with "Option Explicit". If you had done, not only you would have spotted this error immediately, but the compiler would have spotted it for you
Last edited by gc on March 13th, 2007, 11:00 pm, edited 1 time in total.
 
User avatar
sanjaysivakumar
Posts: 0
Joined: March 27th, 2006, 6:32 am

Normal Model for Swaption Pricing

March 14th, 2007, 9:07 am

sorry for the misleading.I didnt see that.
 
User avatar
tarunmakhija
Topic Author
Posts: 1
Joined: December 18th, 2006, 8:30 am

Normal Model for Swaption Pricing

March 14th, 2007, 7:59 pm

Thanks a lot gc! that was really stupid of me.I will start using Option Explicit (This is my first time with VBA.. I am a Java programmer)Best,Tarun