Results 1 to 4 of 4

Thread: Bootstrapping Method

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    74

    Bootstrapping Method

    Hello! I am desperate for help here. I am semi-proficient with VBA, but I can barely read the math formula I have attached below. The formula is called the Bootstrapping Method. If you have a known series of par yields on a standard bond, you should be able to use this formula to calculate what the equivalent zero coupon bond yield would be.

    r = the zero coupon yield at a given point n, in its maturity
    y = the provided par yield at the same given point in maturity

    How would I code this formula into VBA? Any help would be appreciated!

    Edit: One thing I forgot to add. I would like my columns headings in my spreadsheet to be "Period"( 1 through n), the second column being "Par Yield" (this would be inputed by user), and the third column to be "Zero Coupon Yield" (the values in this column would be the output of the macro).

    THANK YOU SO FREAKING MUCH IN ADVANCE!
    Attached Images Attached Images  
    Last edited by gtg689a; Jul 20th, 2007 at 03:39 PM.

  2. #2
    Frenzied Member
    Join Date
    Jun 2006
    Posts
    1,098

    Re: Bootstrapping Method

    I'm not familiar with VBA specifics, but this should get you started.
    Code:
    ' Local variables
    Dim sum As Double, prod As Double
    Dim i As Long, j As Long
    
    sum = 0 ' Initial value for Sum
    For j = 1 To n ' Calculate Sum
      prod = 1 ' Initial value for Product
      For i = j To n ' Calculate Product
        prod = prod / (1 + y(i))
      Next i
      sum = sum + prod
    Next j
    r = (1 - y(n) * sum) ^ (-1 / n) - 1

  3. #3
    New Member julie_miel's Avatar
    Join Date
    Jul 2007
    Posts
    6

    Re: Bootstrapping Method

    The best way to code equations is to start from the innermost brackets: 1 over (1 + y)
    This must be multiplied by the previous such value for (n-j) times; one iteration loop here.
    At the end of this loop, the result must be added to a cummulative sum and this must be repeated n times; another iteration loop here.
    At the end of the second loop, the resultant quantity is multiplied by (1 - y)
    Next raise this to -1/n and finally subtract 1 from it.

    Of course, the code itself has been given away but I reckon this helps!

  4. #4
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Bootstrapping Method

    You might want to ask around in http://www.vbforums.com/forumdisplay.php?f=37 for help in actually coding the formula in VBA
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width