SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
ferdelo
Topic Author
Posts: 9
Joined: September 11th, 2016, 8:31 am

Cheyette Unstability in PDE

January 8th, 2017, 7:00 pm

I have implemented the Cheyette model (with linear local volatiltiy) in PDE by the finite difference Method. I use standard ADI methods (in the test i am talking about i use the Craig Sneyd one). I shallow describe what i do in bullet points:
  • Domain for X an Y: I solve a system of diff equations to get the 1st, 2nd, and 3rd moment of X and 1st and 2nd moment of Y. Then i get the equivalent log-normal displaced process for X and the gaussian one for Y. 
  • Differential operator for X: I use a tridiagonal operator for X with a first order upwind scheme for the first order derivative (this does not significant affect the results)
  • Differential Operator for Y: In the Y-direction i apply a change of variable as described in Piterbarg and Andersen's book. I really solve in a variable where the mean of y is substracted. I have implemented two different discretizations schemes for the derivative in Y. 
    1. Upwind Scheme: Use of two point approx for the derivative according to the sign of the Y-drift.2. 5 point approximation: i fit a forth order polinomial and derive that polinomial 
  • Boundary Conditions: I assume that second derivatives (in both directions) go to zero at the boundaries.
In order to test the implementation i value a forward start IRS. As this instrument is model-independent i use the analytical value as benchmark for the PDE. I have tried different mean reversion values (keeping constant the price of the same set of market swaptions), The results obtained are not satisfactory.
  • For positive mean reversions (or moderate negative ones) both schemes (1st order upwind scheme and five-point approximation)  behaves OK. I have tried up to a 30y-20y Swap.
  • For negative mean reversions, results start worsening: For -10% values (for mean reversion) 1st order upwind scheme start getting unstable for IRS starting in 20y time. The five point discretization works much worse for negative values of the mean reversion. With the latter,  while killing the volatility (and keeping the XY domain fixed) i recover Values for the IRS (at time 0) extremely big (in absolute values) at both extremes (I am not sure if in this case the solver for the penta-diagonal system migh not be working properly for high values of the npv) . 
I have tested every piece of code separately and i have not found anything wrong (this does not mean that this cannot be the case) 

I would highly appreciate any comment or suggestion that helps me to find where the problem is...
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Cheyette Unstability in PDE

January 8th, 2017, 7:39 pm

Hard to say because you don't provide the detailed FD scheme. Having said that nearly everyone never gets Cheyette/Asian right on the first attempt. Why? My hunch is that many quant don't get convection-diffusion PDE. Then the penny drops. And ADI is a solution but just so so IMO.

So, you are saying positive mean reversions is OK for all parameter values but negative MR goes wrong, all other things kept the same?

Here is a discussion
viewtopic.php?f=11&t=56033&hilit=pde&start=15

To get feedback I suggest:

1. post the FD equation.
2. Use upwinding/downwinding depending on the sign of convection term. 

https://en.wikipedia.org/wiki/Upwind_scheme


penta-diagonal system
????

Have you tried the Method of Lines? Saves all that ADI hassle.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
ferdelo
Topic Author
Posts: 9
Joined: September 11th, 2016, 8:31 am

Re: Cheyette Unstability in PDE

January 8th, 2017, 8:35 pm

Cuchulainn, thanks for your quick reply.

When i said "upwind scheme" i meant upwind/downwind scheme. The penta-diagonal system is because i discretize the first order derivative (in one of the implementatios) in y-direction with a 5 point scheme so a I have to solve a pentadiagonal system when i solve implicitly in the y-direction.

Thanks for the link. I already read the book.

I can give You much more detail on what i am doing. let me write with detail how the operators (and equations ) are like and i will post it back.

Thank You very much in advance...
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Cheyette Unstability in PDE

January 8th, 2017, 9:03 pm

No problem, you're welcome.. Could you refresh my memory by just writing down the PDE and how you do the splitting? AFAIR there is no correlation so I'm a bit confused by that penta system.

OK, I have the PDE from my book. So, in x it's just convection-diffusion  and y is pure convection. My exponential fitting might help if there are problems in x, esp.. for large convection.

It's very similar to Asian PDE/FDM, maybe benchmark it?
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Cheyette Unstability in PDE

January 9th, 2017, 11:48 am

