SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
rafou
Topic Author
Posts: 7
Joined: May 24th, 2011, 8:16 pm

Tension Splines and Optimization

May 25th, 2011, 1:31 pm

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.
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Tension Splines and Optimization

May 25th, 2011, 3:30 pm

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
 
User avatar
rafou
Topic Author
Posts: 7
Joined: May 24th, 2011, 8:16 pm

Tension Splines and Optimization

May 25th, 2011, 5:11 pm

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?
 
User avatar
rafou
Topic Author
Posts: 7
Joined: May 24th, 2011, 8:16 pm

Tension Splines and Optimization

May 25th, 2011, 5:31 pm

 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Tension Splines and Optimization

May 25th, 2011, 6:06 pm

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
 
User avatar
rafou
Topic Author
Posts: 7
Joined: May 24th, 2011, 8:16 pm

Tension Splines and Optimization

May 26th, 2011, 1:10 pm

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.
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Tension Splines and Optimization

May 26th, 2011, 2:44 pm

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
 
User avatar
zeta
Posts: 1969
Joined: September 27th, 2005, 3:25 pm
Location: Houston, TX
Contact:

Tension Splines and Optimization

May 27th, 2011, 6:46 am

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
 
User avatar
rafou
Topic Author
Posts: 7
Joined: May 24th, 2011, 8:16 pm

Tension Splines and Optimization

June 3rd, 2011, 8:03 pm

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
 
User avatar
rafou
Topic Author
Posts: 7
Joined: May 24th, 2011, 8:16 pm

Tension Splines and Optimization

June 3rd, 2011, 8:03 pm

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
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Tension Splines and Optimization

June 4th, 2011, 8:09 am

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.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
zeta
Posts: 1969
Joined: September 27th, 2005, 3:25 pm
Location: Houston, TX
Contact:

Tension Splines and Optimization

June 10th, 2011, 10:45 am

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?
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On