RiskReversalCurve vs DollarGammaCurve: Comparing Volatility Skew and Gamma Risk Metrics in optionstratlib

RiskReversalCurve measures volatility skew by comparing implied volatilities of calls versus puts at the same strike, while DollarGammaCurve quantifies gamma risk in monetary terms by converting the gamma Greek into dollar exposure based on spot price.

The optionstratlib crate provides sophisticated options analytics through its metrics module, exposing trait-based interfaces for calculating derivative risk curves. Both RiskReversalCurve and DollarGammaCurve are traits defined in the risk metrics submodule that generate Curve structures mapping strike prices to metric values. While they share a common interface pattern, they represent fundamentally different market concepts—volatility skew versus gamma risk—and employ distinct mathematical formulations.

What is RiskReversalCurve?

Concept and Mathematical Foundation

The RiskReversalCurve trait captures volatility skew by measuring the difference between implied volatility (IV) of out-of-the-money calls and puts at identical strike prices. This metric reveals market directional bias: positive values indicate bullish sentiment (calls command higher IV), while negative values suggest bearish positioning. In equity markets, the curve typically exhibits an upward slope, starting negative at low strikes and approaching zero or positive territory at higher strikes.

Implementation Details

According to the optionstratlib source code, the trait is defined in src/metrics/risk/risk_reversal.rs. The core formula implemented is:


RR(K) = IV_call(K) - IV_put(K)

Where K represents the strike price. The trait requires implementations to return a Curve where the X-axis represents strike prices and the Y-axis contains the risk reversal values as decimals. The implementation can fail with CurveError::ConstructionError when the option chain lacks strikes containing both call and put IV data.

Typical Usage Scenarios

Traders utilize RiskReversalCurve for sentiment analysis and skew trading strategies. By monitoring how the curve shifts over time, practitioners can identify changing market biases and adjust directional hedges accordingly. The metric serves as a crucial input for volatility arbitrage and risk management frameworks.

What is DollarGammaCurve?

Concept and Mathematical Foundation

The DollarGammaCurve trait translates abstract gamma exposure into concrete monetary terms, producing dollar gamma values. While standard gamma measures the rate of delta change relative to underlying price movements, dollar gamma quantifies the actual P&L impact by incorporating the spot price squared. This curve typically displays a bell-shaped pattern, peaking at at-the-money (ATM) strikes where gamma risk concentrates, and symmetrically declining toward both tails.

Implementation Details

The trait definition resides in src/metrics/risk/dollar_gamma.rs. The implemented formula follows the standard dollar gamma calculation:


Dollar Gamma = Γ × S² × 0.01

Where Γ represents the option gamma and S denotes the current spot price of the underlying. The resulting Curve maps strike prices (X-axis) to dollar gamma values (Y-axis) in currency units. Like its counterpart, this trait can return CurveError::ConstructionError when valid gamma values cannot be computed or required underlying data is unavailable.

Typical Usage Scenarios

Portfolio managers employ DollarGammaCurve for quantifying gamma risk in portfolio dollar terms, enabling precise position sizing and hedge calculations. The metric proves essential for P&L attribution during gamma-driven market moves and for stress-testing portfolios against specific underlying price scenarios.

Key Differences Between RiskReversalCurve and DollarGammaCurve

Understanding the distinction between these metrics requires examining their conceptual foundations, mathematical formulations, and practical applications.

Conceptual Purpose RiskReversalCurve serves as a volatility skew indicator, comparing market pricing of calls versus puts to reveal directional sentiment. DollarGammaCurve functions as a risk quantification tool, converting gamma exposure into actual dollar amounts to measure potential P&L volatility.

Mathematical Formulation The risk reversal calculation relies exclusively on implied volatility differentials: IV_call - IV_put. Conversely, dollar gamma requires Greek calculations combined with spot price squared: Γ × S² × 0.01, incorporating both option sensitivity and underlying price magnitude.

