|
From: Jack G <jac...@gm...> - 2022-05-18 13:35:49
|
Ashish, I haven't verified your numbers but your code seems to run and generate a price without errors for me (see screenshot below). If you have a specific way of generating the error, could you provide a minimal code reproduction of it and I'll have another look. Best, Jack [image: image.png] On Wed, May 18, 2022 at 9:25 PM Ashish Bansal <ash...@gm...> wrote: > Hi Jack, > > Please find attached the Asian option python code and the option trade > payload. > > Thanks for your help, > Regards, > Ashish > > On Wed, 18 May 2022 at 12:12, Jack G <jac...@gm...> wrote: > >> Hi Ashish, >> >> I've just lifted the examples from your references directly for a >> discrete arithmetic Asian using the FD Asian engine and it is working for >> me - can you share the code you are using that breaks please? >> >> Best, >> Jack >> >> On Wed, 18 May 2022, 13:55 Ashish Bansal, <ash...@gm...> >> wrote: >> >>> Hi all, >>> >>> Could somebody help with the asian options? We are using >>> FdBlackScholesAsianengine with DiscreteAveragingAsianOption. Online >>> references are given below. In DiscreteAveragingAsianOption, we need to >>> pass the past fixing which is suggested to be 0 for new trade. Whereas when >>> we are passing it as 0, we are getting the following error: >>> "QuantLib Error - Running average requires at least one past fixing" >>> ref: >>> >>> https://quantlib-python-docs.readthedocs.io/en/latest/pricing_engines.html#fdblackscholesasianengine >>> >>> >>> https://quantlib-python-docs.readthedocs.io/en/latest/instruments/options.html?highlight=DiscreteAveragingAsianOption#ql.DiscreteAveragingAsianOption >>> >>> Queries: >>> 1. What is to be passed here for new trade if not 0? >>> 2. For trade which is mid of averaging and has few past fixings, do we >>> need to pass the count of past fixing or the actual rates of the pastfixing >>> as an array? >>> >>> Any help will be appreciated. >>> >>> Thanks in advance >>> Ashish >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |