google / tf-quant-finance

High-performance TensorFlow library for quantitative finance.
Apache License 2.0
4.48k stars 571 forks source link

Bjerksund-Stensland 2002 option pricing model #59

Closed alembcke closed 3 years ago

alembcke commented 3 years ago

This pull requests adds the Bjerksund-Stensland 2002 option pricing model, which closes #5.

Tests are included which mirror the tables in the reference paper. Additional testing in both eager and deferred (graph) mode were conducted with visual inspection of the output of the code. All tests were successful.

alembcke commented 3 years ago

Made the requested changes, see unresolved comments above for further clarification.

alembcke commented 3 years ago

Updated the test so that discount_rates, dividend_rates and expiries are not scalars, to test batching. Tests ran successfully. Also, I squashed the commits.

cyrilchim commented 3 years ago

Thank you Alex! This is now merged

aminehadbi commented 2 years ago

Note to self to research this.