Curve Characteristics Risk reversal curves typically exhibit upward sloping patterns in equity markets, transitioning from negative to positive values across the strike spectrum. Dollar gamma curves display bell-shaped, symmetric profiles centered around ATM strikes, reflecting the concentration of gamma risk near the current underlying price.

Error Conditions Both traits can fail with CurveError::ConstructionError, but for different reasons: RiskReversalCurve fails when strikes lack paired call/put IV data, while DollarGammaCurve fails when gamma calculations are impossible or underlying spot data is missing.

Practical Code Examples

The following examples demonstrate how to generate these curves using the optionstratlib API.

Computing Risk Reversal Curve

use optionstratlib::chains::chain::OptionChain;
use optionstratlib::metrics::RiskReversalCurve;
use optionstratlib::pos;

let chain = OptionChain::new(
    "SPY",
    pos!(450.0),
    "2024-03-15".to_string(),
    None,
    None
);

let rr_curve = chain.risk_reversal_curve()
    .expect("Failed to construct risk reversal curve");

// Access curve points: (strike, risk_reversal_value)
for point in rr_curve.points {
    println!("Strike: {}, RR: {}", point.x, point.y);
}

Computing Dollar Gamma Curve

use optionstratlib::chains::chain::OptionChain;
use optionstratlib::metrics::DollarGammaCurve;
use optionstratlib::model::OptionStyle;
use optionstratlib::pos;

let chain = OptionChain::new(
    "SPY",
    pos!(450.0),
    "2024-03-15".to_string(),
    None,
    None
);

let dg_curve = chain.dollar_gamma_curve(&OptionStyle::Call)
    .expect("Failed to construct dollar gamma curve");

// Access curve points: (strike, dollar_gamma_value)
for point in dg_curve.points {
    println!("Strike: {}, $Gamma: {}", point.x, point.y);
}

Both examples follow the same high-level workflow—call the respective trait method on an OptionChain and handle the Result to access the underlying Curve data structure.

Summary

  • RiskReversalCurve measures volatility skew via implied volatility differentials between calls and puts, revealing market directional bias through the formula IV_call - IV_put.
  • DollarGammaCurve quantifies gamma risk in dollar terms using Γ × S² × 0.01, converting abstract Greeks into concrete P&L impact values.
  • Both traits reside in the metrics module (src/metrics/risk/) and return standardized Curve structures mapping strikes to metric values.
  • Risk reversal curves typically slope upward (negative to positive), while dollar gamma curves exhibit bell-shaped symmetry around ATM strikes.
  • Both can fail with CurveError::ConstructionError when required data (paired IVs for risk reversal, gamma values for dollar gamma) is unavailable.

Frequently Asked Questions

Can I compute both curves from the same OptionChain instance?

Yes. Since both RiskReversalCurve and DollarGammaCurve are implemented as traits on OptionChain, you can call both risk_reversal_curve() and dollar_gamma_curve() on the same chain instance. Each method generates an independent Curve without modifying the underlying option chain data.

Why does dollar gamma use the spot price squared in its calculation?

The dollar gamma formula Γ × S² × 0.01 incorporates the spot price squared because gamma measures the change in delta per unit change in underlying price. To convert this to a dollar P&L impact for a 1% move (0.01), you must account for both the gamma sensitivity and the magnitude of the underlying price move, which scales with the square of the spot price.

What does a positive risk reversal value indicate about market sentiment?

A positive risk reversal value indicates that out-of-the-money calls are trading at higher implied volatilities than puts at the same strike distance. This typically signals bullish market sentiment or demand for upside protection/call buying. Conversely, negative values suggest bearish sentiment with puts commanding higher implied volatilities.

How do I handle CurveError::ConstructionError when computing these curves?

When calling risk_reversal_curve() or dollar_gamma_curve(), always handle the Result type using ? or match statements. For RiskReversalCurve, ensure your option chain contains strikes with both call and put implied volatility data. For DollarGammaCurve, verify that valid gamma values can be computed and that underlying spot price data is available. Consider filtering the chain for valid strikes before curve generation to prevent construction errors.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →