# Question on yield curve fitting from Wilmott on Quant Finance p.529

My last question is related.

At the top of p. 529, it says,

"From the Taylor series expansion for $Z$ we find that the yield to maturity is given by

$$-\frac{log Z(r,t;T)}{(T-t)}\approx-a+\left(\frac{1}{2}a^{2}-b\right)(T-t)+\left(ab-c-\frac{1}{3}a^{3}\right)(T-t)^{2}+\dots$$

for short times to maturity."

We know that we derive yield to maturity from the inverse of the zero coupon bond equation

$$Z(r,t;T)=e^{-r(T-t)}$$

by taking logs and dividing by $(T-t)$ and multiplying both sides by $-1$.

If we plug the solutions for $a(r)$, $b(r)$, and $c(r)$ into the series expansion of $Z$ from p.528 we have that $Z$ is equal to

$$Z\approx-r(T-t)+(\frac{1}{2}r^2-\frac{1}{2}(u-\lambda w))(T-t)^2+...$$

But the solution provided on p. 529 shows that no such substitutions for the values of a, b, and c have yet been made.

Taking logs, dividing by $(T-t)$, and multiplying both sides by $-1$ on our equation does not give us

$$-\frac{log Z(r,t;T)}{(T-t)}\approx-a+\left(\frac{1}{2}a^{2}-b\right)(T-t)+\left(ab-c-\frac{1}{3}a^{3}\right)(T-t)^{2}+\dots$$

and neither does starting with

$$Z\approx 1+a(r)(T-t)+b(r)(T-t)^2+c(r)(T-t)^3$$

and taking logs, etc..

So, obviously I am starting from the wrong place. Can you help me see which $Z$ to start with? I don't believe it is the computations that I am having trouble with, I am having trouble seeing the plan, as Polya would say.

As @michipilli said, if

• $Z = 1+ as + bs^2 + cs^3$ (where I have substituted $T-t$ by $s$ for ease of notation and also suppressed the dependencies of $a$, $b$ and $c$) and
• $\log (1+\zeta) = \zeta - \frac{1}{2}\zeta^2 + \frac{1}{3}\zeta^3 + ...$ then,

\begin{align*} \log Z &= (as + bs^2 + cs^3) - \frac{1}{2}(as + bs^2 + cs^3)^2 + \frac{1}{3}(as + bs^2 + cs^3)^3 + ... \end{align*} and \begin{align*} -\frac{\log Z}{s} &= -\frac{1}{s}(as + bs^2 + cs^3) +\frac{1}{2s}(as + bs^2 + cs^3)^2 - \frac{1}{3s}(as + bs^2 + cs^3)^3 + ... \end{align*} Now,

• $(as + bs^2 + cs^3)^2 = a^2s^2 + b^2s^4 + 2acs^4 + 2abs^3 + o(s^5)$
• $(as + bs^2 + cs^3)^3 = a^3s^3 + 3a^2bs^4 + o(s^5)$

Substituting back we get \begin{align*} -\frac{\log Z}{s} &= -a - bs - cs^2 + \frac{a^2s}{2} + \frac{b^2s^3}{2} + acs^3 + abs^2 - \frac{a^3s^2}{3} - a^2bs^3 + o(s^3)\\ &= -a + \left(\frac{a^2}{2} - b\right)s + \left(ab -c -\frac{a^3}{3}\right)s^2 + o(s^3) \end{align*}

which is what you desire.

• Thanks a lot Theja, you and michipili helped me see the error I was committing. – Joe Oct 14 '13 at 17:09

Is the author taking logs (and dividing by (T-t) etc) of our previous Z expansion from the previous page?

He does, as you will see if you try to do the computation. What did you prevent to find this out by yourself? (I am trying to be constructive.)

Mathematically, it doesn't add up to what the author provides as the answer. What am I missing here?

The sequel of the book probably tells.

• Michipili, thanks for your interest. I did do the computation and didn't get the same result as the author which led me to believe I was starting from the wrong point than the author, I was hoping for a pointer as to how to set it up since my result didn't match. I'll have to investigate further and perhaps I'll update my question to show the different approaches I went about. I should have done that for starters. – Joe Oct 13 '13 at 21:38
• Are you aware that the taylor expansion of $log(1 + \zeta)$ near $\zeta = 0$ is $\zeta - \zeta^2/2 + \zeta^3/3 + o(\zeta^4)$? Some coefficients should look familiar! :) So if you do the computation with $\zeta = a(r)(T-t) + o(T - t)$ you will quickly see that it matches and doing the computation at the right precision (up to the third power of $T-t$) gives you the expected result. It seems that the author targets an audience a slightly higher confidence in calculus than you currently have: since you like Polya, you may try its calculus exercises (with Szegö) to catch up—and ask questions! – Michael Le Barbier Grünewald Oct 14 '13 at 6:30
• Thanks Michipili, it seems funny to me now, but I was making a very basic algebraic mistake. When taking logs, I was not treating the left side the same as the right. My "plan" was taking logs term by term on the right side when I was taking logs of the entire left side at one time. Actually doing the expansion is simple once you guys showed me the error in my plan. Thanks so much. – Joe Oct 14 '13 at 17:06
• thanks for the author reference. I've only been at this stuff (calc,sde,ode,pde,quant), for less than a year, so I have a lot to learn. I've never studied analysis, so the book ref should help. I hope to start reading Kolmogorov, Abbott, Apostol (I have his 1st edition calc volumes), Rudin too. – Joe Oct 14 '13 at 18:17
• Exercises by Polya and Szegö are excellent and I also used the book “Infinitesimal calculus” by Dieudonné a lot and I can recommand these. IIRC the book of Rudin misses the “build up your reflexes” type of exercises, while I expect Kolmogorov to provide you a lot of them. I do no know Abbott and Apostol. Do not pick too many books, stick to one or two, but read them to the point you could rewrite them and do a lot of exercises. Have fun! – Michael Le Barbier Grünewald Oct 14 '13 at 20:35