|
From: Shenze W. <she...@da...> - 2020-06-24 17:19:28
|
Hi Luigi, Thanks for your codes. Yes, they do change. I did not understand that the dividend model is about the discrete dividends. I was pricing options with dividend yields but without discrete dividends. That’s why I didn’t observe the differences of the two different dividend models. Based on your Python code, I priced some American options. The results of 3 test cases are in the attached “results.txt”. The Python code is in the attached “FD_engines.py”. Here are some findings and questions. Findings: 1. In some cases (Case 1), FDDividendAmericanEngine and FdBlackScholesVanillaEngine with Escrowed generate similar results, and the new engine shows better converge performance. However, in some cases (Case 2), the result of old engine does not match any results from the new engine. The option in Case 2 is the same as Case 1 except that there is an interest rate. 2. In some cases (Case 3), the spot dividend model seems to generate wrong results. The option in Case 3 is an option with a big dividend right after the evaluation date. The results of spot dividend model is very different from others. The price also changes a lot when mesh changes. Questions: 1. About FD schemes. Why there is no CrankNicolson scheme in the latest version? Is it replaced by Douglas scheme because Douglas is generally better? 2. About Dividend models. I understand that in Escrowed Model it is assumed that the stock price minus the present value of dividends follows Geometric Brownian Motion. But I am not sure what’s the Spot Dividend Model in QuantLib. What’s assumption of this model? By checking the C++ codes, it seems that the only difference of this two models is the spotAdjustment in this line: https://github.com/lballabio/QuantLib/blob/master/ql/methods/finitedifferences/meshers/fdmblackscholesmesher.cpp#L81 3. It seems that there is no error estimator for FD engines. Will we have one? Thanks a lot. Best, Shenze On Jun 18, 2020, 4:52 AM -0400, Luigi Ballabio <lui...@gm...>, wrote: > Yes, they do change. See the script I'm attaching for a simple example. > > Luigi > > > On Thu, Jun 18, 2020 at 10:32 AM Luigi Ballabio <lui...@gm...> wrote: > > > Hmm. No, I would expect the result to change at least slightly. Let me check that. Can you share the code you're using? > > > > > > Luigi > > > > > > > > > > On Tue, Jun 16, 2020 at 11:02 PM Shenze Wang <she...@da...> wrote: > > > > > Hi Luigi, > > > > > > > > > > Thanks a lot for the reply. > > > > > > > > > > I did not set the parameter `CashDividendModle` of the constructor `FdBlackScolesVanillaEngine` explicitly in my previous calculations. > > > > > > > > > > However, it seems that the parameter `CashDividendModle` does not affect the results at all. > > > > > > > > > > I calculated the prices of a bunch of American options with dividend yields with the engine `FdBlackScolesVanillaEngine` from QuantLib 1.18. The results from 'CashDividendModel cashDividendModel = Spot’ and the results from 'CashDividendModel cashDividendModel = Escrowed’ are identical, literally. I am using the Python wrap. > > > > > > > > > > Is this normal? > > > > > > > > > > > > > > > Best, > > > > > Shenze > > > > > > > > > > On Jun 16, 2020, 4:51 AM -0400, Luigi Ballabio <lui...@gm...>, wrote: > > > > > > Hello, > > > > > > thanks for the analysis. > > > > > > > > > > > > There are people here which are more capable of answering than I am, but just to make sure that we're comparing equals to equals: FdBlackScholesVanillaEngine has two possible ways to handle dividends, and we should document this better. One is the scale/shift model, and the other is the escrowed dividend model; you can choose the model by mans of an optional last parameter for the constructor (see <https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/options.i#L1202>). > > > > > > > > > > > > Now, FDDividendAmericanEngine uses the escrowed dividend model, which I'm told is the one described in most texts. Instead, FdBlackScholesVanillaEngine uses by default the scale/shift model. If you didn't set the model explicitly, this might be the reason for the differences. Passing Escrowed as the model would cause the results to be closer. > > > > > > > > > > > > If you did that already, though, we'll have to look closer into the code. > > > > > > > > > > > > Hope this helps, > > > > > > Luigi > > > > > > > > > > > > > > > > > > > > > > > > > On Mon, Jun 15, 2020 at 10:01 PM Shenze Wang <she...@da...> wrote: > > > > > > > > Hi, > > > > > > > > > > > > > > > > We are currently using `FDDividendAmericanEngine` (denoted by DA in following) of QuantLib 1.12. Since this engine is removed in QuantLib 1.16, we’d like to switch to `FdBlackScholesVanillaEngine` (denoted by FD in following) of QuantLib 1.18. Before we do the switch, we’d like to know the difference between these two engines (DA engine in QuantLib 1.12 and FD engine in QuantLib 1.18) and what are the impacts on the pricing results. We are using the Python version of QuantLib. > > > > > > > > > > > > > > > > I priced ~7000 options with different ivols, strikes, interest rates, dividend yields with 3 engines: (a) DA12 - `FDDividendAmericanEngine` in QuantLib 1.12, (b) FD12 - `FdBlackScholesVanillaEngine` in QuantLib 1.12, and (c) FD18 - `FdBlackScholesVanillaEngine` in QuantLib 1.18. > > > > > > > > > > > > > > > > Here are some comparisons of the results. > > > > > > > > > > > > > > > > (1) The difference between FD18 and DA12 including two parts: the difference between FD12 & DA12, and the difference between FD18 & FD12. The difference between FD12 & DA12 is much greater than the difference between FD18 & FD12, as shown in the following form. The form shows CDF of the differences. The numbers in the form are the probability that the difference is in a certain range. > > > > > > > > > > > > > > > > > > > > > > > > (2) FD12 vs DA12. The option prices generated by FD12 is greater than DA12 for in-the-money options, but lower for at-the-money and out-of-the-money options. Compared to the analytical solutions, FD12 is more accurate for at-the-money and out-of-the-money options, while DA12 is more accurate for in-the-money options. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > (3) FD18 vs FD12. Though it is relatively small, there is still a difference between FD18 and FD12, as shown in the following figure. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > So, my questions are: > > > > > > > > > > > > > > > > a. Do the difference between FD12 & DA12 and the difference between FD18 & FD12 described above behave as expected? > > > > > > > > b. What’s the potential reasons for these differences? > > > > > > > > > > > > > > > > I know the answers to these questions could be very subtle, but we’d like to understand the reasons for these differences, at least to some extent. I also tried to dig into the C++ codes, but I am not familiar with the codes and I do not know where to start. If you could provide some explanations or point me the right directions, I would be super grateful. > > > > > > > > > > > > > > > > Thanks a lot. > > > > > > > > > > > > > > > > > > > > > > > > Best Regards, > > > > > > > > Shenze Wang > > > > > > > > > > > > > > > > DataDock Solutions > > > > > > > > _______________________________________________ > > > > > > > > QuantLib-users mailing list > > > > > > > > Qua...@li... > > > > > > > > https://lists.sourceforge.net/lists/listinfo/quantlib-users |