SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
ksmchan
Topic Author
Posts: 6
Joined: May 18th, 2011, 2:40 pm

Building time-dependent sigma of HullWhite tree using Quantlib

August 17th, 2015, 12:50 am

Hi all,I would like to build a Hull White tree using Quantlib and I have implement the following C++ code:*************************************************************************************boost::shared_ptr<Exercise> bermudanExercise(new BermudanExercise(bermudanDates));Swaption bermudanSwaption(swap, bermudanExercise);boost::shared_ptr<HullWhite> modelHW(new HullWhite(yieldCurve,a,sigma));bermudanSwaption.setPricingEngine(boost::shared_ptr<PricingEngine>(new TreeSwaptionEngine(modelHW, calendar.businessDaysBetween(valuationDate,swapmaturity,true,true))));*************************************************************************************May I know the above implementation is assume constant mean revert (a) and sigma?If I would like to implement a time-dependent sigam in the HullWhite tree, how can I modify the code?Thanks for help.Kevin
 
User avatar
lballabio
Posts: 983
Joined: January 19th, 2004, 12:34 pm

Building time-dependent sigma of HullWhite tree using Quantlib

August 26th, 2015, 7:01 am

Yes, a and sigma are constant.There's an implementation with variable a and sigma in <ql/experimental/shortrate/generalizedhullwhite.hpp>. I haven't tried it, though.
Last edited by lballabio on August 25th, 2015, 10:00 pm, edited 1 time in total.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On