cyrilchim
cyrilchim
Hi @mlambelho I'd need to think a bit on this one. Could you please check, e.g., [here](http://ta.twi.tudelft.nl/mf/users/oosterlee/oosterlee/ecco.pdf). Seems you also need to update `upper_boundary_fn` Could you please share the full...
I looked in the colab. As I understand, you indeed need to adjust the grid by the dividend at the dividend date. You also need to adjust boundary conditions, `values_transform_fn`...
Edited your [colab](https://colab.research.google.com/drive/1WiS1Lz259vv1UZZTYK5TBafG1MFir3WW?usp=sharing). Please check it out (see the last section there). Delta and Gamma should be estimated with finite difference as you already have price estimate on the grid....
Hi @mlambelho 1. Your grid boundaries are too narrow. Set something like `s_min=10, s_max=900`. The boundaries should be selected so that to cover most of the possible terminal values `S(T)`....
Sorry for the late reply. Typically shape error means there is some shape mismatch somewhere. The best way to debug that is to remove `tf.function` and step through the code...
Also, I think you need to adjust the boundary conditions for puts. The lower boundary for put is ``` tf.squeeze((strike * tf.exp(-risk_free_rate * (expiry - t)) - grid[0][..., -1] +...
You could use similar approach to QuantLib (ql). Under Black-Scholes the distribution of the terminal values `S(T)` is known (it is Geometric normal). That means we can put some upper...
1. I've added a few edits to the colab. I made a mistake earlier. The shape of boundary function results should be `[num_options]` (that is 20 in your case). Please...
I have added a section on CPU utilization optimization.
Sorry for the late reply. I think you just need to adjust `spot_index` to a correct value. Is there an index which corresponds to the spot?