domokane / FinancePy

A Python Finance Library that focuses on the pricing and risk-management of Financial Derivatives, including fixed-income, equity, FX and credit derivatives.
GNU General Public License v3.0
2.16k stars 322 forks source link

Finite difference method #167

Closed idorrington92 closed 1 year ago

idorrington92 commented 1 year ago

This PR adds a finite difference method for option pricing.

domokane commented 1 year ago

Hi Iain Good work ! I will look over it in the next few days. Best D

domokane commented 1 year ago

Hi Iain Great start. It now needs to be wired into the equity vanilla option product as a new Black Scholes model implementation. This is especially useful for valuing an Equity American Call and Put option - it is a useful test but not so interesting for the European option as this has a closed form solution. It would be good to compare the finite difference approach to the CIR tree. Best D

luciferbenz826 commented 10 months ago

Great work on adding the finite difference method for option pricing! Decoupling methods and handling matrix updates separately is a smart approach. The comparisons with C++ code and other models in Singapore GST provide a solid validation. Your efforts are appreciated, and the logical organization of the code is a plus. Looking forward to more contributions.