Serving the Quantitative Finance Community

 
User avatar
deathstar9
Topic Author
Posts: 1
Joined: January 9th, 2008, 8:24 pm

Question about Excel/VBA document

March 3rd, 2009, 1:21 am

Hello, I wonder if someone could tell me how to modify the excel file so that it works for semiannual coupons and semiannual compounding.Here is the functionFunction price449(c As Double, N As Integer, ytm As Double) As DoubleDim x As Doublex = 1 / (1 + ytm)price449 = c * (x - x ^ (N + 1)) / (1 - x) + 1 * x ^ NEnd FunctionThe file is attached
Attachments
Yield curve stripping.zip
(11.11 KiB) Downloaded 71 times
Last edited by deathstar9 on March 2nd, 2009, 11:00 pm, edited 1 time in total.
 
User avatar
deathstar9
Topic Author
Posts: 1
Joined: January 9th, 2008, 8:24 pm

Question about Excel/VBA document

March 3rd, 2009, 1:52 pm

anyone?
 
User avatar
DavidJN
Posts: 262
Joined: July 14th, 2002, 3:00 am

Question about Excel/VBA document

March 3rd, 2009, 3:51 pm

Didn't look at your spreadsheet, but you likely need only ensurethat all input parameters are on a consistent basis.1. Replace the annual coupon c with c/22. Replace the annual ytm with ytm/23. Replace the number of years N with N*2
 
User avatar
deathstar9
Topic Author
Posts: 1
Joined: January 9th, 2008, 8:24 pm

Question about Excel/VBA document

March 6th, 2009, 12:04 am

Thanks, but are you sure these are the only things I need to change? There is nothing else within the spreadsheet, none of the inputs?