Re:[Quantlib-users] HullWhiteProcess class usage...

Posted by marco.tarenghi@libero.it on
URL: http://quantlib.414.s1.nabble.com/Re-Quantlib-users-HullWhiteProcess-class-usage-tp11124.html

toyin sent me the files and now I know that they are in the CVS.

I think there is not a simple way to modify the files you mentioned: the pricing formulas implemented in the code are referred to a forward measure.
The idea is: I write the pricing formula in a chosen measure and then simulate in that measure.
So, the most natural measure (at least for caps/floors and many other instruments) is the forward measure.
If you want to simulate the dynamics in another measure, than you have to write the pricing formula in that measure (and not always it is possible, for eaxample I do not know analytical formulas for pricing caps in the risk neutral framework). Then it is just a matter of implementing it: remember that the endDiscount_ in nmHullWhiteEngine is the actual discount (ie zero coupon price) and its use is justified by forward measure pricing, but you cannot use it in the case of risk neutral pricing.
The discount factor is a random variable and it can be substitued with the price only in case of the relative forward measure.
The idea is similar to the one of bgm pricing.

regards,
Marco