Calculate a daily cross-sectional liquidity instability proxy from observed volatility, returns, volume, Amihud illiquidity and margin data. TRIGGER - compute_lob_liquidity_shock_shield, audit_lob_liquidity_causality, check_lob_liquidity_gate, rolling liquidity dispersion, liquidity proxy warmup or temporal invariance. SKIP for passive order fill probabilities (limit-order-book-models), measured execution costs (execution-cost-analysis), or parent-order scheduling (execution-algorithms).
Ships in fin-microstructure. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Adapted from Shwai He's v2 implementation. This computes a research feature from daily
observations. The historical function name contains LOB; the inputs do not reconstruct
an order book and the score is not a fill probability, execution cost or calibrated alpha.
✅ Code verification, 2026-10-12: run python scripts/lob_liquidity_shock_shield.py from
this skill directory. Numerical and temporal regression checks live in
tests/test_microstructure_lob_liquidity_shock_shield.py at the repository root.
Each row requires date, symbol, garman_klass_volatility, ret_1d, volume,
margin_balance_z30 and amihud_illiquidity. Dates must parse as timestamps, with unique
symbol/timestamp pairs. Numeric observations must be finite. Volatility, volume and
illiquidity must be nonnegative. Missing features raise instead of receiving invented values.
The script accepts explicit volatility/return aliases listed in _FEATURES; these are
different proxies, not numerically equivalent measurements. volume must be observed
volume, not a turnover z-score. The margin input must already be standardized causally.
Rolling windows count observations per symbol. Warmup outputs remain NaN; score only rows with sufficient history. Rankings use the eligible assets at the same timestamp. Constant cross-sections receive zero. Output preserves the caller's row order and index labels.
🚨 All inputs at a timestamp must already be observable before using its score. A score using the day's closing data cannot support a trade earlier that afternoon. The function does not lag scores or verify when a vendor published the data.
compute_lob_liquidity_shock_shield combines ranks of rolling return dispersion,
volatility dispersion and mean, log-volume dispersion, illiquidity dispersion, and the
margin input. Fixed research weights and clipping are visible in the script; they are
heuristic choices without a claimed out-of-sample benefit.
audit_lob_liquidity_causality perturbs all consumed features after one cutoff and checks
earlier outputs. A supplied signal_col must match the built-in formula, including warmup
NaNs. Correlation alone is insufficient. The audit also rejects insufficient history and
degenerate cross-sectional dispersion. Its passing result covers these numerical checks,
not arbitrary feature-producing code, publication timing, or profitability.
For a different signal formula, use assert_causal from
../../../fin-core/skills/research-integrity-guards/SKILL.md with the actual producer.
For order-book queue models, see ../limit-order-book-models/SKILL.md.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/copulas-and-dependenceSeparate the marginals from the dependence - Gaussian, Student t, Clayton and Gumbel copulas, Kendall's tau, tail dependence coefficients, and what fitting the wrong family costs in the joint tail. TRIGGER - copula, Gaussian copula, t copula, Student t copula, Clayton copula, Gumbel copula, Archimedean copula, Sklar's theorem; tail dependence, lower tail dependence, upper tail dependence, lambda_U, "correlation is not dependence", "correlations go to one in a crisis", joint tail probability, joint exceedance; Kendall's tau, Spearman rho, rank correlation, pseudo-observations, inversion of Kendall's tau, copula MLE, copulas python, copulae, statsmodels copula; diversification benefit, "my VaR says the portfolio is safe". SKIP for estimating a covariance matrix and shrinkage (covariance-and-risk-models), for VaR/CVaR methods and their backtests (risk-measures-var-cvar), and for GARCH marginals (volatility-models)./hawkes-processesFit and test a self-exciting point process for clustered order arrivals - exponential-kernel Hawkes intensity, Ogata thinning, maximum likelihood, the branching ratio, and the random time change that tests the fit. TRIGGER - Hawkes process, self-exciting point process, order arrival clustering, trade clustering, order flow clustering, mutually exciting, branching ratio, alpha over beta, criticality, endogeneity of market activity; Ogata thinning, simulate a point process, tick, hawkeslib, conditional intensity; Hawkes MLE, log-likelihood recursion, random time change, residual analysis, "are my arrivals Poisson", overdispersed counts, Fano factor, "my Poisson confidence interval is too narrow". SKIP for the birth-death queue model of a single price level (limit-order-book-models), for measuring realised activity from a tape (intraday-microstructure), for GARCH and volatility clustering in returns rather than arrivals (volatility-models), and for regime switching (regime-detection)./fin-microstructure:lob-liquidity-shock-shieldfrom fin-microstructure
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin fin-microstructure