Serving the Quantitative Finance Community

 
User avatar
Fozzie
Posts: 0
Joined: April 11th, 2002, 4:21 pm

Explicit Finite Differences and PWIQF

September 26th, 2002, 8:03 am

And to think, I only joined this debate to try and scab a free book off Paul... Yep, looks ok to me. Of course, it'll take longer to run, which is why you want to choose as high a value as poss. I assume you've tried the smaller dt and it works too?fozzie
Last edited by Fozzie on September 25th, 2002, 10:00 pm, edited 1 time in total.
 
User avatar
plessas
Topic Author
Posts: 2
Joined: March 9th, 2002, 10:23 pm

Explicit Finite Differences and PWIQF

September 26th, 2002, 1:14 pm

Everything has cleared last night at around 4am My explicit code is finally behaving very good and both you and books are right!You can go back to singing in the show fozzie, thanx for all the help rgds,DimitrisPS. Look for the Implicit Finite Differences topic which I am about to create once I build my IFD model and see it does not work as expected
 
User avatar
plessas
Topic Author
Posts: 2
Joined: March 9th, 2002, 10:23 pm

Explicit Finite Differences and PWIQF

September 26th, 2002, 1:16 pm

Oh and in case you are wondering the error was in transforming the formulas to incorporate dividends.Well that was the 14th error actually but who counts rgds,Dimitris
 
User avatar
Fozzie
Posts: 0
Joined: April 11th, 2002, 4:21 pm

Explicit Finite Differences and PWIQF

September 26th, 2002, 3:55 pm

Blimey, hope you're not losing too much sleep over this stuff!> Everything has cleared last night at around 4am Right, back to the jokes, waka waka waka... fozzie
Last edited by Fozzie on September 25th, 2002, 10:00 pm, edited 1 time in total.
 
User avatar
plessas
Topic Author
Posts: 2
Joined: March 9th, 2002, 10:23 pm

Explicit Finite Differences and PWIQF

September 26th, 2002, 4:43 pm

Nah... I prefer to work at night rgds,Dimitris
 
User avatar
B2
Posts: 0
Joined: July 27th, 2002, 6:43 pm

Explicit Finite Differences and PWIQF

October 9th, 2002, 2:51 am

Just one quick point:You actually DON'T want to have a grid line fall exactly on the strike; that's the absolute WORST place to put it and it causes oscillations in your solution.The best choice of grid spacings would have the strike fall exactly halfway between two gridlines. You want to minimize the disruptiveness that the first timestep backwards is going to have to deal with in your smoothing.
 
User avatar
Paul
Posts: 7055
Joined: July 20th, 2001, 3:28 pm

Explicit Finite Differences and PWIQF

October 9th, 2002, 6:04 am

Good point, B2. But as often happens, a numerical issue like that always makes me ask about the validity of the model itself. The difference between the diffusion equation arising from 'nature' and the Black-Scholes equation is possibly important. In nature time is continuous and you can certainly assume that space is continuous unless working on microscopic lengthscales. However in finance there will always be a limit to how often you can delta hedge, and stock prices only move in discrete amounts. This is important whenever there is a discontinuity in the payoff gradient, or, even worse, when there is a discontinuity in the payoff itself. Smoothing the payoff only addresses a numerical question. There are still modelling questions to be answered!P
 
User avatar
WaaghBakri
Posts: 1
Joined: March 21st, 2002, 4:07 am

Explicit Finite Differences and PWIQF

October 11th, 2002, 6:05 am

The best choice of grid spacings would have the strike fall exactly halfway between two gridlinesLoosely, and I'm speculating, what that effectively does is numerically change the payoff function such that you're no more sampling precisely at the 45 degree kink. By placing the nodes across the strike you got a three-piece linear payoff with two gentler kinks....and therefore for sake of robustness of the scheme implementation one wonders why not impose directly a approximate payoff with gentler kinks but one that's close to the ramp shape?
 
User avatar
WaaghBakri
Posts: 1
Joined: March 21st, 2002, 4:07 am

Explicit Finite Differences and PWIQF

October 11th, 2002, 6:09 am

sake of robustness of the scheme implementation The point being that one then doesn't have to sweat it out over the grid layout ......
 
User avatar
B2
Posts: 0
Joined: July 27th, 2002, 6:43 pm

Explicit Finite Differences and PWIQF

October 12th, 2002, 11:09 pm

you're right waagh, you can do it either way. but most people prefer to change their grid layout (which is a NUMERICAL issue) rather than change their contract payout through some kind of "smoothing" mechanism (which is a FINANCIAL issue, in my mind). incidentally those who DO choose to go your route typically just do a simple arithmetic average.also, paul, you're absolutely right that it only adresses the numerical issue. but i'd much rather have myself as a trader deal with discreteness complications, risk preferences, and imperfect hedging rather than have a model play around with it. it's the same reason that no trader in his right mind will ever use a poisson model for pricing purposes.
 
User avatar
WaaghBakri
Posts: 1
Joined: March 21st, 2002, 4:07 am

Explicit Finite Differences and PWIQF

October 13th, 2002, 5:38 am

On further thought, it seems rather interesting. If one used a clipped-off payoff (smoothened payoff), even before one's begun the solution step we've kind off knocked off some of the high frequency spectral content. On the other hand, if we started off with the exact ramp payoff, we rely a bit on the grid spacing to filter out some spectral components. The latter happens irrespective of the payoff modifications or not. So I suppose one is better off starting off with the exact payoff, discontinuities & all, and let the grid do the filtering...
 
User avatar
B2
Posts: 0
Joined: July 27th, 2002, 6:43 pm

Explicit Finite Differences and PWIQF

October 14th, 2002, 11:49 pm

one thing that people do is throw in a few really thinly sliced fully implicit steps near any big payoff discontinuities; this achieves the smoothing but you still some bit of oscillations and you're stuck doing extra timesteps; kinda defeats the point but that's what some players do.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Explicit Finite Differences and PWIQF

September 9th, 2004, 12:36 pm

You can find some FDM papers on www.datasim-component.com