greeks-pattern - Expose Greeks via GreeksExt trait in stochastic-rs
Implement the GreeksExt trait to compute first- and second-order Greeks (delta, gamma, vega, theta, rho, vanna, charm, volga, veta) for pricers via finite-difference defaults or single-pass Monte Carlo overrides.
Tags
Updated: 2026-06-30Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Implement GreeksExt trait for pricers
- Compute first-order Greeks via finite difference
- Compute second-order cross-Greeks
- Override greeks() for MC pricers
- Share MC paths across all Greeks
- Return NaN for inapplicable Greeks
- Configure custom bump sizes
Inputs
- PricerExt implementation
- Monte Carlo simulation paths
- Bump size parameters
- Pricing model parameters (spot, vol, rate, maturity)
Outputs
- Greeks struct with nine f64 sensitivity values
- Greek consistency test results
Requirements
- stochastic-rs-quant crate
- Rust development environment
- PricerExt trait implementation
