1
$\begingroup$

I have one question about Monte-Carlo simulation Hull-White process, maybe you can give me some advice.

I constructed a Hull-White process using Python and QuantLib. Now I want to construct a Hull-White process for two correlated short rates. For example, I want model rates in two correlated currency.

I use ql.HullWhiteProcess and ql.GaussianPathGenerator for constructing one Hull-White process and path generator. But I can't understand how get two correlated paths.

$\endgroup$
  • 1
    $\begingroup$ What about just build the second path with the definition of correlation. Suppose you've generated two independent Gaussian paths $W^1_t$ and $W_t^2$. Suppose that the correlation between the two final paths you are building is $\rho \in (0,1)$. Then you can get the path $Z_t$ (correlated to $W_t^1$) just by doing: $Z_t = \rho W_t^1 + \sqrt{1-\rho^2} W_t^2$ $\endgroup$ – clarkmaio Jan 19 '18 at 17:24
  • $\begingroup$ Thanks for your answer. When you say: "independent Gaussian paths W1tWt1 and W2tWt2" you keep in mind Wiener process componend in Hull-White model or short rate path? If you keep in mind Wiener process componend my main questions - how i can do it using GaussianPathGenerator? It takes as input only hw_process, length, timestep and RandomSequenceGenerator. $\endgroup$ – Andrey Jan 22 '18 at 10:01
  • $\begingroup$ Clarkmaio, please, give me answer)))) $\endgroup$ – Andrey Jan 24 '18 at 8:15
  • $\begingroup$ In my example I was talking about the HW Wiener paths of course. Right now I studing the ql.HullWhiteProcess function....I thought that It was possible to give directly the paths as input... $\endgroup$ – clarkmaio Jan 24 '18 at 9:19
  • $\begingroup$ Maybe you have example how i can do it? $\endgroup$ – Andrey Jan 24 '18 at 11:10
2
$\begingroup$

You can try combining the two processes and a correlation matrix into a single process:

p1 = ql.HullWhiteProcess(rf, 0.01, 0.20)
p2 = ql.HullWhiteProcess(rf, 0.005, 0.15)
rho = [[1.0, 0.5],
       [0.5, 1.0]]

P = ql.StochasticProcessArray([p1, p2], rho)

at which point you can use the combined process P with the GaussianMultiPathGenerator class. Each sample will return a pair of paths for the two processes.

$\endgroup$
  • $\begingroup$ Thank you!!! One question. What is "times" parameter in GaussianMultiPathGenerator? $\endgroup$ – Andrey Jan 25 '18 at 15:13
  • $\begingroup$ The list of times on which you want your paths to be generated. $\endgroup$ – Luigi Ballabio Jan 26 '18 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.