FerroRisk

Contract analytics

Solve implied volatility, forward, and Greeks on one evaluation path.

Use contract_analytics when a row has an observed market price and you need the solved implied volatility, explicit forward, and full Greek set together.

use ferro_risk::{
    contract_analytics, ExerciseStyle, IvSolveInputs, OptionType, PricingModel,
};
 
let inputs = IvSolveInputs {
    option_type: OptionType::Call,
    exercise_style: ExerciseStyle::European,
    spot: 100.0,
    strike: 100.0,
    time_to_expiry: 0.5,
    rate: 0.03,
    dividend_yield: 0.01,
};
 
let market_price = 6.10;
let analytics = contract_analytics(
    &inputs,
    market_price,
    PricingModel::BlackScholesMerton,
)?;
 
let implied_vol = analytics.iv.iv;
let forward = analytics.forward;
let model_price = analytics.greeks.price;
let delta = analytics.greeks.delta;
# Ok::<(), ferro_risk::FerroRiskError>(())

The result keeps the solved IV metadata and Greeks together so consumers do not accidentally recompute the base point on a different path.