- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

Here an example of the output when testing a scheme for a 2-factor problem (exchange option). Still experiment with BC but we can now compare different schemes over the whole domain (btw using Excel).

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

spread put 400 steps

Last edited by Cuchulainn on February 12th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

Spread call, with meshes of size 50, 100, 200.

Last edited by Cuchulainn on February 12th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

Finally, spread call on mesh 400 and 300, respectively400 300

Last edited by Cuchulainn on February 12th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

In the recent past the issue of how to approximate mixed derivatives was an issue (Numerical::CFD thread ). There are several options whose relative merits we want to analyse. Here is Janenko for rho = -0.99 and T = 1 for an exchange option using 300 steps. The max error is 0.009 at a given point.Stress test.(Remark: this kind of visualisation is a bit static, would be better to have real 3d objects as in VRML and its successor).

Last edited by Cuchulainn on February 13th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

NX = NY = 300rho = -0.99NT = 300 NT = 500 NT = 700 NT = 1000

Last edited by Cuchulainn on February 13th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

rho = -0.5 (benign)NT = 700 NT = 300

Last edited by Cuchulainn on February 13th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

QuoteOriginally posted by: rmaxWhy do you get the saw tooth profile?1. I took NX = NY = NT = 300 which is very conservative.2. Took absolute value of FD solution vs Margrabe solution.3. Almost perfect correlation, mixed derivatives may dominate. It is a stress test that kills many schemes.4. Payoff has a discontinuity on S1 = S2, has not been smoothed.Having said that, Janenko scheme gives max error 0.009. BTW many examples/articles take rho in the safe zone [-0.5, 0.5] Now, my new 2 posts take NX = 300 = NY with various NT (500, 700, 100). At some stage increasiing NT has no effect and then we can set NX = NY = 400 etc.As I mentiiond, Excel is not optimal, e.g. cannot create other graph from 400X400 matrix. Saw OpeVRML C++ boost library.

Last edited by Cuchulainn on February 14th, 2012, 11:00 pm, edited 1 time in total.

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: rmaxWhy do you get the saw tooth profile?1. I took NX = NY = NT = 300 which is very conservative.2. Took absolute value of FD solution vs Margrabe solution.3. Almost perfect correlation, mixed derivatives may dominate. It is a stress test that kills many schemes.4. Payoff has a discontinuity on S1 = S2, has not been smoothed.Having said that, Janenko scheme gives max error 0.009. BTW many examples/articles take rho in the safe zone [-0.5, 0.5] Now, my new 2 posts take NX = 300 = NY with various NT (500, 700, 100). At some stage increasiing NT has no effect and then we can set NX = NY = 400 etc.As I mentiiond, Excel is not optimal, e.g. cannot create other graph from 400X400 matrix. Saw OpeVRML C++ boost library.For SV models, large |rho| is also a difficult numerical regime. When you get to it, will be interesting tosee your error plots for, say, Heston model with rho in (-1,-0.9) combined with volatility of volatility ~ O(1) and also small (not sure which is the more difficult for pde's For example, my OptionCity calculator uses the Leisen lattice algorithm and this has a specific limitation: |rho| < Sqrt[3/4]I'll have to see how Mathematica's NDSolve does for some extreme rho.

Last edited by Alan on February 14th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

Alan,I am rounding off my investigations on two-assets (in between the other duties) and even for large rho OK.In fact, all I need is that the full Heston IBVP (PDE + domain) be specified and my ADE can use it as a black box using well-known UDT(). Ideally, absorbing BC would be great, otherwise need to modify the BC.This is the style for 2-factor options. I have the coefficients somewhere for Heston, but have forgotten/don't know BC for S and v (Fichera say solve a 1st oder system at v = 0, but can it be done more easily??)

Last edited by Cuchulainn on February 14th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

The input for exchange option isOne advantage: the visualisation is an EWS (Early warning system), some BC will not be good.

Last edited by Cuchulainn on February 14th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

Transformation to UDT is

Last edited by Cuchulainn on February 14th, 2012, 11:00 pm, edited 1 time in total.

QuoteOriginally posted by: CuchulainnAlan,I am rounding off my investigations on two-assets (in between the other duties) and even for large rho OK.In fact, all I need is that the full Heston IBVP (PDE + domain) be specified and my ADE can use it as a black box using well-known UDT(). Ideally, absorbing BC would be great, otherwise need to modify the BC.This is the style for 2-factor options. I have the coefficients somewhere for Heston, but have forgotten/don't know BC for S and v (Fichera say solve a 1st oder system at v = 0, but can it be done mote easily??)Heston at v=0 is exactly the same discussion we already had for CIR at r=0 in this threadYou may recall that I argued strongly against this notion of a separate (uncoupled) pde at the boundary, as thedifference approx there is stronly coupled to the interior -- recall you came to agree with that. If you apply absorption at v=0, just like CIR you will get a *different* solution in the hitting regime, just like theabsorbing CIR solution is different than the (orig. 1985) CIR solution.

Last edited by Alan on February 14th, 2012, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**59714**Joined:****Location:**Amsterdam-
**Contact:**

Quotevolatility of volatility ~ O(1) and also small (not sure which is the more difficult for pde's Small is doable (Roelof has done it) but a pain, I have no idea O(1) (V = S, 0 etc.).For SABR I know it is a big issue at v ~ 1.

Last edited by Cuchulainn on February 14th, 2012, 11:00 pm, edited 1 time in total.

GZIP: On