Hi,I am studying the article of L. Andersen on the discount curve construction with tension splines.In section 4.4 he applies a Lagrangian to find the lambda so that the precision fit respects some criteria. I was thinking of a Newton Raphson?s method to iterate on lambda but I am not sure how to evaluate the derivative expression of S w.r.t. lambda.Is the approximation f(x+h)-f(x) = h x f?(x) applicable (h->0) here where given two initial values ?arbitrary? chosen (lamda1, lamda2) I can from them approximate the derivative iteratively.Is this a correct approach?Thanks for your help.

- Cuchulainn
**Posts:**61483**Joined:****Location:**Amsterdam-
**Contact:**

I have looked at this method but have not implemented it. So thinking out loud, if the issue is the nonlinear solver, might Steffensen's method help? If yes, then you can use Aitken delta^2 process for more speedup. It is a fixed-point algo.Do you have a good initial x_0?

Last edited by Cuchulainn on May 24th, 2011, 10:00 pm, edited 1 time in total.

http://www.datasimfinancial.com

http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself

Jean Piaget

http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself

Jean Piaget

Thank you for your answer, I don't have much precision (or knowledge) about x_0 so I think a Newton Raphson is more appropriate.But do you think that I can use the two first iterations to find my first derivative?

You can find the article here:http://papers.ssrn.com/sol3/papers.cfm? ... 1088Thanks

- Cuchulainn
**Posts:**61483**Joined:****Location:**Amsterdam-
**Contact:**

Quote I was thinking of a Newton Raphson?s method to iterate on lambda but I am not sure how to evaluate the derivative expression of S w.r.t. lambda.So, in 4.4 they have S(lambda) = gamma^2 and solve for lambda, yes?If so, using Steffensen means you do not have to compute dS/dlambda. And only 1 starting value x_0 is needed.And Newton is not always good!

Last edited by Cuchulainn on May 24th, 2011, 10:00 pm, edited 1 time in total.

http://www.datasimfinancial.com

http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself

Jean Piaget

http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself

Jean Piaget

yes, but in Steffesens methodology, the choice of x0 is important ( It has to be close to x*). I am not sure I can verify this condition.But perhaps, it will impact just the first iteration?Thanks for your time.

- Cuchulainn
**Posts:**61483**Joined:****Location:**Amsterdam-
**Contact:**

If x_0 is no good then Steff is as bad as NR, indeed. Is that so in your case? How does your convergence work out?Plan B is to use homotopy/continuation method which are insensitive to choice of x_0.

Last edited by Cuchulainn on May 25th, 2011, 10:00 pm, edited 1 time in total.

http://www.datasimfinancial.com

http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself

Jean Piaget

http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself

Jean Piaget

I dunno how helpful this-I'm in oil+gas- but I had to port some fortran to Java dealing with Cline's spline under tension; here's some untested C++, a quick'n'dirty port of the java. The method is particularly stable with regards to calculating the 2nd derivative, apologies in advance if I'm way off answering the actual question I have no idea if Cline's original paper is referenced by anderson, but well worth a looksee

Hello, thank you for all your answers, I have decided to choose the homotopy/continuation method for the optimization. But, before doing that I have to know how to interpolate with a tension spline. In Andersen's Paper, I don't understand the splines implementation? Does somebody know how to do it? Or have already done it? Zeta, thank you for your answer, I have tried to use it to interpolate a spline with a set of points, but I dont reaaly understand how to use it efficiently? What is exactly the Acceleration Class? How can I have the interpolation from a set of points?Thanks

Hello, thank you for all your answers, I have decided to choose the homotopy/continuation method for the optimization. But, before doing that I have to know how to interpolate with a tension spline. In Andersen's Paper, I don't understand the splines implementation? Does somebody know how to do it? Or have already done it? Zeta, thank you for your answer, I have tried to use it to interpolate a spline with a set of points, but I dont reaaly understand how to use it efficiently? What is exactly the Acceleration Class? How can I have the interpolation from a set of points?Thanks

- Cuchulainn
**Posts:**61483**Joined:****Location:**Amsterdam-
**Contact:**

I had a look as well and I would say it's tricky to implement it..., especially the nonlinearity aspects.What about trying one of the other 10^2 interpolation methods? What are your requirements? I have decided to choose the homotopy/continuation method for the optimizationThis is a useful technque, will it be Davidenkdo's method or ODE approach?

Last edited by Cuchulainn on June 3rd, 2011, 10:00 pm, edited 1 time in total.

http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself

Jean Piaget

acceleration==second derivative. After SplineUnderTension class instance foo is created with x/y data, a new point is simply foo.getInterpValue(x_new) etc. This method is robust w/ noise and large derivatives, very good for seismic data. a quick google reveals a few interesting talks on the subject, might help your application to finance?

GZIP: On