Root Guess For a Function (Yield Calculation of a Bond)

659 Views Asked by At

The price of a bond is given by the formula :

$$P(y) = Re^{-yt_N}+\sum_{i=1}^{N}C_ie^{-yt_i}$$

Where :

$R$ is the redemption price (usually equals 1)

$y$ is a constant (yield) (it ranges between say -0.2 and 0.3)

$C$ is a coupon (ranges from 0 to 0.2)

Using Newton Raphson algorithm, I can get the root $y$ for $P(y)=Pm$ where $Pm$ is a given constant

However, I have a lot of data, the computation time is a little big. Seeing the problem from a mathematical or a Financial view, what would be the best starting point for the algorithm? (I mean the guess value for $y$)? Thank you

NB : I gave the ranges for the variables just to give an idea for the those not familiar with bond maths. These values can off course be out of the ranges given

2

There are 2 best solutions below

7
On

As a guess for y to feed to the algorithm i would do this:

$$\bar{t}=\frac{1}{N}\sum_{i=1}^N t_i$$

$$\bar{C}=\frac{1}{N}\sum_{i=1}^N C_i$$ and replace all quantities in the formula by their mean value: $$ P_{simp}(y) = Re^{-y \bar t}+\sum_{i=1}^{N}\bar C e^{-y \bar t}= (R+N\bar C) e^{-y \bar t} $$ now solve $P_{simp}(y)=Pm$ for y: $$ y_{guess}=-\frac{1}{\bar t}\log\frac{Pm}{R+N\bar C}=\frac{1}{\bar t}\log\frac{R+N\bar C}{Pm} $$ this could work really well as a starting point, but you have to try to know if indeed it does.


Adaptive Newton Method

1) $\lambda \to 1$

2) $x_{n+1}=x_n-\lambda\frac{P(x_n)-Pm}{P'(x_n)}$

3) $\lambda\to\lambda\left\{1+\frac{Pm-P(x_{n+1})}{P(x_{n+1})-P(x_{n})}\right\}_{0.2}^{1.8}$

4) until convergence go to 2)

those numbers on the right graph on (2) are a lower limit and a upper limit for the coefficient between graphs that multiplies $\lambda$. I devised this algorithm in a simulation that required really fast convergence since executing the simulation was really costly and it worked nice.

0
On

Since this is a convex decreasing function of $y$, the starting value does not matter. The Newton-Raphson iteration will converge globally. By choosing a good starting value you may be able to save yourself one or two steps.

So you can start at $y_0 = 0$. Use $R =0$ (since the bond redemption is just another coupon and is paid at the same time). Then the first Newton-Raphson step leads to $$ y_1 = \frac{\sum_{i=1}^N C_i - P_m}{\sum_{i=1}^N t_iC_i} $$ and that could be your starting value.