Option-Model Visual Report

This notebook assembles a compact, presentation-ready set of figures for one option position: Black–Scholes call and put payoffs, a value profile, extrinsic value, standardized Greeks, price and extrinsic-value surfaces, a binomial lattice put, a SABR volatility smile, and a strategy payoff — all built from the same underlying market inputs.

Sections:

  1. Build the models

  2. Numerical diagnostics

  3. The figure set

Setup

import abaquant
print(f"AbaQuant version: {abaquant.__version__}")
AbaQuant version: 1.0.0rc1
from abaquant.derivatives import OptionStrategy
from abaquant.derivatives.models import BlackScholesMertonModel, CoxRossRubinsteinModel
from abaquant.derivatives.models.sabr import SABRVolatilityModel
from abaquant.visualization import VisualizationError

1. Build the models

A Black–Scholes model, a binomial lattice, and a SABR smile — all sharing spot=100, strike=105, T=1y.

models = {
    "black_scholes": BlackScholesMertonModel(100.0, 105.0, 1.0, 0.05, 0.22),
    "lattice": CoxRossRubinsteinModel(100.0, 105.0, 1.0, 0.05, 0.22, number_of_steps=8),
    "sabr": SABRVolatilityModel(100.0, 105.0, 1.0, 0.20, 0.7, -0.25, 0.45),
}

2. Numerical diagnostics

The scalar values that correspond to the figures below.

report_values = {
    "bsm_call_price": models["black_scholes"].call_price(),
    "bsm_put_price": models["black_scholes"].put_price(),
    "bsm_call_extrinsic_value": models["black_scholes"].extrinsic_value("call"),
    "bsm_call_moneyness": models["black_scholes"].moneyness(),
    "bsm_call_forward_moneyness": models["black_scholes"].forward_moneyness(),
    "bsm_call_break_even_price": models["black_scholes"].break_even_price("call"),
    "lattice_put_price": models["lattice"].put_price(),
    "sabr_atm_iv": models["sabr"].implied_vol(),
}
for key, value in report_values.items():
    print(f"{key:30s}: {value:.6f}")
bsm_call_price                : 8.814354
bsm_put_price                 : 8.693444
bsm_call_extrinsic_value      : 8.814354
bsm_call_moneyness            : 0.952381
bsm_call_forward_moneyness    : 1.001211
bsm_call_break_even_price     : 113.814354
lattice_put_price             : 8.864647
sabr_atm_iv                   : 0.049417

3. The figure set

Eleven figures covering payoff, value profile, extrinsic decomposition, Greeks, surfaces, the lattice, the SABR smile, and a strategy payoff.

try:
    figures = {
        "call_payoff": models["black_scholes"].visualize(chart="payoff", option_type="call"),
        "put_payoff": models["black_scholes"].visualize(chart="payoff", option_type="put"),
        "call_value_profile": models["black_scholes"].visualize(
            chart="price_profile", option_type="call"
        ),
        "call_extrinsic_profile": models["black_scholes"].visualize(
            chart="extrinsic_value", option_type="call"
        ),
        "call_greeks": models["black_scholes"].visualize(
            chart="greeks", option_type="call", greek_scale="standardized"
        ),
        "call_price_surface": models["black_scholes"].visualize(
            chart="price_surface", option_type="call", grid_size=31, volatility_grid_size=15
        ),
        "call_extrinsic_surface": models["black_scholes"].visualize(
            chart="extrinsic_surface", option_type="call", grid_size=31, volatility_grid_size=15
        ),
        "put_lattice": models["lattice"].visualize(chart="tree", option_type="put"),
        "sabr_smile": models["sabr"].visualize(chart="volatility_smile"),
        "strategy_payoff": OptionStrategy.bull_call_spread(
            lower_strike=100.0, upper_strike=115.0, lower_premium=6.0, upper_premium=2.0
        ).visualize(chart="payoff"),
    }
    print(f"Created {len(figures)} figures: {list(figures)}")
except VisualizationError as exc:
    print(f"Visualization skipped (optional dependency missing): {exc}")
Created 10 figures: ['call_payoff', 'put_payoff', 'call_value_profile', 'call_extrinsic_profile', 'call_greeks', 'call_price_surface', 'call_extrinsic_surface', 'put_lattice', 'sabr_smile', 'strategy_payoff']
../../_images/eae82041f74f408db1f641271a5b703151f8ecf4ac4b2532cab4c16b0cb2b61c.png ../../_images/92ffce8d6c5e340861e193711fe983a87363c2f183b32705c5498f0c976bcaee.png ../../_images/964604b18e1ecc213f3759ab7cc96e97a9687aaf9c47771f576230275c00d6a0.png ../../_images/75397afffed5afd9ceff5742b1c15d645c2d7edabda4060065405bc4afef26a7.png ../../_images/5e1db68e7f7e7f8029322c1ba89e7f2935471c453be1064dc9c71573fce73fe6.png ../../_images/0c5d3fde049a8e5da8335d70fc9eb0195240b4ee7a6ec26505f1473f1c3bf65d.png ../../_images/a07b0b110f4ba06a14044cfb632a62f72cce0435c0552444f87d827a8aea8298.png ../../_images/b9ead5f5b8bfbde7ce97736d880d48442aa7273f566ae9664c7a3086a7f0bbb6.png ../../_images/2b7fb1eedb8c45197120e1fa7e8c0bd3760ba02d681376992639c4d80e821d06.png ../../_images/176214fb4f36c1f60c90979c1f36727150b52648014596e4418be4e52f612340.png

Takeaway

This is a good template for a one-position “tear sheet.” Combine it with model.report(option_type=...) (see notebook 21 — Exportable Reports) to turn the same diagnostics into a Markdown/HTML/PDF deliverable.