Here is an article by Wilmott, Lewis and Duffy on an Asian-style PDE in which upwinding etc, was  an attention point as well.
http://onlinelibrary.wiley.com/doi/10.1 ... 6/abstract

In y you only have 1 BC depending on sign of convection term?
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Lapsilago
Posts: 259
Joined: October 15th, 2004, 7:36 am
Location: Germany

Re: Cheyette Unstability in PDE

January 9th, 2017, 1:10 pm

Hi ferdelo,

is this the model from Back to the Future from Andreasen? 

Which programming language did you use? Could you post the test case (yield curve, detailed outline of the contracts,...)

Do you have an MC of this model up and running for comparison?

Best regards,
Lapsi
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Cheyette Unstability in PDE

January 9th, 2017, 1:42 pm

Hi ferdelo,

is this the model from Back to the Future from Andreasen? 

Which programming language did you use? Could you post the test case (yield curve, detailed outline of the contracts,...)

Do you have an MC of this model up and running for comparison?

Best regards,
Lapsi
Good one!
My recollection was that this was the original Cheyette and ADI
https://www.researchgate.net/publicatio ... ette_Model

A simple question is what is the compelling reason to use ADI for this 1 1/2 d problem?
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
ferdelo
Topic Author
Posts: 9
Joined: September 11th, 2016, 8:31 am

Re: Cheyette Unstability in PDE

January 9th, 2017, 10:50 pm

Thanks Cuchulain and Lapsilago for your replies..!!

I have written with some detail the discretization i made to solve the problem (as Cuchulain said, it is the local vol model proposed by Andreasen in "Turbo charging .." ).(perhaps there is something i misunderstood... )

