|
From: Luigi B. <lui...@gm...> - 2023-02-16 08:23:54
|
[Note: adding the list back in cc -- please keep it in the loop so these
exchanges can be useful to others.]
Hello,
I haven't written that part, so I'm not sure myself. My understanding
is that Asian options under FD methods are calculated by using a
2-dimensional model in which the underlying is one variable and the average
is the other. The applyTo method updates the average at each point (i,j)
of the mesh, with x_[i] being the value of the underlying and a_[j] being
the value of the current average. I hope this can help decoding the
implementation. If not, I guess someone involved with that code should
step in.
Luigi
On Mon, Feb 13, 2023 at 1:02 PM Lucky Man <vol...@gm...> wrote:
> Thank you for the quick response, but I am wondering where would you put
> vector of weights inside FdmArithmeticAverageCondition?
>
>
> пн, 13 февр. 2023 г. в 13:27, Luigi Ballabio <lui...@gm...>:
>
>> Also, the two locations Jonathan pointed out deal with the average of any
>> past fixings. The calculation of the total average (including those) is in
>> the FdmArithmeticAverageCondition class instantiated at <
>> https://github.com/lballabio/QuantLib/blob/master/ql/pricingengines/asian/fdblackscholesasianengine.cpp#L103
>> >
>>
>> Luigi
>>
>>
>> On Mon, Feb 13, 2023 at 11:55 AM Jonathan Sweemer <sw...@gm...>
>> wrote:
>>
>>> Hi Lucky Man,
>>>
>>> The following two code locations should point you in the right direction:
>>>
>>>
>>> https://github.com/lballabio/QuantLib/blob/master/ql/instruments/asianoption.cpp#L90-L98
>>>
>>> https://github.com/lballabio/QuantLib/blob/master/ql/pricingengines/asian/fdblackscholesasianengine.cpp#L67-L68
>>>
>>> If you think your weighted average type would be useful to others, you
>>> can submit a pull request. Currently only arithmetic and geometric average
>>> types are implemented for that instrument.
>>>
>>>
>>> On Sat, Feb 11, 2023 at 9:18 PM Lucky Man <vol...@gm...>
>>> wrote:
>>>
>>>> What is exact place where we implement arithmetical mean while
>>>> calculating asianOption.NPV() using FdBlackScholesAsianEngine and
>>>> DiscreteAveragingAsianOption. Because my idea is to compute asian option,
>>>> but using a weighted arithmetic mean. Thanks in advance
>>>> _______________________________________________
>>>> 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
>>>
>>
|