|
From: Jack G <jac...@gm...> - 2022-06-28 09:23:52
|
For asian options it's not exactly obvious what forward delta means as there are several fixing dates, but spot delta should be straightforward enough. Moment matching uses an analytic black formula ( https://github.com/lballabio/QuantLib/blob/cf8524b6d4004cb08fc5468524769e37984d8047/ql/pricingengines/asian/turnbullwakemanasianengine.cpp#L118) and everything is linear in spot so spot delta should be as easy as evaluating the black calculator delta at the same time as calling the price. There are a few edge cases (eg. if prior fixings mean it's already in-the-money) that need to be considered. I'm doing some experiments now to confirm this, I can look at implementing this and exposing them in SWIG but can't really commit to a timeline for it right now. On Tue, Jun 28, 2022 at 3:27 PM Luigi Ballabio <lui...@gm...> wrote: > In the FD case, the solver doesn't bump and reprice; at the end of the > roll-back calculation, the result is a grid of values at different values > of the underlying. When the delta and gamma call `valueAt` repeatedly, > they're only interpolating at different points on that grid. Compared to > the FD simulation the engine just did, it doesn't give a noticeable > overhead. > > However, this is specific to a FD simulation, so it can't be applied to > `TurnbullWakemanAsianEngine` which uses an analytic approximation. In > principle, it might be possible to differentiate it, but it's probably > easier to bump and reprice as Jonathan said. > > Luigi > > > On Tue, Jun 28, 2022 at 12:50 AM Jonathan Sweemer <sw...@gm...> > wrote: > >> Hi Ashish, >> >> The FdBlackScholesAsianEngine calculates greeks by bumping the spot and >> repricing[1] so you should be able to do the same in your code. >> >> I’m actually not convinced it’s a good idea to always include the greeks >> in the result. In the case of FdBlackScholesAsianEngine it means the solver >> is called six times - once for the price, twice for the delta, and three >> times for the gamma. Perhaps there should be a way to tell the engine only >> to return the price to avoid the overhead of calculating the greeks for >> people who don’t need them. >> >> [1] >> https://github.com/lballabio/QuantLib/blob/cf8524b6d4004cb08fc5468524769e37984d8047/ql/methods/finitedifferences/solvers/fdmsimple2dbssolver.cpp#L53 >> >> 2022년 6월 27일 (월) 21:54, Ashish Bansal <ash...@gm...>님이 작성: >> >>> Hi >>> >>> Including Partha from my team who is trying to install it and test 1.27. >>> >>> Luigi, >>> >>> I looked at the code and noticed that the >>> *turnbullwakemanasianengine.cpp* doesn't include the Delta or Gamma in >>> the results. Could including the solver for Delta and Gamma work, how it is >>> included in fdblackscholesasianengine.cpp? >>> results_.delta = solver->deltaAt(spot, avg, spot*0.01); >>> results_.gamma = solver->gammaAt(spot, avg, spot*0.01); >>> >>> Regards, >>> Ashish >>> >>> On Fri, 24 Jun 2022 at 11:38, Ashish Bansal <ash...@gm...> >>> wrote: >>> >>>> I can understand. You are doing great work for the community by >>>> maintaining this library. Thanks for it. >>>> >>>> Let me try building using SWIG as per instructions on this page. Thanks >>>> again for info. >>>> >>>> Regards, >>>> Ashish >>>> >>>> On Thu, 23 Jun 2022 at 19:36, Luigi Ballabio <lui...@gm...> >>>> wrote: >>>> >>>>> Hello Ansish, >>>>> no, I can not commit to a date for the release. Other issues at >>>>> my job might take priority over the release. >>>>> >>>>> You can try the changes before the release by checking out the code >>>>> from GitHub and following the instructions at < >>>>> https://www.quantlib.org/install.shtml> to compile it. >>>>> >>>>> Hope this helps, >>>>> Luigi >>>>> >>>>> >>>>> On Thu, Jun 23, 2022 at 11:17 AM Ashish Bansal < >>>>> ash...@gm...> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> We want to test the TurnbullWakemanAsianEngine using Python. How can >>>>>> we test the new changes through Python SWIG? >>>>>> >>>>>> Could v1.27 be released a little early, say by 10th July, if possible? >>>>>> >>>>>> Regards >>>>>> Ashish Bansal >>>>>> _______________________________________________ >>>>>> 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 >>> >> _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |