Serving the Quantitative Finance Community

 
User avatar
DominicConnor
Topic Author
Posts: 41
Joined: July 14th, 2002, 3:00 am

PDE solvers

February 3rd, 2006, 9:33 am

What s/w do people recommend for general purpose solution of PDEs ?
 
User avatar
cosmologist
Posts: 2
Joined: January 24th, 2005, 8:08 am

PDE solvers

February 3rd, 2006, 10:22 am

MatLab, Mathematica or if you like Finite Element Domain Decomposition in C. want me to implement some stuff? tell me if you can 'make use of my expertise wherein both of us will be in a win-win situation. I won't mind if it is a win-lose situation provided you are the second boundary condition.cheers
 
User avatar
Cuchulainn
Posts: 22933
Joined: July 16th, 2004, 7:38 am

PDE solvers

February 3rd, 2006, 10:50 am

QuoteOriginally posted by: DCFCWhat s/w do people recommend for general purpose solution of PDEs ?Could you be more specific?Edit: The main methods are finite differences, finite volume and finite elements (FDM, FVM, FEM). There is also some interest in Meshfree methods. The most appropriate languages are Fortran and C++ with possibly C# as well. All other possibilities are not feasible IMO.I know some packages from the distant past but these are for heat flow, fluid mechanics, semiconductors and stress. It would be a huge job IMHO to apply many of these to QF. Of course everything is possible, time is the problem."Financial Engineering with finite elements" by Juergen Topper us the package PDE2D and it seems to be able to tackle several 2 and 3 factor problems with FEM. This book is well worth reading and you could start there. I recommend this book.On a related note my PDE/FDM book will be out in a month or so and I provide both a framework (that you can customise) and working C++ code for 1-factor and 2-factor problems. Then, by means of standardised interfaces customers can plug in their own code and algorithms. And we have two-way communication with Excel (Visualisation and Addins). Then we can also generalise it to N-factor problems by extending the code.Many PDE solvers are in Fortran and C and it is possible to tag on visualisers.In the the past (and now) NAG has a massive library and I think they have some PDE solvers.A number of unis are building solvers that could be use in QF. Here's a site that might be of relevanceOO Libraries FDMBOOK
Last edited by Cuchulainn on February 2nd, 2006, 11:00 pm, edited 1 time in total.
 
User avatar
g0rg
Posts: 0
Joined: February 3rd, 2006, 11:12 am

PDE solvers

February 7th, 2006, 10:55 am

As Cuchulainn said to get a feasible answer to your question you have to be more specific. For example, the deal.II package is a very popular C++ library for the solution of PDEs by finite element methods. It allows for mesh- and polynomial degree adaptivity of your choice (and your algorithm), as well as for discontinuous Galerkin approximations. It is easy to use and its documentation is quite good.Concerning the financial applications and SPDEs, the use of FEMs becomes very expensive as the number of degrees of freedom in, for example, discontinuous Galerkin FEMs is given by,where is the subdivision of the computational domain into elements , is the degree of the basis function (polynomial) on this element, and d is the dimension of the problem.If one still considers using FEMs for problems in multiple (>3) dimensions then the only chance to get through is to use the so-called sparse grid method which significantly reduces the number of DOF.Meshfree methods, like particle method, are becoming popular for some applications (for example when the geometry of your domain changes, e.g. simulation of an aribag in a car). The trick is that for their implementation most people ....... use the grid!!! :-)))) And, of course, there is a very thin line between a particle equation which describes your process well, and an equation which is rubbish.
 
User avatar
twofish
Posts: 0
Joined: February 18th, 2005, 6:51 pm

PDE solvers

February 7th, 2006, 3:21 pm

Any good review papers on meshfree methods in QF. This seems to be where smooth particle hydrodynamics fits in. What's interesting is that in the supernova field, people seem to have given up on mesh-free methods. The main problem is that mesh-free methods seem to work better if you have only one region which is "interesting" and in supernova, all regions are "interesting" so going mesh free doesn't buy you much.Also there are two different fields of PDE problems.....1) Ones where you keep the equation the same, and just change the boundary conditions from problem to problem2) Ones where the equation changes....1) is the case in much of engineering and its relatively easy to write a general purpose PDE solver (i.e. the airflow equations stay the same, you just put in a different shape wing)2) tends to be the case in QF, and that is harder because each new equation has its own set of "tricks"
 
User avatar
jfuqua
Posts: 6
Joined: July 26th, 2002, 11:41 am

PDE solvers

February 7th, 2006, 3:33 pm

You might want to check out some of the papers by the first author at www.math.IIT.eduFasshauer Greg, A. Khaliq, David A. Voss 'A Parallel Time Stepping Approach Using Meshfree Approximations For Pricing Options With Non-Smooth Payoffs' Bachelier Conference 2004Fasshauer Greg, A. Khaliq, David A. Voss 'Using Meshfree Approximations for Multi-Assest American Option Problems' 2003 Pooley David, Peter Forsyth, Kenneth Vetzal,R. Simpson 'Unstructured Meshing for Two Asset Barrier Options' App.Math.Finance 3/2000 [not sure if this is relevant]Marcozzi Michael, S. Choi, C.S. Chen 'On the Use of Boundary Conditions for Variational Formulations Arising in Financial Mathematatics' Applied Mathematics & Computation 124 (2001) [option-pricing]<Radial Basis Functions> Marcozzi Michael, S. Choi, C.S. Chen 'RBF & Optimal Stopping Problems;An Application to the Pricing of Vanilla Options on One Risky Asset' Boundary Element Tech. XIV, ed. C. Chen 'Computational Mechanics Pub' 1999
 
User avatar
kusa
Posts: 0
Joined: September 8th, 2005, 9:35 pm

PDE solvers

February 20th, 2006, 12:32 am

there are no general purpose PDEs solvers* first you have to find the type of the equation/system you need to solve.(elliptic equations are different from hyperbolic/parabolic in terms of solvers)Anything that include drift only will give you the hyperbolic one and any extent of diffusion (=dW/random walk/ volatility) in your problem will make it parabolic.*Mathematica implements the method of lines in its solver. It is quite generic.If you need to solve something once in a while it may work. If you needa solver for a particular application that solve PDEs of a certain type andyou plan to use on a continuous basis to make decisions depending on the results, then you'd better hire somebody in the field to do the job.*In general (assuming your equations are most likely hyperbolic/parabolic), any parabolic solver that uses methods of lines will work for you (it is not the best, but most generic). You may find many if you search in Google for+"Method of lines" +Parabolic +solver. If you want your solver to work wellfor pure drift (no diffusion/random walk/volatility) or little diffusion you should look for a flux corrected solver or use fist order accuracy.*In order to use any solver you should be at least able to find how many and what kind of boundary conditions you need.Hope this helps. Good luck
 
User avatar
Cuchulainn
Posts: 22933
Joined: July 16th, 2004, 7:38 am

PDE solvers

February 20th, 2006, 3:56 pm

QuoteIf you want your solver to work wellfor pure drift (no diffusion/random walk/volatility) or little diffusion you should look for a flux corrected solver or use fist order accuracy.Yes, van Leer is very good.Another solution that I did was to use *exponentially fitted schemes* that are suitable for these convection-dominated problems (small volatility) These schemes preserve some of the invariant properties of the original problem.
 
User avatar
zeta
Posts: 26
Joined: September 27th, 2005, 3:25 pm
Location: Houston, TX
Contact:

PDE solvers

February 22nd, 2006, 6:55 pm

I suspect Cuch was referring to this earlier (cf "from the distant past") but there is always TTGU in fortran. As the experts could tell you (better than I), it's a bit limited