Tortoise wrote:
akratic wrote:
I want to sell TLT and buy individual bonds. After
Gumby's great tutorial, the only thing holding me back is figuring out how to automatically value the individual bonds in my PP Google Docs Spreadsheet.
Assuming that goes well, I'm also planning to build a 0-3 year treasury ladder for my cash. Hopefully whatever method for valuing the 30Y bonds also works for shorter duration bonds.
I've been searching around for how to do this, and the only post I can find on the topic is from
fnord123 here, but I don't entirely understand it. fnord123 gets the 30Y price from yahoo, and then plugs it into this =PRICE black box along with information about his bond. Is this is the best way to value treasuries in Google Docs? Does anyone else have a different way? Can anyone explain how fnord's way works?
For my 0-3 year treasury ladder, what bond value should I be importing from Yahoo to plug in the =PRICE formula?
Thanks!
fnord123's method of calculating individual bond prices seems to be correct. If you're interested in the math, the =PRICE() financial formula in Google Finance and Microsoft Excel implements the following equation for
bond valuation:
P = C*[1-1/(1+i)^N]/i + M/(1+i)^N
where
C = coupon payment (periodic interest payment)
N = number of coupon payments remaining
i = market interest rate, i.e. required yield (per coupon payment period, so divide by 2 in the case of semi-annual coupon payments)
M = value at maturity (face value)
P = market price of bond
I spot-checked a few different 30-year Treasury bonds on Schwab (including one I own). Looking up the 30-year yield on Yahoo Finance, I obtained exactly the same result both by using the automatic =PRICE() formula and by manually entering the mathematical equation above into Excel. For all of those bonds, my computed price was within 0.03% of the market price listed on Schwab. Not bad!
Since the face value, interest rate, coupon payment frequency, and maturity date of the bond all remain fixed, the only two arguments to the =PRICE() formula you need to automatically update are (1) the current date ("settlement date") and (2) the market yield. As fnord123 pointed out, you can pull the yield from Yahoo Finance using the formula he specified.
However, if your bond has fewer than 30 years to maturity, make sure you adjust the yield accordingly. For example, using the 30-year yield for a bond with 25 years to maturity might produce a somewhat inaccurate price. To keep it accurate, have your spreadsheet pull in both the 20- and 30-year yields (perhaps by doing an HTML or XML import from the
Treasury web site) and take an appropriate weighted average of the two yields.
For example, assume i
20 is the 20-year yield and i
30 is the 30-year yield. If your bond has 23 years to maturity, the yield is roughly (30-23)/10*i
20 + (23-20)/10*i
30 = 0.7*i
20 + 0.3*i
30. And for a bond with 25 years to maturity, the weighted average is (as you might guess) simply 0.5*i
20 + 0.5*i
30.
This method may not be as simple as the TLT-times-fudge-factor approach, but it's probably more accurate and should please the purists and the mathematically-inclined.