|
From: Philippe H. <phi...@ex...> - 2024-01-24 18:59:49
|
I was able to calibrate a G2++ model to normal UST swaption volatilities (heroically using SOFR swaptions and re-scaling by rates ratio to generate so-called Treasury Swaption vol surface). Code is below: model = G2(term_structure); # engine = TreeSwaptionEngine(model, 25) # engine = ql.G2SwaptionEngine(model, 10, 400) engine = ql.FdG2SwaptionEngine(model) swaptions = create_swaption_helpers_normal(data, index, term_structure, engine) optimization_method = LevenbergMarquardt(1.0e-8,1.0e-8,1.0e-8) end_criteria = EndCriteria(1000, 100, 1e-6, 1e-8, 1e-8) model.calibrate(swaptions, optimization_method, end_criteria) a, sigma, b, eta, rho = model.params()\ The question now is as follows: I want to use this model towards a GNMA OAS model for which I would need monte-carlo paths of 2y/5y/10y forward CMT rates spaced say monthly. I assume that I would first need to use the 5 G2++ parameters calibrated above and then generate paths of the short rate, then somehow compute forward CMT at each forward monthly epoch Ti by computing the break-even coupon C10(Ti) such that PV(Ti, bond(cpn=C10(Ti)) == 100? Are there existing QL classes or modules that do all that from a given calibrated model like above? By the same token, I would also need stochastic pathwise discount factor vectors DF(Ti, path j), i=0 to 30y monthly. Is there also a QL module that generates those? I can obviously do it manually, but I am on the python side, so I want to re-use as much of existing libraries as I can to use efficient C++ code indirectly via SWIG. Regards Philippe Hatstadt -- 1370 Broadway, Suite 1450 | New York, NY | 10018 <https://www.exosfinancial.com/> <https://www.linkedin.com/company/meetexos/about/> Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click here <https://www.exosfinancial.com/general-disclosures>. Confidentiality Notice: The information contained in this email (including attachments) is only for the personal and confidential use of the sender and recipient named above. If the reader is not the intended recipient, you are notified that you have received this message in error and that any review, dissemination, copying or distribution is prohibited. If you have received this communication in error, please notify the sender immediately by e-mail and delete or destroy the original message and all copies. |