SERVING THE QUANTITATIVE FINANCE COMMUNITY

tagoma
Topic Author
Posts: 18382
Joined: February 21st, 2010, 12:58 pm

### the meshless method ?

hello everyone.you may be interested in the followings on FME. it is from the academic world, and from French authors (that is maybe not well-know) :Finite Element Methods for Option PricingFreeFem++ is an implementation of a language dedicated to the finite element methodCf chapter 4 on FEM in : Computational Methods for Option Pricing
Last edited by tagoma on January 9th, 2011, 11:00 pm, edited 1 time in total.

Cuchulainn
Posts: 63232
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### the meshless method ?

Adding to the list, The FEM book on QF by Juergen Topper (Wiley)@Costeanu,Have you investigated ADE method?
Last edited by Cuchulainn on January 9th, 2011, 11:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Posts: 63232
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### the meshless method ?

Cf chapter 4 on FEM inThe FEM uses domain truncation. Now if you transform to (0,1) you get a PDE in conservative form _immediatement_ and then integration by parts just gives all BC for free (see "FDM quiz" on this channel). The semi-discrete schemeMU_t + KU = Fcan be solved using (explicit) ADE sweeps. It could be a nice project for MSc student. An good exercise is to explicitly work out the tridiagonal matrices M and K using hat function and solve using ADE as a test. It is not so much work, just simple integration.
Last edited by Cuchulainn on January 9th, 2011, 11:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Costeanu
Posts: 189
Joined: December 29th, 2008, 5:33 pm

### the meshless method ?

Hi Daniel, In general, I don't think boundery conditions are that important. If you go 5 sigma away from the mean, what's the probability to hit the boundary during the life of some trade? Quite small. If you put zeros everywhere on the boundary, it's not going to affect the result. On the other hand, you need to sample from a space that may be too large, and so the calculation may be too slow. In that case you may need to think about boundary conditions. The curse of dimensionality in my mind affects primarily the interpolation, and then it has ripple effects in integration, PDE's, etc. And instead of interpolation I should probably say function approximation.For example, if I have a function in 1-dim, I may approximate it using its values at a discrete number of points (Lagrange interpolation, or splines), or its values and the values of its derivatives (Hermite interpolation), or as a sum of basis functions (Fourier series, wavelets, kernel regression). No matter how I do it, when I increase the number of dimensions I need to use more points, more basis functions, or generally speaking more computer memory. And more here means exponentially more. Now all numerical schemes for evolution PDE's will involve approximating the solution at various time-points somehow. How we go from one time-point to another is quite irrelevant; even if we had a perfect crystall ball we'd still need to calculate the approximant, and this requires that exponential amount of memory, and to do this calculation we need an exponential amount of time. Monte Carlo goes around this by not calculating an approximant at each point in time, only at one point in time and space (i.e. now and at the current market price). Regarding your question if I looked at ADE, yes I did. Not sure why, but my results showed it's not as good as Crank-Nicolson, but then I didn't spend too much time with this. I tried however to generalize ADE to use higher derivatives, and unfortunately the only thing I could come up with was some unstable schemes. Best,V.

Cuchulainn
Posts: 63232
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### the meshless method ?

QuoteIn general, I don't think boundery conditions are that important. If you go 5 sigma away from the mean, what's the probability to hit the boundary during the life of some trade? Quite small. If you put zeros everywhere on the boundary, it's not going to affect the result. This is the far-field BC you are referrng to I presume? At the near field (all S == 0) then we need to solve a lower-order PDE, yes? For example, a 3 factor PDE has a BC on 6 rectangles and these are non-trivial. It would be great to be able to simplify BC but I think it has not been done yet. QuoteRegarding your question if I looked at ADE, yes I did. Not sure why, but my results showed it's not as good as Crank-Nicolson, but then I didn't spend too much time with this. I tried however to generalize ADE to use higher derivatives, and unfortunately the only thing I could come up with was some unstable schemes. ADE is unconditionally stable, always. In general, it is preferable to do domain transformation and this helps with BC. And the convection terms is an issue. If you like to post yoir scheme we could have a look at it. http://www.math.ust.hk/~masyleung/Reprints/leuosh05.pdf
Last edited by Cuchulainn on January 10th, 2011, 11:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Costeanu
Posts: 189
Joined: December 29th, 2008, 5:33 pm

### the meshless method ?

I prefer to think in terms of standard deviations away from the mean. In these units 0 is as far away as +infinity. So I guess when you change your domain, you can choose to make the new domain [0, 1]^n, or R^n. In the first case you need boundary conditions, in the second you don't. However, when you have a diffusion process where the coefficients are so that you can hit the boundary, then you certainly need to think about boundary conditions. But then you also need to think whether the process is appropriate for the model. As for ADE being unconditionally stable, that's indeed the case, at least in theory. In practice, I was able to find combinations of parameters so that the scheme is not stable anymore, so in general you can't always trust blindly the theory. Best,V.

