Serving the Quantitative Finance Community

  • 1
  • 2
  • 3
  • 4
  • 5
  • 7
 
User avatar
Ciportne
Topic Author
Posts: 0
Joined: February 26th, 2010, 8:59 am

ADE vs Crank Nicolson - Comparative Test

March 18th, 2010, 10:04 pm

Has anyone performed a comparative 'speed test' of the ADE scheme as listed by Duffy (2009 link to paper) verses the Crank Nicolson and Explicit schemes? It sounds like a good idea in theory, however it would be interesting to know if anyone has performed any side-by-side comparisons of speed and accuracy.
 
User avatar
Cuchulainn
Posts: 22935
Joined: July 16th, 2004, 7:38 am

ADE vs Crank Nicolson - Comparative Test

March 18th, 2010, 10:36 pm

QuoteOriginally posted by: CiportneHas anyone performed a comparative 'speed test' of the ADE scheme as listed by Duffy (2009 link to paper) verses the Crank Nicolson and Explicit schemes? It sounds like a good idea in theory, however it would be interesting to know if anyone has performed any side-by-side comparisons of speed and accuracy.It's more than a good idea You can work out the number of arithmetic operations for ADE vs CN by looking at the algo (hint: each LU costs 12N operations, where N is number of mesh points)First, ADE is a scheme from the 50's and it has various forms (Saul'yev, Larkin, Baraket). It's used in CFD and image processing.My article was a POC for the one-factor problems. It is used in practice.ADE is faster than CN (btw why use CN?) because no LU needed. In 2 factors ADE is 4 times faster than ADI/Splitting (which feel a wee bit long in the tooth nowadays), especially with embarassing parallel OpenMP. And for nonlinear PDE, CN not really.So, why not just have a go? it's easy to program. And in combination with domain transformation. ///I am using it for [3,5] factor models. But I need a 64-bit OS. The devil is in the details (mixed derivs, BC etc. etc.) And you need multi-arrays to store the data. In 3d on a slow laptop I get 80 seconds for 3 factor..SSRN
Last edited by Cuchulainn on March 18th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
Ciportne
Topic Author
Posts: 0
Joined: February 26th, 2010, 8:59 am

ADE vs Crank Nicolson - Comparative Test

March 19th, 2010, 12:21 am

Thanks Cuchulainn. I'll take a look at your paper. Was originally trying to implement Crank Nicolson for Arithmetic Asian Options from Vecer 2002 and I'm trying to figure out a way to speed it up.
 
User avatar
Cuchulainn
Posts: 22935
Joined: July 16th, 2004, 7:38 am

ADE vs Crank Nicolson - Comparative Test

March 19th, 2010, 5:56 am

QuoteOriginally posted by: CiportneThanks Cuchulainn. I'll take a look at your paper. Was originally trying to implement Crank Nicolson for Arithmetic Asian Options from Vecer 2002 and I'm trying to figure out a way to speed it up.You're welcome. I assume you are referring to his 2001 paper, eqs. 24, 25,? ADE should be easy to do in this case and you use my equations 30, 31 (btw in 31, the first V should be V(j, +1)) Btw what kind of boundary conditions are you using wih CN? Can you say what the response time of CN is? BTW the scheme is explicit and stable so don't worrry about delta_T = O(delta_S^2) issues.I have myself not tested performance differences in 1d but based on number of operations ADE will be faster. In 2d, 3d, it is a different story.
Last edited by Cuchulainn on March 18th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
vandervolt
Posts: 0
Joined: April 30th, 2007, 10:21 am

ADE vs Crank Nicolson - Comparative Test

March 21st, 2010, 1:55 am

Unrelated to the original question but that paper is nice. Cuch - you seem to have an endless reference list for all the classic numeric PDE papers by all the old greats. For a new phd student like me its great getting references to these historically important papers. Id love to see your list of (say) top ten papers ever on numeric PDEs - 1 being the greatest. Thoughts? Thanks in advance for the list 1.2.3.4.5.6.7.8.9.10.
 
User avatar
Cuchulainn
Posts: 22935
Joined: July 16th, 2004, 7:38 am

ADE vs Crank Nicolson - Comparative Test

March 21st, 2010, 4:05 pm

QuoteOriginally posted by: vandervoltUnrelated to the original question but that paper is nice. Cuch - you seem to have an endless reference list for all the classic numeric PDE papers by all the old greats. For a new phd student like me its great getting references to these historically important papers. Id love to see your list of (say) top ten papers ever on numeric PDEs - 1 being the greatest. Thoughts? Thanks in advance for the list 1. Yanenko, Marhcuk2. Lawson, Morris3. Ilin, El Mistikawy, Scharfetter-Gummel4. Thomas, Numerical PDE5. Saulyev 19646. the book on IR by Jessica James and Nick Webber (nice PDE approach)7. Godunov8. Richtmyer and Morton9. Tannenhill/Andersen/Fletcher10. Smith11. Fichera's work on PDE12. John Crank's book on moving boundaries13. Many more specialised ones in FinanceI'll try to draw up a list. The point is that many schemes were created in diferent fields to solve nasty problems and it's kind of incremental and ongoing. For example, the ongoing discussions here (with Alan, FinAlex, and others) would be useful to follow. Most of the solutions are from the 50's/60's.I have documented most of the precise references in the usual places , but I have filled in (no particular order) some names.However, parallel PDE/FDM originated in the last half of the 19th century. This gentleman is the originator.
Last edited by Cuchulainn on March 20th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
Ciportne
Topic Author
Posts: 0
Joined: February 26th, 2010, 8:59 am

ADE vs Crank Nicolson - Comparative Test

March 21st, 2010, 4:40 pm

QuoteOriginally posted by: CuchulainnYou're welcome. I assume you are referring to his 2001 paper, eqs. 24, 25,? ADE should be easy to do in this case and you use my equations 30, 31 (btw in 31, the first V should be V(j, +1))Thanks for the info, will take a look.QuoteOriginally posted by: CuchulainnBtw what kind of boundary conditions are you using wih CN? Can you say what the response time of CN is? BTW the scheme is explicit and stable so don't worrry about delta_T = O(delta_S^2) issues.Boundary conditions, PDE value at the top of the grid = z value at the top, value at bottom = 0. Note I am NOT using linear interpolation as suggested by earlier paper also we are using the 'Unified Asian Pricing" (2002) paper where the state variable is a martingale, hence the PDE is slightly different from the 2001 paper.For the continuous case for (h = 0.0005, dt = 0.00005) time is 500 seconds with the CN scheme. Unfortunately I'm having great difficulties as I do not have monotone convergence for the discretely sampled case. (e.g. weekly observations) (No problems with the continuous)QuoteOriginally posted by: CuchulainnI have myself not tested performance differences in 1d but based on number of operations ADE will be faster. In 2d, 3d, it is a different story. That sounds good, however I'm new to FD methods and I'm trying to get the CN scheme to work first!
 
User avatar
FaridMoussaoui
Posts: 327
Joined: June 20th, 2008, 10:05 am
Location: Genève, Genf, Ginevra, Geneva

ADE vs Crank Nicolson - Comparative Test

March 21st, 2010, 6:20 pm

QuoteOriginally posted by: CuchulainnHowever, parallel PDE/FDM originated in the last half of the 19th century. This gentleman is the originator. I don't recognize the image but I guess Schwarz.F.
 
User avatar
Cuchulainn
Posts: 22935
Joined: July 16th, 2004, 7:38 am

ADE vs Crank Nicolson - Comparative Test

March 22nd, 2010, 5:51 am

QuoteBoundary conditions, PDE value at the top of the grid = z value at the top, value at bottom = 0. Note I am NOT using linear interpolation as suggested by earlier paper also we are using the 'Unified Asian Pricing" (2002) paper where the state variable is a martingale, hence the PDE is slightly different from the 2001 paper.For the continuous case for (h = 0.0005, dt = 0.00005) time is 500 seconds with the CN scheme. Unfortunately I'm having great difficulties as I do not have monotone convergence for the discretely sampled case. (e.g. weekly observations) (No problems with the continuous)CiportneThese are very small mesh sizes. What happens when you take values like h = 0.01, for example? An interesting comparison is to take fully implicit (almost the same coding as CN) to see if you get any improvement. What's the form of your boundary conditions? And do you get spikes or oscillations in the solution?Farid,Yes, it's Schwarz. It seems that regionally additive schemes are more easily parallelised that multiplicative ones.
Last edited by Cuchulainn on March 21st, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
vandervolt
Posts: 0
Joined: April 30th, 2007, 10:21 am

ADE vs Crank Nicolson - Comparative Test

March 24th, 2010, 12:57 am

Thanks Cuchulainn,The only ones Ive looked at are Thomas and Richtmyer+Morton, but Ill try to get onto the others. Unlike other areas (like calculus, probability etc where the big names from the past and where they fit into the field is spoken about alot) Ive never seen too much about the historical development of the field of numeric computing/PDEs etc. For example everyone knows from doing undergrad stats the names of Bernoullis, Gauss, Laplace, Kolmogorov etc, but not alot about the people in the numeric maths/pde field.. Bity of a pity I think.So thanks
 
User avatar
Cuchulainn
Posts: 22935
Joined: July 16th, 2004, 7:38 am

ADE vs Crank Nicolson - Comparative Test

March 24th, 2010, 4:44 am

You're welcome. Maths departments with a Numerical Analysis chair would do these kinds of applied numerical subjects, so I suppose it's a niche kind of subject in that sense. Not every department would necessarily have it and it might be a part of Statistics, Engineering or similar. Nice thing about NA is that it is pure and applied.BTW good journals would beSIAM Numerical AnalysisMaths Computationetc. And maybe your bib has this serieshttp://www.amazon.com/Handbook-Numerical-Analy ... 646&sr=1-3 BTW Euler (and Gauss) was hot at numerical analysis (Euler method) http://eprints.kfupm.edu.sa/25166/1/25166.pdf http://history.siam.org/
Last edited by Cuchulainn on March 23rd, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
Ciportne
Topic Author
Posts: 0
Joined: February 26th, 2010, 8:59 am

ADE vs Crank Nicolson - Comparative Test

March 24th, 2010, 4:57 pm

Hi Cuchulainn,Mesh size was increased and everything works a lot better. Will post more info later, but busy right now but wanted to say thanks for all your help!
 
User avatar
Cuchulainn
Posts: 22935
Joined: July 16th, 2004, 7:38 am

ADE vs Crank Nicolson - Comparative Test

June 24th, 2010, 3:10 pm

For the one factor ADE here is the C++ source which can be integrated into OO framework. BTW we did it first in C# and ported to C++. There's a lot of syntax similarities.ade
Last edited by Cuchulainn on June 23rd, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
frenchX
Posts: 11
Joined: March 29th, 2010, 6:54 pm

ADE vs Crank Nicolson - Comparative Test

June 24th, 2010, 5:30 pm

Hi Cuchulainn,do you think it is possible to use the ADE method to solve this kind of equation? Homogeneous nonlinear Schrödinger Equation with Cubic NonlinearitiesIt is still a parabolic PDE but a nonlinear one which can collapse very easily if you do not add regularization terms.
 
User avatar
Cuchulainn
Posts: 22935
Joined: July 16th, 2004, 7:38 am

ADE vs Crank Nicolson - Comparative Test

June 24th, 2010, 6:57 pm

Bonsoir FrenchXADE can be used with NL systems, see section 4.2 of http://www.math.ust.hk/~masyleung/Repri ... h05.pdfThe main issue is that - as with the linear Schroedinger PDE - that the fd scheme is unitary and the solution in this case is a Cayley map. So, if important, you will need to check this with ADE.Hower, each sweep U and V in ADE is of the form that looks like a CM.QuoteIt is still a parabolic PDE but a nonlinear one which can collapse very easily if you do not add regularization terms.Can you explain please?
Last edited by Cuchulainn on June 23rd, 2010, 10:00 pm, edited 1 time in total.