|
From: Philippe H. <phi...@ex...> - 2020-06-26 12:38:29
|
I followed published code to generate paths of short rates using the
Hull-White model via already published code as follows.
hw_process = ql.HullWhiteProcess(crv_handle, mean_rev, sigma)
rng = ql.GaussianRandomSequenceGenerator(ql.UniformRandomSequenceGenerator(time_step,
ql.UniformRandomGenerator()))
seq = ql.GaussianPathGenerator(hw_process, length_years, time_step, rng, False)
for i in range(num_paths):
sample_path = seq.next()
path = sample_path.value()
My question, very simply, is: "
What is the easiest way to rebuild a curve handle from the path of rates
created by the HW process above?"
My goal is to use such curve handle to reprice bond instances via NPV(), so
I need a curve handle. I could certainly bootstrap/compound the short rates
to create discount factors (zero coupon prices) from each path above, from
which to build a ZeroCurve() but I was hoping there is a more direct method?
Regards
Philippe
--
Brokerage services offered through Exos Securities LLC, member of
SIPC <http://www.sipc.org/> / FINRA <http://www.finra.org/>. For important
disclosures, click here <https://www.exosfinancial.com/disclosures>.
|