Cuchulainn
Posts: 63232
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### the meshless method ?

QuoteAs for ADE being unconditionally stable, that's indeed the case, at least in theory. In practice, I was able to find combinations of parameters so that the scheme is not stable anymore, so in general you can't always trust blindly the theory. For which kind of PDE? And what kinds of parameters? I would be interested in your example.I think the way you approach BC and lack of domain transformation might be an issue. But a full description would pinpoint the problem.Are you using convexity at far field by any chance?edit: forgot to say there are 2 kinds of instability 1) dynamic (due to delta_t versus h) and 2) static (convection-dominance). I think 2) rather than 1).
Last edited by Cuchulainn on January 10th, 2011, 11:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Posts: 63232
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### the meshless method ?

No?
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Costeanu
Posts: 189
Joined: December 29th, 2008, 5:33 pm

### the meshless method ?

Cuchulainn
Posts: 63232
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### the meshless method ?

Hi Costeanu,Yes. The question was hanging in mid air. So, I asked it again. If you get a chance to get the experimental results it would be interesting to see. Thanks.The esssence of ADE is how it handles time. So, it would not be out of place. Use RBF in space, ADE in time. Of course, there is an ADE thread. QuoteIn my opinion all PDE schemes suffer from the curse of dimensionality. Thus we can only hope to conquer one dimension at a time. If somebody comes up with a scheme that can handle 5D+time, or 6D+time, that's quite an achievement. But I'm not very hopeful this can be achieved without an adaptive scheme. I don't see that conquering dimensionality has a direct relationship with adaptive meshes. The latter are for other reasons?It's a memory problem, mainly? With a 64-bit machine then 5d will be possible.edit: interesting observation: using adaptive method in Larkin ADE destroys unconditional stability whereas it is unconditionally stable for uniform mesh.
Last edited by Cuchulainn on January 19th, 2011, 11:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Costeanu
Posts: 189
Joined: December 29th, 2008, 5:33 pm

### the meshless method ?

Hi Daniel,Memory problems translate into time problems. If you have a 100 billion nodes per time point, the scheme will be at least as slow as a Monte Carlo with a 100 billion paths. As for the ADE that I have played with, I did a straight implementation of Saulyev's scheme. I didn't know that there are better versions such as Barakat and Clark and Larkin. If I have time, at some time I'll take a look at those scheme as well. Best,V.

Cuchulainn
Posts: 63232
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### the meshless method ?

QuoteAs for the ADE that I have played with, I did a straight implementation of Saulyev's scheme. I didn't know that there are better versions such as Barakat and Clark and Larkin. If I have time, at some time I'll take a look at those scheme as well. Costeanu,Ah, Saul'yev classico is called conditionally consistent, so the k/h -> 0 in a uniform way, a bit like Dufort-Frankel. That's probably why the erratic behaviour. 99% of fdm schemes are unconditionally consistent.BC is much better and more amenable to truncation analysis. All the examples in my article use it. regardsDaniel
Last edited by Cuchulainn on January 19th, 2011, 11:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

sebgur
Posts: 10
Joined: September 25th, 2008, 6:58 am

### the meshless method ?

Costeanu
Posts: 189
Joined: December 29th, 2008, 5:33 pm

### the meshless method ?

Hi sebgur, Thanks for sharing your experience. I hope you'll keep getting nice results as you try higher dimensions, and new option types. Please keep us posted. Regarding your remark that the RBF method should converge quickly due to its spectral nature, well, this spectral thing can be a blessing but also a curse. What I have in mind is the Gibbs phenomenon, with its close but more frightening cousin, the Runge phenomenon. When the function to be approximated is smooth, spectral methods are beautiful. When you have some discontinuities, you generally have oscillatory phenomena. Since many options contain either early maturity triggers (so they are cousins of barrier options) or some type of embedded binary option, discontinuous payoff is a fact of life. I suppose figuring out how to deal with these discontinuities in the context of RBF would be a very interesting long-term project. Unfortunately nobody has undertook it so far, or even mentioned that it's a problem at all. Best,V.

t2011
Posts: 4
Joined: May 31st, 2011, 4:15 pm

### the meshless method ?

Hi,For my engineering school, we have a project on radial basis functions to do.The teacher gave us the article: Option Pricing with Radial Basis Functions: A Tutorial: Wilmott Magazine Article by Alonso Peña.The project is to price options using radial basis functions. I code in C#. With XLW, I can export the C# functions in Excel. I use dnAnalytics for matrix operations.For the moment, I try to price an European call.The problem I'm facing is that I get wrong results. I've taken these parameters:N 30T 1M 30a 0b 3,912023005c 0,53958938E 15r 0,05sigma 0,3theta 0,5S 15And I got the price of the call= -1,524E+189.The problem is that all the students got bad results. The teacher took the time to see my code and said it was correct.Here's the C# code:

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

 JOBS BOARD

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

GZIP: On