Question
HIGH PRIORITY QUESTION a) Implement a function or class to solve the BSM PDE using the implicit finite difference scheme. It should be able to
HIGH PRIORITY QUESTION
a) Implement a function or class to solve the BSM PDE using the implicit finite difference scheme. It should be able to price both European and American style derivatives of arbitrary payoff structure (i.e. the payoff function should be a Callable). You are free to design your class or functions how you wish.
To get full points you must: Implement full functionality: That is, calculate the price of both European and American options on dividend paying stocks and be flexible to price other options besides standard calls and puts. Provide documentation: Provide docstrings and example usage for your implementation. It should be easy for someone looking at your code to understand how to call it and what the parameters mean. A short README.md file or example script would be useful.
Required files: pde.py: containing your PDE implementation pde_plots.ipynb: containing your surface plot and any other plots used for your testing Any other files you wish
b) Provide unit tests and / or comparisions to analytical forms to "prove" that your implementation is reasonable.
c) Construct a surface plot of the derivative values on your coordinates. Your plot should look something like this (this is a 30-strike 2-year American put).
1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started