# TF Jump & Tail Risk Decomposition

This read-only indicator separates recent realized variation into a bipower continuous component and a non-negative jump component. It also exposes downside semivariance, 20-bar window volatility and a robust current-return tail surprise.

## Interpretation

| State | Rule and precedence |
|---|---|
| TAIL EVENT | Tail surprise at least 6 MAD units |
| JUMP DOMINATED | Jump share at least 35% |
| DOWNSIDE ASYMMETRY | Downside share at least 70% and current return negative |
| ROUTINE | All remaining observations |

State order is intentional: an extreme robust tail event overrides jump share, which overrides downside asymmetry. Bar 0 is explicitly preliminary. The optional alert is off and triggers only after a closed bar enters TAIL EVENT.

## Data and outputs

The indicator uses 20 log returns. Realized variation is the sum of squared returns; bipower variation uses adjacent absolute-return products with the finite-sample factor `(π/2) × 20/19`. Jump variation is `max(RV − BV, 0)`. Tail surprise compares the current return with the median and MAD of 252 strictly older returns. Flat histories safely produce zero volatility/jump and a neutral 50% downside share.

Published buffers expose jump share, downside share, continuous share, tail MAD units, non-annualized 20-bar volatility and state code.

## Inputs

- `InpMaxBars`: 300–100,000 bars; default 5,000.
- `InpShowDashboard`: compact preliminary status panel.
- `InpEnableTailAlert`: off by default; confirmed TAIL EVENT only.
- `InpDebugLog`: optional history/data diagnostics.

This is risk decomposition, not a probability model, direction forecast, trade recommendation or promise of profit.
