Skip to main content
Greeks PnL decomposition: how much of a group of trades’ PnL delta, gamma, vega and theta explain. Each pulse’s PnL is split with a second-order Taylor expansion of the option price, using the greeks the trade carried at the previous pulse and the moves since then::
each times the units held over the interval and price_format_multiplier, the scale Trade.pulse books PnL in. d_iv counts only when both IVs are positive: the data stamps an expiry-day row with iv = 0, which means “no vol”, not a vol move. residual_pnl is what the four terms leave unexplained: cross terms (vanna, volga), the fill-price haircut on a trade’s first mark after open, the time value lost into an expiry-day row, a dark pulse (flat mark, theta still accrues) and noise in the vendor greeks. There is no rho term: the data carries no rate, and its option prices are undiscounted. The rule fits the vanilla option data only. Calendar-spread option roots quote a normal vol, with vega per 1.00 of vol and theta per year, so they come out mis-scaled until their greeks are normalised in the data.

DRIVER_COLUMNS

module-attribute
The columns that add up to actual_pnl: rank them to find what drove the PnL.

pnl_decomposition

Split the PnL of a group of trades into delta, gamma, vega and theta, pulse by pulse. Pass strategy.trades for a whole run, or any subset of it (a tag, a leg, a sleeve). Everything comes from the trades’ recorded histories, so no datafeed is needed and trades loaded from JSON decompose the same as live ones. Parameters Returns Examples
Last modified on November 4, 2026