feat: Implement Quanto option pricing model #281
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 pricing support for Quanto options as described in issue #246. Quanto options are derivatives where the underlying asset is denominated in one currency (foreign) but the payoff is settled in another currency (domestic) at a fixed exchange rate.
What was implemented
ExoticParams Extensions
Added quanto-specific fields to
ExoticParams:quanto_fx_volatility: Volatility of the exchange ratequanto_fx_correlation: Correlation between the underlying asset and the exchange rate (-1 to 1)quanto_foreign_rate: Foreign risk-free interest ratePricing Implementation
Created
src/pricing/quanto.rswith the quanto-adjusted Black-Scholes formula:Quanto Adjustment
The key insight is that the drift of the underlying asset must be adjusted for the correlation between the asset and the exchange rate:
Where:
Pricing Formula
Where X is the fixed exchange rate.
Why This Implementation?
Common Applications
Tests
12 comprehensive unit tests covering:
Files Changed
src/model/option.rs: Added quanto fields toExoticParamssrc/model/format.rs: Updated Display implementationssrc/pricing/quanto.rs: NEW - Quanto option pricing implementationsrc/pricing/mod.rs: Added quanto module exportsrc/pricing/black_scholes_model.rs: Routed Quanto to new modulesrc/pricing/rainbow.rs: Updated ExoticParams in testssrc/pricing/spread.rs: Updated ExoticParams in testssrc/pricing/cliquet.rs: Updated ExoticParams in testsexamples/examples_exotics/src/bin/cliquet_example.rs: Updated ExoticParamsCloses #246