Skip to content

Add vanna and volga functions#90

Merged
joedursun merged 3 commits into
masterfrom
joe.greeks
May 4, 2026
Merged

Add vanna and volga functions#90
joedursun merged 3 commits into
masterfrom
joe.greeks

Conversation

@joedursun
Copy link
Copy Markdown
Collaborator

Closes #89

Add second-order Black-Scholes Greeks (vanna, volga, charm, veta, color)

Adds five second-order Greeks to the apply-pipeline registry, alongside aliases for natural-language search:

  • bs_vanna — ∂Δ/∂σ = ∂Vega/∂Spot. Sign tracks -d2.
  • bs_volga (a.k.a. vomma) — ∂Vega/∂σ. Sign tracks d1·d2.
  • bs_charm — ∂Δ/∂t, delta decay. The natural completion of the time/space cross-derivatives now that vanna and volga cover space/vol and vol/vol.
  • bs_veta — ∂Vega/∂t, vega decay. Useful for vol-trading P&L attribution.
  • bs_color — ∂Γ/∂t, gamma decay. Sign flips between ATM (gamma builds) and OTM (gamma decays).
  • Search aliases: vanna, volga, vomma, charm, veta, color.

Implementation nuances

  • Calendar-time convention. All time-decay Greeks use ∂x/∂t (not ∂x/∂T), matching the existing bs_theta sign — negative for the long-option holder in the typical ATM case. Wikipedia's published formulas are inconsistent here (some are
    labeled ∂x/∂t but evaluate to ∂x/∂T)
  • Trader-quoted scaling, consistent with existing Greeks.
    • bs_vanna /= 100 — change in bs_delta per 1% vol.
    • bs_volga /= 10000 — change in bs_vega per 1% vol.
    • bs_charm /= 365 — change in bs_delta per day.
    • bs_veta /= 36500 — change in bs_vega per day.
    • bs_color /= 365 — change in bs_gamma per day.
  • No dividends → no option_type. Under the codebase's q=0 assumption, vanna/volga/charm/veta/color are identical for calls and puts (the e^(-qT) call-put difference becomes T-independent). Documented in each description; consistent with how bs_gamma/bs_vega already handle it.
  • bs_theta description updated to include the phrase "Time decay" so the canonical time-decay Greek isn't crowded out of the function search by the new charm/veta/color descriptions.

Copy link
Copy Markdown
Collaborator

@rian-dolphin rian-dolphin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joedursun joedursun merged commit b3e32f0 into master May 4, 2026
5 checks passed
@joedursun joedursun deleted the joe.greeks branch May 4, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please kindly add vanna and volga too

2 participants