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
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.