Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

margin-operations

FreeNo executable scriptsNot checked

Guide margin lending, margin requirements, and margin call operations for brokerage and advisory accounts. Use when calculating Reg T initial margin or buying…

JoelLewisby JoelLewis★ 273 GitHub stars

About this skill

Margin Operations

Core Concepts

Regulation T Initial Margin

The Federal Reserve's Regulation T establishes the initial margin requirement for purchasing securities on credit. Key provisions:

  • 50% initial margin requirement: An investor must deposit at least 50% of the purchase price of marginable securities. For a $100,000 purchase, the investor must deposit $50,000 (cash or marginable securities); the broker-dealer may lend the remaining $50,000.
  • Reg T buying power: The maximum dollar amount a client can purchase given their available equity. Buying power = SMA x 2 (for equity securities under Reg T). If a client deposits $100,000 cash in a new margin account, buying power is $200,000.
  • Special Memorandum Account (SMA): A bookkeeping entry that tracks the client's excess Reg T equity. SMA increases when: the account has excess equity above 50%, securities are sold, dividends or cash are deposited. SMA decreases when used to purchase securities or withdraw cash. SMA is a high-water mark — it does not decrease when market values decline (unless used).
  • Reg T extension procedures: When a client fails to meet the initial margin requirement by settlement date, the broker-dealer must request an extension from a self-regulatory organization (SRO). Extensions are typically granted for 1-5 business days. Failure to meet the call results in forced liquidation and a 90-day freeze (restricted account).
  • Exempt securities: U.S. government bonds, municipal bonds, and certain agency securities are exempt from Reg T margin requirements — they can be purchased with lower or no initial margin.
  • Day-trade margin: FINRA Rule 4210 provides pattern day traders (4+ day trades in 5 business days) with 4:1 intraday buying power (25% margin) but requires a minimum equity of $25,000 — day-trade buying power = (equity - $25,000 minimum) × 4. Overnight positions revert to standard 2:1 Reg T buying power.

Maintenance Margin

After the initial purchase, ongoing maintenance margin requirements determine the minimum equity the account must maintain:

  • FINRA Rule 4210 minimum: 25% equity for long positions. Account equity = market value of securities minus debit balance. If equity falls below 25% of market value, a maintenance margin call is triggered.
  • House maintenance requirements: Most broker-dealers impose requirements above the FINRA minimum, typically 30-40% for diversified accounts. House requirements vary by firm and may change based on market conditions.
  • Concentrated position margin: Single-stock positions exceeding a threshold (e.g., 40-60% of account value) face elevated margin requirements, often 50-75% or higher. This discourages excessive concentration in margin accounts.
  • Long margin formula: Maintenance call triggered when equity / market value < maintenance requirement, where account equity = market value - debit balance. Equivalently, a call is triggered when market value falls to: debit balance / (1 - maintenance requirement). The call amount due is (maintenance requirement × market value) - equity.
  • Short margin requirements: Short positions require initial margin of 50% (Reg T) and maintenance of 30% of market value (FINRA minimum). Short account equity = credit balance - market value of short securities. A short squeeze (rising prices) increases the maintenance requirement.
  • Options margin: Options strategies have specific margin requirements under FINRA Rule 4210 and exchange rules. Covered calls require no additional margin (shares serve as collateral). Naked short options require substantial margin — typically the greater of: (a) option premium + 20% of underlying value - out-of-the-money amount, or (b) option premium + 10% of underlying value. Spreads have defined-risk margin equal to the maximum loss.

Portfolio Margin

A risk-based margining methodology that can significantly reduce margin requirements for hedged or diversified portfolios:

  • Methodology: Uses the Options Clearing Corporation's Theoretical Intermarket Margin System (OCC TIMS) to compute margin based on the theoretical maximum loss of the portfolio under a range of stress scenarios, rather than applying fixed percentage requirements to each position independently.
  • Eligibility requirements: Minimum account equity of $100,000 (FINRA Rule 4210(g)), options trading approval (typically Level 3 or 4), and the firm may impose additional requirements such as minimum net worth, trading experience, or completion of a portfolio margin agreement.
  • Stress test scenarios: The OCC TIMS model evaluates portfolio profit and loss under standardized moves:
    • Large-cap equities: +/- 15% (with intermediate points at +/- 5%, +/- 10%)
    • Small-cap equities: +/- 10% higher stress (effectively +/- 25%)
    • Broad market indices: +/- 8% to +/- 15%
    • High-volatility securities: firm-specific add-ons
    • The largest theoretical loss across all scenarios becomes the margin re
Full SKILL.md on GitHub

Install margin-operations in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

references/examples.md

FAQ

What does the margin-operations skill do?

Guide margin lending, margin requirements, and margin call operations for brokerage and advisory accounts. Use when calculating Reg T initial margin or buying power, determining maintenance margin or house requirements, evaluating portfolio margin eligibility under OCC TIMS, generating or resolving margin calls (fed call, house call, exchange call, day-trade call), designing forced liquidation waterfall logic, structuring securities-backed lines of credit (SBLOC), computing margin interest impact on returns, assessing concentrated position margin, understanding pattern day trader rules, or reviewing FINRA 4210 and Reg U requirements. Also covers SMA calculations and short margin mechanics. For OTC derivatives margin (variation/initial margin, CSAs, SIMM) see counterparty-risk.

How do I install the margin-operations skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the margin-operations skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare margin-operations with