-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Description
This feature aims to extend the library by adding functionality to calculate the Risk-Neutral Density (RND) from an option chain and perform skew analysis to infer market expectations. This enhancement will provide tools to derive the implied distribution of underlying asset prices and assess whether the market is biased toward bullish or bearish scenarios.
Why This Feature Is Important
The Risk-Neutral Density (RND) is a valuable tool in quantitative finance for:
- Inferring market expectations about future price distributions.
- Measuring asymmetry (skewness) to detect biases in the market.
- Designing trading strategies based on the implied distribution.
- Pricing exotic derivatives or assessing extreme risk events.
Adding this feature will:
- Improve the library's analytical capabilities.
- Provide users with actionable insights into market sentiment.
- Enhance the library's utility for professional options traders.
Feature Scope
Input
- Option Chain: A dataset containing strike prices, option prices (Calls and/or Puts), and time to maturity.
- Risk-Free Rate ((r)): The risk-free interest rate to discount cash flows.
Output
- Risk-Neutral Density (RND): A mapping between strike prices and the implied density.
- Skewness Calculation: A scalar value to measure the asymmetry of the RND.
- Visualization: Optional support for generating plots of the RND and implied volatility skew.
Example Use Case
Given an option chain, users can:
- Derive the RND using the Breeden-Litzenberger formula.
- Calculate the mean, variance, and skewness of the RND.
- Use the skewness to infer market sentiment:
- Negative skew: Market expects downside risks.
- Positive skew: Market expects upside potential.
Technical Details
1. Breeden-Litzenberger Formula
Use the second derivative of the Call option prices with respect to strike ((K)) to calculate the RND:
[
q(K) = e^{rT} \frac{\partial^2 C(K)}{\partial K^2}
]
Where:
- (C(K)): Call option price as a function of the strike.
- (r): Risk-free interest rate.
- (T): Time to maturity.
2. Skewness Calculation
Compute skewness using the RND:
[
\text{Skewness} = \frac{\int (K - \mu)^3 q(K) , dK}{\sigma^3}
]
Where:
- (\mu): Mean of the RND.
- (\sigma): Standard deviation of the RND.
3. Interpolation
Use cubic splines or another suitable method to interpolate option prices across strikes, ensuring smooth derivatives.
4. Rust Implementation Plan
- Create a struct
OptionChainto encapsulate option data. - Add methods for:
- Interpolation of option prices.
- Calculation of first and second derivatives.
- Derivation of the RND.
- Calculation of statistical measures (mean, variance, skewness).
- Optional: Integrate plotting libraries like
plottersfor visualization.
Acceptance Criteria
-
OptionChainstruct implemented with the required data fields. - Functionality to derive the RND using the Breeden-Litzenberger formula.
- Method to calculate skewness and other statistical properties of the RND.
- Unit tests to validate the RND and skewness calculations.
- (Optional) Plotting utility to visualize the RND and implied volatility skew.
Additional Context
This feature can be a significant enhancement for users interested in advanced options analytics. It aligns with the library's goal of providing robust tools for options trading and market analysis.
References
- Breeden, D. T., & Litzenberger, R. H. (1978). Prices of State-Contingent Claims Implicit in Option Prices.
- Practical guides on deriving RND from option chains.
Next Steps
- Discuss the implementation details and prioritize the feature.
- Assign the task to contributors or collaborators.
- Review progress and iterate as necessary.
Labels
enhancementquantitative-financeoptions-analysis