Agent skill · data analytics · tradermonty

residual-edge-analyzer

Separate a strategy return series into declared baseline exposure and residual edge with returns-based OLS attribution, HAC inference, rolling stability, alternate-baseline sensitivity, and regime breakdowns. Use when evaluating whether backtest, out-of-sample, or live returns contain independent alpha beyond market, equal-weight, momentum, sector, or user-supplied factor returns; when explaining whether a drawdown came from baseline exposure or strategy-specific behavior; or when a strategy needs an attribution quality gate after backtesting. Do not use for holdings-based Brinson attribution, feature-level Shapley explanations, or analysis from summary metrics without a dated return series.

Why this skill is useful

Provides specific commands and domain-specific knowledge for returns-based OLS attribution analysis that the AI wouldn't reliably generate on its own.

What it needs

Requires python installed locally. About 3k tokens when loaded. Last updated 2026-08-06. 2,581 stars on the source repository.

What this skill does

Residual Edge Analyzer Overview Test whether a strategy's apparent performance survives explicit comparison with predeclared baseline return series. Produce an auditable JSON artifact and a concise Markdown report without fetching data or changing trading exposure. Treat this as a falsification gate after backtest-expert, not as trade authorization. Prerequisites Use Python 3.9+. Prepare one CSV containing an ISO date, strategy return, and every baseline return on the same row. Prepare a JSON specification following references/input-contract.md. Supply actual period returns. Do not substitute CAGR, Sharpe, cumulative P&L, or other summary metrics. Workflow 1. Define the question before inspecting results State the claimed independent edge in one sentence. Select a primary baseline that is a plausible simple copy of the strategy, then select at least one alternate baseline model. Record these declarations in the config: baselineselection: predeclared strategyreturnbasis and baselinereturnbasis: both gross or both net analysisscope: outofsample, live, or insample universedata: pointintime, currentconstituents, or notapplicable Every declaration is mandatory for a decision-grade verdict. Omitting one is treated as undeclared, not as benign, and drops the report to REVIEWREQUIRED. notapplicable exists so that a baseline with no universe membership can be declared explicitly rather than left blank. Do not choose a baseline because it gives the preferred residual result. 2. Validate the return-series contract Require: unique ISO dates; finite numeric returns greater than -100%; identical frequency and cost basis across strategy and baselines; point-in-time membership for same-universe equal-weight or momentum baselines; regime labels defined independently of the loss periods being explained. Stop if the input lacks a dated strategy return series. Report summary-only input as insufficient rather than inventing observations. 3. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills tradermonty/residual-edge-analyzer

View the source on GitHub

Browse the @skills marketplace