|
From: Peter C. <pca...@gm...> - 2021-04-09 08:03:15
|
Hey Philippe, so you simulate HW paths under a specific measure (standard HullWhite = Bank Account, there is a class for T-Forward and the GSR which is basically = Hull White under T-Forward as well) and compute swap.NPV() on a simulation node (t, x) where t = simulation time, x = HW state. You'll want to compute the NPV w.r.t. t as the valuation time, i.e. discount the cashflows with pay date > t back to t using the conditional curve at (t,x). Similarly you project floating coupons with the conditional projection curve at (t,x). Then you'll have to divide the result by the numeraire, i.e. the bank account B(t) or the zero bond P(t,T) for the T-forward measure. The average over such deflated NPVs will give you the NPV at t=0 over the Numeraire at t=0, i.e. you have to multiply by B(0)=1 (no effect in this case of course) resp. P(0,T) for T-forward measure. In formulas NPV(t=0) = N(0) E ( NPV(t,x) / N(t) ) where N = Bank Account or zero bond with maturity T. And yes, a change in measure corresponds to a change in the drift of the simulated process (Girsanov Theorem). Thanks Peter On Sun, 4 Apr 2021 at 17:57, Philippe Hatstadt <phi...@ex...> wrote: > > Hi Peter. > I am going back to this semi-dated thread. My question is what measure/numeraire is the drift adjustment in the HW engine compatible with, if any? In other words, if I price say a swaption via Monte-Carlo simulation, and say I evaluation my cash flows with the discount factor as numeraire, i.e. I use swap.NPV() to value the forward swap on each path, I overprice the option versus closed-form Jamshidian. I think swap.NPV() is consistent with a money market account as numeraire, so my question is whether I am still supposed to "deflate" the swap.NPV() to satisfy no arbitrage? I thought such deflation typically takes place as an additional drift adjustment that needs to be calibrated, but my question is whether this is already done or not in the HW engine for DF as numeraire, or if there is none and it needs to be done? > > Philippe Hatstadt > > > On Sun, Oct 25, 2020 at 1:47 PM Peter Caspers <pca...@gm...> wrote: >> >> I think this is expected, according to Brigo Mercurio Formula (3.37) >> for the mean of the short rate at t (conditional on F_s with s = 0, >> i.e. the unconditional mean) is >> >> r(0) exp(-at) + alpha(t) - alpha(0) exp(-at) = alpha(t) = f(0,t) + >> sigma^2 / (2 a^2) ( 1 - exp(- at) ) ^2 >> >> because alpha(0) = r(0) and so the first and last summand cancel out. >> Plugging in sigma = 0.1 and a = 0.1 that means that E( r( 30 ) ) = >> 0.05 + 0.4514... = 0.5014.... This is all including the term >> responsible for the fit to the initial flat curve at 5%. And by the >> way, I don't think you can disable this part of the drift in >> HullWhiteProcess. >> >> Also, I think sigma = 0.1 is an extremely high value, maybe on purpose >> for the sake of the example? >> >> >> On Sun, 25 Oct 2020 at 17:44, Philippe Hatstadt >> <phi...@ex...> wrote: >> > >> > Actually, I have a follow-up question on the drift issue. >> > I was experimenting with the Hull-White implementation from the QuantLib Cookbook, and interestingly, in Chapter 15, they build a flat curve with a forward rate of 5%, via: >> > spot_curve = ql.FlatForward(todays_date, ql.QuoteHandle(ql.SimpleQuote(forward_rate)), day_count) >> > >> > The HW parameters are sigma=10% and a=10%, and the HW engine is built via: >> > >> > hw_process = ql.HullWhiteProcess(spot_curve_handle, a, sigma) >> > >> > They then proceed to generate paths of the short term rate, and they demonstrate that the simulated rate converges to the theoretical expected forward rate f(0,t<T) but the graph of such expected forward is not flat at 5%, instead it is monotonously increasing from 5% to as high as 50% after 30 years. So it very much looks like the paths of rates that they show are not drift adjusted otherwise the expected path should be flat at 5%. >> > So I'm unsure what is going on? Is there an optional argument in the hw_process call to do the drift adjustment or not? >> > >> > Philippe Hatstadt >> > >> > >> > On Sun, Oct 25, 2020 at 9:09 AM Peter Caspers <pca...@gm...> wrote: >> >> >> >> Hi Philippe, >> >> >> >> the Jamshidian engine uses a) discount bond prices conditional on the >> >> state of the model (i.e. the short rate in the case of the Hull-White >> >> model) and b) zero bond option prices in the model to come up with a >> >> model swaption price. It retrieves this information via the >> >> discountBond() and discountBondOption() methods in the >> >> OneFactorAffineModel interface. The methods account for the adjustment >> >> term theta(t) in the Hull-White model SDE already, there is nothing >> >> that the engine needs to do in addition to that. I don't know if that >> >> answers your question? >> >> >> >> The HullWhiteProcess also takes into account the adjustment to the >> >> initial curve already. To see that you can look into the >> >> implementation of HullWhiteProcess::drift() >> >> >> >> https://github.com/lballabio/QuantLib/blob/master/ql/processes/hullwhiteprocess.cpp#L38 >> >> >> >> which coincides with e.g. Brigo Mercurio, Interest Rate Models, Theory >> >> and Practice, Formulas (3.33) and (3.34) observing that in this >> >> context >> >> >> >> https://github.com/lballabio/QuantLib/blob/master/ql/processes/ornsteinuhlenbeckprocess.hpp#L90 >> >> >> >> level_ is zero, speed_ is the Hull-White mean reversion parameter and >> >> x stands for the short rate at time t. >> >> >> >> Does that make sense? >> >> >> >> Thanks, >> >> Peter >> >> >> >> >> >> On Sun, 25 Oct 2020 at 12:47, philippe hatstadt via QuantLib-users >> >> <qua...@li...> wrote: >> >> > >> >> > Is there any information about how the Jamshidian engine does the drift adjustment to match the initial curve for the Hull White model? >> >> > If I want to use the QL HW Process in a MC model, I assume II have to do the drift adjustment myself, or is there existing QL functionality to do that? >> >> > >> >> > Regards >> >> > >> >> > Philippe Hatstadt >> >> > +1-203-252-0408 >> >> > https://www.linkedin.com/in/philippe-hatstadt >> >> > >> >> > >> >> > >> >> > _______________________________________________ >> >> > QuantLib-users mailing list >> >> > Qua...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users >> >> >> >> >> >> _______________________________________________ >> >> QuantLib-users mailing list >> >> Qua...@li... >> >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > >> > >> > >> > >> > Brokerage services offered through Exos Securities LLC, member of SIPC / FINRA. For important disclosures, click here. > > > > > Broker-Dealer services offered through Exos Securities LLC, member of SIPC / FINRA / BrokerCheck / 2021 Exos, inc. For important disclosures, click here. > > |