US trading rules that decide whether a strategy is executable at all - short-sale restrictions, margin, settlement, day-trading limits, and what a data licence lets you keep. TRIGGER - can I short this, locate, hard to borrow, borrow fee, short interest, Reg SHO, uptick rule, SSR, short sale restricted; PDT, pattern day trader, day trade limit; Reg T, initial or maintenance margin, margin call, buying power, leverage limit; T+1, settlement, cash account; "can I redistribute this data"; may_cache, may_redistribute, market data licence; presenting or publishing backtested performance, Marketing Rule. Two of the most-cited rules moved in 2024-2026, so a training-prior answer is usually stale. US ONLY - SKIP for short-selling bans or calendars in Asia (asia-pacific-markets), for A-share T+1 and price limits (china-trading-stack) for the order-safety mechanics of sending an order (broker-execution-apis), and for tax arithmetic - wash sales, lot matching, after-tax returns - which the fin-tax-accounting skills own.
Ships in fin-core. 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.
None: SKILL.md is the whole skill.
Engineering context, not legal advice — confirm against the primary release before relying on it. Verified 2026-09-04.
Key every rule to a date. A backtest over 2015 must apply the 2015 rulebook; a live path in 2026 applies the current one. The two most-cited rules in trading tutorials both moved recently, so a model answering from its training prior will usually be wrong about them.
| Rule | Status | Consequence |
|---|---|---|
| Pattern Day Trader (PDT) | 🚨 ELIMINATED effective 2026-06-04 (SEC Release 34-105226), replaced by intraday margin | Keep PDT in the backtester for pre-2026-06-04 periods; remove it from live paths. Any strategy previously rejected for needing >3 day-trades/5 days on a <$25k account needs re-evaluating |
| Settlement | ✅ T+1 since 2024-05-28 (was T+2) | Free-riding and good-faith-violation windows shortened; cash-account strategies that relied on T+2 float no longer work |
| SEC predictive-data-analytics / AI proposal | ✅ WITHDRAWN 2025-06-17 | Do not design to it |
| Marketing Rule (206(4)-1) | In force, with March 2025 and January 2026 FAQs | Governs how hypothetical/backtested performance may be presented — §4 |
After a security drops 10% intraday from the prior close, short sales may only execute above the national best bid for the rest of that day and the next.
Shorting into a crash is frequently not executable at the price the backtest assumed. This hits mean-reversion and short-the-spike strategies precisely where they book their best trades — the fills that carry the P&L are the ones the rule would have blocked or repriced.
If your strategy shorts weakness, model the SSR trigger or state plainly that you did not. It is not a small correction: the constraint binds only on the days the strategy makes its money.
A locate. A short sale requires the broker to locate borrowable shares before execution. In a backtest this is a silent assumption; in life it is a hard gate that fails exactly on crowded names.
A borrow fee. Hard-to-borrow names carry a rate that can dwarf the alpha, and the rate is not constant — it moves with demand, which correlates with the signal that made you want the short.
🚨 A short backtest with no borrow-cost model is not a backtest. See the borrow column in
../backtesting-engines/references/_engine-matrix.md — every free engine is ❌ on it, so the model
has to come from you.
⚠️ This library does not yet carry verified sources for borrow rates or short-interest data. That is a known gap, not an omission by design; candidates to evaluate are the IBKR shortable-shares feed, FINRA short interest, and SEC threshold/fails-to-deliver lists.
Initial margin 50% for equities; maintenance minimum 25% (brokers set higher, and the broker's number is the one that liquidates you). This determines achievable leverage and the size of a margin-call cascade in a drawdown.
A backtest that levers 3x without checking whether Reg T permits it at that account type is modelling an account that cannot exist.
A loss is disallowed if a substantially identical security is repurchased within ±30 days.
Irrelevant to gross backtest returns. Decisive for after-tax returns in a taxable account, and it interacts badly with high-turnover strategies and with tax-loss-harvesting logic that is trying to do the opposite. If you report after-tax numbers, this is not optional.
The Marketing Rule treats hypothetical performance — which includes backtests — as requiring policies reasonably designed to ensure relevance to the intended audience, plus disclosure of the criteria and assumptions used and the risks and limitations.
Whenever a backtest number leaves your machine:
../research-integrity-guards/scripts/result_manifest.py emits most of this by construction.
Vendors differ on four separate permissions, and none of them is implied by the package's open source licence:
| Permission | Meaning |
|---|---|
may_cache | May you store the data locally at all, and for how long |
may_redistribute | May you pass it to another person or system |
may_derive | May you publish derived values (an index, a signal, a chart) |
display_only | Is non-display / algorithmic use prohibited or separately priced |
Concrete cases: Yahoo is "intended for personal use only" — yfinance's Apache-2.0 licence covers the code, not the data. Tiingo: "you may only use the data for your own personal use and you may not display or share the data with another person or organization." IBKR market data is per-exchange, per-account, with non-display use priced separately. Chinese scrapers (akshare, efinance, adata) pull from sites whose ToS prohibit systematic extraction; 反不正当竞争法 Art. 12 and 数据安全法 have both been applied to this.
Nobody encodes these as machine-readable metadata. That is a real gap this library could fill.
Rules here are US-centric.
../../../fin-china/skills/china-ashare-data/SKILL.md../../../fin-asia/skills/asia-pacific-markets/SKILL.md| If you are | Read this because |
|---|---|
Sending orders (../broker-execution-apis/SKILL.md) | §1 settlement and §4 margin decide what the account can actually do |
Choosing a backtest engine (../backtesting-engines/SKILL.md) | §2 and §3 are constraints no free engine models for you |
Auditing a result (../research-integrity-guards/SKILL.md) | §6 is the reporting standard; §2 is a common reason a short-side edge is fictional |
Building an LLM trading agent (../../../fin-llm/skills/llm-finance-agents/SKILL.md) | Personalized investment advice is regulated under the Investment Advisers Act — explain mechanics, do not recommend securities or allocations as suitable for a particular person |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
18 skills in this plugin
/backtesting-enginesChoose a backtesting engine and know what it silently models wrong. TRIGGER - "backtest this", backtest a crossover or a moving-average strategy, simulate a strategy, walk-forward, parameter sweep, "test this trading idea"; comparing or choosing backtest frameworks; vectorbt, backtesting.py, backtrader, zipline, PyBroker, bt, nautilus_trader, LEAN, freqtrade, jesse; how an engine models fills, slippage, commissions; what slippage to assume, partial fills, margin, shorting or delistings; taking a strategy from backtest to live; "my backtest looks too good"; "works in backtest but loses money live". Several popular engines fill at the signal's own bar close by default. SKIP for judging whether a finished result is real (backtest-validation) for A-share rules (china-trading-stack), for crypto funding and perpetuals (crypto-data-and-execution), for options, which need assignment and settlement no engine here models (options-backtesting), and for measuring fills you already have (execution-cost-analysis)./backtest-overfittingDecide whether an edge that passed every mechanical check is still just the best of N tries. TRIGGER - PBO, probability of backtest overfitting, CSCV, combinatorially symmetric cross validation, logit of the out-of-sample rank; minimum backtest length, MinBTL, "how much history do I need", "how many parameter sets can I try on N years of data"; a grid search, Optuna or AutoML picked a winner and it decayed; "in-sample Sharpe 2, live Sharpe 0", "the best parameter set stopped working", "is this peak on my parameter surface real"; pypbo, RiskLabAI CSCV. SKIP for the deflated and probabilistic Sharpe ratios, the trial ledger and SPA/StepM/MCS against a benchmark (backtest-validation); for family-wise error and false-discovery control over a whole research programme (multiple-testing-ledger); for the purged and combinatorial CV splitters themselves (lib-purgedcv); for the mechanical leakage gates that come first (research-integrity-guards); and for regime coverage of the test window (regime-detection)./fin-core:us-market-rulesfrom fin-core
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin fin-core