Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial-Time Barrier Put Option implementation #2142

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

paolodelia99
Copy link

Added support for Partial-Time Put Barrier option as requested in issue #1986.

  • In a nutshell, a synthetic Partial-Time Barrier Call option is created and we use the put-call symmetric for barrier options (Haug pg 168) to calculate the price of the requested put option using the following symmetry (for the up-and-out, the other symmetries are the same):

$$P_{uo}(S, X, H, r, b, \sigma) ) = \frac{X}{S}C_{do}(S, \frac{S^2}{X}, \frac{S^2}{H}, r - b, -b, \sigma)$$

  • Added test for checking the symmetric of standard barrier option, used to benchmark whether my implementation was correct or not, since there was an analytical formula for calculating the price of a Barrier Put Option

I am not sure how lines 79-80 of the analyticpartialtimebarrieroptionengine.cpp could have written better since I couldn't figure out how to get the initial value of risk-free rate and dividend.

Copy link

boring-cyborg bot commented Jan 26, 2025

Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it.

@CLAassistant
Copy link

CLAassistant commented Jan 26, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants