Amando
Amando
I tried briefly this morning using `ndarray` and it seems they can hold custom types just fine, however I think we would need to implement a `matmul` etc ourselves to...
The trouble with `ndarray` is for matrix multiplication the type needs to impl `Dot` which I can't do since it's external. Component-wise multiplication works fine, but can't do matrix multiplication...
It would work I think if I could `impl` `num::One` and `num::Zero` traits for the `Variable` type but I don't see how this could be done.
I tried that earlier but it required unsafe and then I still got a lifetime issue trying to implement the matrix multiplication. You can see it in the latest commit...
You could try [Finite Difference Computing with PDEs](https://books.google.at/books/about/Finite_Difference_Computing_with_PDEs.html?id=NNpCDwAAQBAJ&source=kp_book_description&redir_esc=y). It's supposed to be quite good and it's open access [here](https://hplgit.github.io/fdm-book/doc/pub/book/pdf/fdm-book-4screen.pdf). Also might be worth having a look at QuantLib.
@yfnaji In the latest commit (74a90f0), I tried ATM option tests, and there a number of failures. In particular, the `explicit()` method seems to have an issue. ``` ---- instruments::options::finite_difference_pricer::tests_finite_difference_pricer::european_call_explicit...
These notes (and most of his others too) are very good: https://personal.ntu.edu.sg/nprivault/MA5182/american-options.pdf There are also 2-3 closed-form approximations for finite expiry American options given in Haug's Option Pricing Formulas book....
Would love to see their implementation!
Visualisation is not very high on the list, but could possibly make a new macro to plot a surface, e.g. `plot_matrix!` (similar to the current `plot_vector!`). Definitely would be a...
The function may be unknown, and the curve may simply be some market data, such as the US yield curve: Date | 1 Mo | 2 Mo | 3 Mo...