# Monte-Carlo simulation Hull-White process

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.

• 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$ – clarkmaio Jan 19 '18 at 17:24
• 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. – Andrey Jan 22 '18 at 10:01
• Clarkmaio, please, give me answer)))) – Andrey Jan 24 '18 at 8:15
• 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... – clarkmaio Jan 24 '18 at 9:19
• Maybe you have example how i can do it? – Andrey Jan 24 '18 at 11:10

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.

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