AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Margin Operations

skill-joellewis-finance-skills-margin-operations · by JoelLewis

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 wa…

No reviews yet
0 installs
3 views
0.0% view→install

Install

$ agentstack add skill-joellewis-finance-skills-margin-operations

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-joellewis-finance-skills-margin-operations)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Margin Operations? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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. 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 $100K = call rate + 0.5% (spreads and the call rate itself vary by firm and rate environment)
  • Tax treatment of margin interest: Margin interest is deductible as investment interest expense on Schedule A (Form 1040), but only up to the amount of net investment income. Excess margin interest can be carried forward. Investment interest does not include qualified dividends or long-term capital gains unless the taxpayer elects to treat them as ordinary income. This deduction requires itemizing.

Key Formulas

| Formula | Expression | Use Case | |---------|-----------|----------| | Reg T buying power | SMA x 2 | Maximum purchase amount | | Initial margin requirement | Purchase price x 50% | Cash/equity deposit required | | Account equity (long) | Market value - debit balance | Current equity in account | | Maintenance call trigger (long) | Debit balance / (1 - maintenance %) | Price at which call is triggered | | Maintenance call amount | (Maintenance % x market value) - equity | Dollar amount due | | Short account equity | Credit balance - market value (short) | Equity in short positions | | Margin interest (daily) | Debit balance x (annual rate / 360) | Daily interest accrual | | Leveraged return | (Portfolio return x leverage) - (interest x (leverage - 1)) | Return on equity with margin | | SBLOC borrowing capacity | Sum(collateral value x LTV by type) | Maximum loan amount | | Day-trade buying power | (Equity - $25,000 minimum) x 4 | Intraday purchasing power |

Worked Examples

Three worked examples are in [references/examples.md](references/examples.md) — load for an end-to-end scenario: (1) calculating margin requirements and buying power for a new diversified account, (2) managing a margin call sequence from generation through resolution, (3) evaluating portfolio margin vs Reg T for an active options trader.

Common Pitfalls

  • Confusing SMA with account equity — SMA is a high-water mark that does not decline with market value drops, leading clients to believe they have more cushion than they do
  • Failing to account for margin interest as a drag on returns — at the 7-8% margin rates typical of recent rate environments, the hurdle rate for margined positions is substantial
  • Relying on Reg T buying power without monitoring maintenance levels — a position can be purchased within buying power but quickly trigger a maintenance call after a decline
  • Assuming portfolio margin is always more favorable — concentrated, unhedged positions may receive similar or higher margin under portfolio margin stress tests
  • Not planning for margin call deadlines — margin calls arrive during market stress when the client is least likely to have available cash
  • Treating SBLOC as "free" liquidity — a market decline can trigger a collateral call simultaneously with the investment losses, creating a double impact
  • Liquidating positions for margin calls without considering tax consequences — forced sales may realize gains or losses at inopportune times
  • Pattern day trader margin surprise — accounts can be reclassified as pattern day trader and face the $25,000 minimum equity requirement unexpectedly
  • Ignoring correlation between margin calls and market stress — the client's ability to deposit cash may be impaired at exactly the time a margin call demands it
  • Assuming the firm must contact the client before liquidation — the firm has the right to liquidate margin-deficient accounts without prior notice or client consent
  • Overlooking the purpose/non-purpose distinction in SBLOCs — using non-purpose loan proceeds to buy securities violates Regulation U and can result in regulatory action

Regulatory Reference Summary

| Regulation / Rule | Authority | Scope | |-------------------|-----------|-------| | Regulation T | Federal Reserve | Initial margin for broker-dealer credit | | Regulation U | Federal Reserve | Credit by banks secured by margin stock | | FINRA Rule 4210 | FINRA | Maintenance margin, portfolio margin, day-trade margin | | SEC Rule 15c3-3 | SEC | Customer protection, segregation of funds | | FINRA Rule 4521 | FINRA | Margin reporting requirements to FINRA | | OCC TIMS | Options Clearing Corporation | Theoretical pricing model for portfolio margin |

Cross-References

  • order-lifecycle (trading-operations): Margin requirements are checked as part of the order validation and pre-trade process
  • trade-execution (trading-operations): Forced liquidation requires best execution compliance even under time pressure
  • settlement-clearing (trading-operations): Margin is settled as part of the trade settlement process; fails can trigger margin obligations
  • lending (wealth-management): SBLOC products overlap with personal lending analysis; HELOC vs SBLOC comparison
  • liquidity-management (wealth-management): Margin calls create sudden liquidity demands that must be anticipated in cash flow planning
  • pre-trade-compliance (trading-operations): Pre-trade margin checks prevent orders that would exceed margin capacity
  • operational-risk (trading-operations): Margin system failures, forced liquidation errors, and call processing breakdowns are key operational risks
  • counterparty-risk (trading-operations): Margin lending creates counterparty exposure between the firm and the client
  • investment-suitability (compliance): Margin accounts and leverage strategies require suitability assessment
  • diversification (wealth-management): Concentrated position margin requirements reinforce diversification principles

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.