@Lapsilago: The code is written in C++. The test case is simple, i have reduced the test to an IRS forward start (in 20 y time) with flat curve for both OIS and libor, The parameters are result of the calibration to the ATM and skew of a smile for a reference 20y-20y. I play with the rev. mean and see how the model deteriorates (at least in my implementation) as the rev. mean becomes negative.
I haven`t implemented it, in MC (to use it as a benchmark). I just use analytical prices for IRS or Swaptions to which i have calibrated the model to (with some error on the approximation).

@Cuchulain: which method would you use to evolve the PDE in time.? The method of lines (as you mentioned below .. ?)

is there any coordinate transformation suitable to this problem to optimise the mesh resolution (eg, the hyperbolic one proposed in Tavella's etc..?


Thx for your help ..
Attachments
Cheyette_PDE_Wilmott.pdf
(48.13 KiB) Downloaded 97 times
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Cheyette Unstability in PDE

January 10th, 2017, 9:35 am

Thanks for the pdf.

Bad news is this FD scheme needs to go back to the drawing board .. it looks horrendous. It makes heavy weather in discretiising the dV/du term.

1. Ghost points
2. 5-point stencil
Asking for trouble. What's the rationale/motivation? What about a simpler model?

On time discretisation you don't mention if implicit, CN etc.

MOL (C++, NDSOLVE in Mathematica) is at least a stable alternative

viewtopic.php?f=34&t=94057&p=662845&hilit=BOOST#p662845
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Cheyette Unstability in PDE

January 10th, 2017, 11:37 am

Here is a relevant thesis from one of my MSc students at Birmingham. You might find it interesting because it is similar to Cheyette in a number of ways.
Attachments
Dissertation Zao Lin_V3.pdf
(1.76 MiB) Downloaded 74 times
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Billy7
Posts: 282
Joined: March 30th, 2016, 2:12 pm

Re: Cheyette Unstability in PDE

January 10th, 2017, 12:11 pm

On time discretisation you don't mention if implicit, CN etc.
He does say it's ADI Craig-Sneyd.

Ferdelo, I'm not against 5-point stencils in general (or even ghost points for that matter) but this 5-point stencil is still a central discretization with 2 points downwind for a convective term, so I agree with Cuchulainn, that's obviously asking for trouble. The real question is why doesn't simple 2-point upwind work for you. Have you by any chance messed up the downwind/upwind sign? I always do a stupid check like that just to make sure. Your pdf does seem to indicate that but I may be wrong.
If that's not it then I'd plot the results, have a visual. Are there oscillations, does the solution really have enough space to reach zero gamma at the boundaries as your boundary conditions assume, etc. And by the way, don't any of the references (books/papers) you have on this mention the boundary conditions they used? 
Last edited by Billy7 on January 11th, 2017, 10:55 am, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Cheyette Unstability in PDE

January 10th, 2017, 12:47 pm

On time discretisation you don't mention if implicit, CN etc.
He does say it's ADI Graig-Sneyd.

Ferdelo, I'm not against 5-point stencils in general (or even ghost points for that matter) but this 5-point stencil is still a central discretization with 2 points downwind for a convective term, so I agree with Cuchulainn, that's obviously asking for trouble. The real question is why doesn't simple 2-point upwind work for you. Have you by any chance messed up the downwind/upwind sign? I always do a stupid check like that just to make sure. Your pdf does seem to indicate that but I may be wrong.
If that's not it then I'd plot the results, have a visual. Are there oscillations, does the solution really have enough space to reach zero gamma at the boundaries as your boundary conditions assume, etc. And by the way, don't any of the references (books/papers) you have on this mention the boundary conditions they used? 
I agree, but CS is based on a time discretization so I was asking explcitly to double check ;) So CS Is based on a more fundamemental scheme and that is called theta method. Since there are no mixed deriivatives, why use CS?

Actually, CS was invented by Samarski in 1964! The West found out in 1989.

99% of articles never explain boundary conditions. Keeps people guessing.
 Linearity BC for Y is crazy IMO.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
ferdelo
Topic Author
Posts: 9
Joined: September 11th, 2016, 8:31 am

Re: Cheyette Unstability in PDE

January 10th, 2017, 1:27 pm

Cuchulain thank you very much again for your reply (and sincerity :) )

1. Ghost Points: I would say that the scheme (i described) remains the same without need of the ghost point: In the case of the 2-point upwind scheme, By defining the grid u_k for all k = 0, ..N; defining the diff operator for k=1, .., M-1  that multiplies V_1, V_{M-1} and defining V_0 and V_M (within the grid) in terms of V_1, V_2 and V_{M-1}, V_{M} by means of the soft condition and getting them back to the operator (the same for the 5-point one).

2. 5 Point Stencil: Many people advocates for this discretization when solving this kind of PDE. I just try to make it working to benchmark the other discretization.

3. Which BC would u use for Y .. ?

4. For the implicitness of the scheme i use either theta = 1/2 or 1.

@ Billy: Thanks for your time. You are right and the upwind sign is changed in the pdf (not in code though i ckecked it ..!). I haven't read too much on boundary conditions for concrete problems more than shallow descriptions (does'n mean there don't exist) . I attach a paper that uses the 5-point discretization with null 2nd derivative at the boundary (cheyette applied to credit).
Attachments
Modeling_credit_spreads_with_the_Cheyette_model_an.pdf
(236.04 KiB) Downloaded 60 times
 
User avatar
Billy7
Posts: 282
Joined: March 30th, 2016, 2:12 pm

Re: Cheyette Unstability in PDE

January 10th, 2017, 1:41 pm

 Since there are no mixed deriivatives, why use CS?
I was wondering the same, then I saw that Andreasen in the 2001 paper ferdelo is based on says CS because it has better inherent oscillation damping abilities (than the original ADI). May well do, don't know tbh.
Ferdelo, what other heuristic tests have you done, is the problem alleviated when you increase the number of time steps maybe? Thanks for the paper, this one at least it gives enough detail!
 
User avatar
Cuchulainn
Posts: 61574
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Cheyette Unstability in PDE

January 10th, 2017, 3:10 pm

 Since there are no mixed deriivatives, why use CS?
I was wondering the same, then I saw that Andreasen in the 2001 paper ferdelo is based on says CS because it has better inherent oscillation damping abilities (than the original ADI). May well do, don't know tbh.
Ferdelo, what other heuristic tests have you done, is the problem alleviated when you increase the number of time steps maybe? Thanks for the paper, this one at least it gives enough detail!
I vaguely remember asking long time ago who CS for Cheyette. I was assured by J that it was the best as all the other options had been tried. 

<QUOTE>
J himself said it took him a few years to have the Cheyette model work properly
http://www.math.ku.dk/~rolf/nordea_road_show_talk.pdf (p16)
<UNQUOTE>
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
ABOUT WILMOTT

PW by JB

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


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

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


GZIP: On