Serving the Quantitative Finance Community

 
User avatar
otrebla86
Topic Author
Posts: 0
Joined: June 20th, 2011, 10:05 pm

Implementing Heston with stochastic interest rate by Grzelak and Oosterlee

September 22nd, 2011, 12:34 pm

Hi everyone,I?m triyng to implement the Heston model with stochastic interest rates driven by the Hull-White process devoloped by Grzelak and Oosterlee for my graduate thesis in finance.In particular, I?ve implemented the deterministic version but it does not returns the same results as the ones in the paper http://epubs.siam.org/sifin/resource/1/ ... ypassSSO=1 at pages 266-267.If someone is interested, I?ve attached matlab codes below.The code main_HHW.m returns prices and implied volatilities for HHW and classic Heston model.I?ve implemented the exact expression for the expected value of the square root process given in the paper and used the suggested COS method for pricing with characteristic function.Thank you all in advance.Alberto
 
User avatar
leo2000
Posts: 0
Joined: April 16th, 2007, 7:19 am

Implementing Heston with stochastic interest rate by Grzelak and Oosterlee

September 26th, 2011, 6:13 am

Hi Alberto,I see in your code that when calculating the implied volatilities for the Heston and the Heston-Hull-White models you have used for both cases "r=0.05". Note that for the HHW model the interest rate is not constant- its stochastic so it may be inappropriate to plug in r=0.05 in the BS formula. If you want to compare two models: one with stochastic interest rates and one with constant I would suggest to move to the forward measure. Those derivations you can find at "The Affine Heston Model with Correlated Gaussian Interest Rates for Pricing Hybrid Derivatives", forthcoming in Quant. Finance 2011.I would also suggest to perform a Monte Carlo simulation (with the QE scheme by L. Andersen) to confirm your implementation. To my knowledge the results from the article were fully replicable.Regards,L.
 
User avatar
otrebla86
Topic Author
Posts: 0
Joined: June 20th, 2011, 10:05 pm

Implementing Heston with stochastic interest rate by Grzelak and Oosterlee

September 30th, 2011, 4:13 pm

Thanks Lech.I have followed your suggestions and implemented the deterministic approximation of the model under the forward measure and the results seems similar to yours.Now my problems are about the simulation scheme. The volatilities does not coincide at all.Maybe you could find the error in the code below.Thanks for your patiance.A
 
User avatar
LesleYLyu
Posts: 0
Joined: October 11th, 2012, 9:01 pm

Implementing Heston with stochastic interest rate by Grzelak and Oosterlee

March 23rd, 2013, 9:43 pm

QuoteOriginally posted by: leo2000Hi Alberto,I see in your code that when calculating the implied volatilities for the Heston and the Heston-Hull-White models you have used for both cases "r=0.05". Note that for the HHW model the interest rate is not constant- its stochastic so it may be inappropriate to plug in r=0.05 in the BS formula. If you want to compare two models: one with stochastic interest rates and one with constant I would suggest to move to the forward measure. Those derivations you can find at "The Affine Heston Model with Correlated Gaussian Interest Rates for Pricing Hybrid Derivatives", forthcoming in Quant. Finance 2011.I would also suggest to perform a Monte Carlo simulation (with the QE scheme by L. Andersen) to confirm your implementation. To my knowledge the results from the article were fully replicable.Regards,L.Hello Lech,I searched forum and found this 2-years-ago post... And I am having same confusion nowWould you suggest how you calculate the implied volatility in your paper "On the heston model with stochastic interest rates", table 1? Some other guys suggest me to use initial r, but it looks this choice gives very poor fit (relative error is around 30%) for deterministic approach (H1HW in your paper).And for stochastic approach (H2HW in your paper), when solving characteristic function for H2HW, the process involving evaluate two time-dependent function \mu^{\varepsilon}(t) and \psi^{\varepsilon}(t). In my understanding t here is initial time, in other words, t=0. But these two functions have singularity at 0, how would you evaluate them at 0? I tried with a very small value of t, but still get poor fitness.
 
User avatar
Culverin
Posts: 0
Joined: May 17th, 2012, 5:18 am

Implementing Heston with stochastic interest rate by Grzelak and Oosterlee

March 24th, 2013, 1:49 am

There is a classical finance paper about sto r as CIR, sto vol and jump:http://www.rhsmith.umd.edu/faculty/gbakshi/jf97b.pdf
 
User avatar
leo2000
Posts: 0
Joined: April 16th, 2007, 7:19 am

Implementing Heston with stochastic interest rate by Grzelak and Oosterlee

March 26th, 2013, 6:37 am

Hi,taking r_0 for calculating implied volatilities may indeed give you very poor results, especially if r_0 significantly differes from the \theta (the term structure for the short-rate process).I think that the best way to get the implied volatilities when the rates are stochastic is by using Black's 76 formulae for implied volatilities.From the Heston-Hull-White simulation you will get a call/put price at time t_0, V_0. Now if you take V_0/P(0,T) this will give you the forward-premium and for the forward you have S_0/P_0_T.By using the Black's model you do NOT need to deal directly with "r" as you would in the standard Black-Scholes model.To check how it works I suggest to impliemend the simplest Black-Scholes-Hull-White model and experiment a bit with it (change vol of the interest rates etc.)Is it clearer now?Regards,L.
 
User avatar
LesleYLyu
Posts: 0
Joined: October 11th, 2012, 9:01 pm

Implementing Heston with stochastic interest rate by Grzelak and Oosterlee

March 27th, 2013, 2:02 am

QuoteOriginally posted by: leo2000Hi,taking r_0 for calculating implied volatilities may indeed give you very poor results, especially if r_0 significantly differes from the \theta (the term structure for the short-rate process).I think that the best way to get the implied volatilities when the rates are stochastic is by using Black's 76 formulae for implied volatilities.From the Heston-Hull-White simulation you will get a call/put price at time t_0, V_0. Now if you take V_0/P(0,T) this will give you the forward-premium and for the forward you have S_0/P_0_T.By using the Black's model you do NOT need to deal directly with "r" as you would in the standard Black-Scholes model.To check how it works I suggest to impliemend the simplest Black-Scholes-Hull-White model and experiment a bit with it (change vol of the interest rates etc.)Is it clearer now?Regards,L.Hi Lech,Thanks for your reply. I ll start with BS-Hull-White first.Any hints on H2HW? Still confused with singularity...
Last edited by LesleYLyu on March 26th, 2013, 11:00 pm, edited 1 time in total.