feat: Implement Chooser Option Pricing Model #277
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements Chooser option pricing (also called as-you-like-it options), where the holder can choose at a specified date whether the option becomes a call or a put.
What Was Implemented
Simple Chooser (Rubinstein 1991)
At the choice date t, the holder chooses max(Call value, Put value).
Formula:
Where:
Edge Cases
Integration
src/pricing/chooser.rssrc/pricing/mod.rsOptionType::Chooserinblack_scholes_model.rsWhy It Was Implemented
Chooser options are important because they:
Technical Decisions
.to_dec()to avoid Positive type panics on negative intrinsicTesting
Added 11 comprehensive unit tests:
test_simple_chooser: Basic pricingtest_chooser_more_valuable_than_call/test_chooser_more_valuable_than_put: Fundamental propertiestest_early_choice_date/test_late_choice_date: Edge timingtest_choice_at_expiry: Straddle casetest_short_chooser_option: Position negationtest_zero_time_to_expiry: ATM at expiry = 0test_itm_call_at_expiry/test_itm_put_at_expiry: Intrinsic valuestest_higher_vol_means_higher_chooser_value: Volatility propertyVerification
make lint-fix pre-pushcompletes successfullyCloses #242