Broker Margin Optimizer
Compare margin requirements and all-in funding costs across prime brokers for any equity portfolio.
Overview
The Broker Margin Optimizer compares portfolio margin requirements and daily carry costs across 8 prime brokers. It combines margin methodology differences with per-broker funding tier schedules to produce a true all-in cost comparison at the position level.
The optimizer answers a simple question: which prime broker is cheapest for my specific portfolio?
The answer depends on the portfolio's characteristics — concentration, volatility, liquidity, market cap mix, and hedging profile — because each broker weights these factors differently.
Brokers
| # | Broker | Type | Key Sensitivity |
|---|---|---|---|
| 1 | Prime House | Modeled (4-scenario stress) | Baseline — 200 DMA, cap buckets, vol shock |
| 2 | Inactive Broker | Published | Concentration (top-2 singleton), small-cap shift |
| 3 | TD Schwab | Published | Expected Price Range (EPR), Point of No Return (PNR) |
| 4 | Clean Street | Modeled (dual Rule/Risk) | Basis credits, crash/surge stress |
| 5 | Goldmin Sochs | Estimated | Tightest on concentration + volatility |
| 6 | PJ Gorman | Estimated | Rewards hedging, penalizes vol + small-cap |
| 7 | Stanly Gordin | Estimated | Harshest on illiquidity + small-cap |
| 8 | MiMac SA | Estimated (extreme stress) | 3 largest longs to zero, largest short +300% |
Brokers 1-4 use published or modeled methodologies. Brokers 5-7 use a parameterized framework with portfolio-aware adjustments — their margin parameters shift dynamically based on the portfolio's risk profile.
Portfolio-Aware Adjustments
The estimated brokers start from a base parameterized configuration and then adjust key parameters based on the portfolio's computed profile:
Goldmin Sochs
- Concentration: widens the concentration stress range when issuer HHI exceeds 1,500
- Volatility: widens scan ranges when weighted-average vol exceeds 35%
- Liquidity: increases the liquidity multiplier when illiquid positions exceed 10% of MV
- Sector HHI: bumps the narrow concentration range when sector HHI exceeds 2,000
PJ Gorman
- Hedging reward: increases the netting offset when net/gross ratio drops below 30%
- Volatility: widens scan ranges when weighted-average vol exceeds 40%
- Small-cap: raises the minimum margin floor when small-cap exposure exceeds 25%
- Diversification: lowers narrow concentration range for diversified sector books
Stanly Gordin
- Liquidity: sharply increases the liquidity multiplier for small-cap-heavy books (>20%)
- DTL threshold: tightens the days-to-liquidate trigger for illiquid books
- Sector concentration: widens concentration charge when sector HHI exceeds 2,000
- Large-cap reward: lowers minimum floor for diversified large-cap books
These adjustments ensure that rank order genuinely changes with different portfolio types:
- Diversified large-cap hedged book: PJ Gorman tends to be cheapest (netting benefit)
- Concentrated high-vol book: Goldmin Sochs and Stanly Gordin tend to be most expensive
- Small-cap illiquid book: Stanly Gordin tends to be most expensive
- Simple long-only large-cap book: Clean Street or Inactive Broker tend to be competitive
Portfolio Profile Metrics
The optimizer computes a portfolio profile used to drive broker adjustments and displayed in the Portfolio Profile card:
| Metric | Definition | Impact |
|---|---|---|
| Issuer HHI | sum(w_i^2) * 10,000 where w_i = |mv_i| / grossMV | Concentration charges |
| Sector HHI | Same formula, grouped by sector | Sector diversification |
| Weighted Avg Vol | MV-weighted annual volatility (decimal) | Scan range widening |
| Avg Days to Liq. | avg(shares / avgDailyVolume) per position | Liquidity surcharges |
| Net / Gross | |netMV| / grossMV | Netting benefit |
| Small-Cap % | % of gross MV in market cap below $2B | Small-cap premiums |
HHI Interpretation
- Below 1,000: Diversified — minimal concentration charges
- 1,000 - 2,500: Moderately concentrated — some brokers apply surcharges
- Above 2,500: Highly concentrated — significant surcharges at Goldmin Sochs, Stanly Gordin
Carry Cost Model
The daily carry cost has three components:
1. Margin Capital Cost
marginCostDaily = marginRequirement * costOfCapitalRate / 365
The fund's opportunity cost for posting margin equity. The cost of capital rate is set by the user (default 8%, range 5-35%).
2. Debit Cost (Tiered)
debitCostDaily = sum(positionMV * tierDebitRate / 365) for each long position
The prime broker's financing charge on long positions. The rate is expressed as a spread to Fed Funds Effective and varies by funding tier.
3. Short Rebate (Tiered)
shortRebateDaily = sum(|positionMV| * tierRebateRate / 365) for each short position
Interest rebated on short sale proceeds. Also expressed as a spread to Fed Funds and varies by funding tier.
Net daily carry cost = margin cost + debit cost - short rebate
Funding Tier Schedules
Each broker has its own funding waterfall. High-quality assets receive the base rate; lower-quality assets (small-cap, low-priced, hard-to-borrow) pay a premium.
Default Schedules
| Broker | Tiers | Tier 1 | Tier 2 | Tier 3 | Tier 4 |
|---|---|---|---|---|---|
| Prime House | 2 | Base | Base + 100bp | — | — |
| Inactive Broker | 3 | Base | Base + 75bp | Base + 200bp | — |
| TD Schwab | 2 | Base | Base + 125bp | — | — |
| Clean Street | 3 | Base | Base x 1.5 | Base x 3.0 | — |
| Goldmin Sochs | 4 | Base | Base x 1.5 | Base x 2.0 | Base x 5.0 |
| PJ Gorman | 4 | Base | Base x 1.5 | Base x 2.0 | Base x 5.0 |
| Stanly Gordin | 3 | Base | Base x 1.75 | Base x 3.0 | — |
Tier Formulas
Each tier uses one of two formulas:
- Multiply:
effectiveRate = baseRate * multiplier(e.g., base x 1.5) - Add:
effectiveRate = baseRate + basisPoints / 10,000(e.g., base + 125bp)
The rebate side mirrors debit: higher tiers receive less rebate (lower multiplier or negative basis point add-on).
Tier Assignment
Tiers are auto-assigned by position weight when generating portfolios, and can be
manually overridden in the editable portfolio grid. CSV uploads support an optional
Tier column (0-based index).
Position Transfer Analysis
The Transfer Analysis section compares per-position margin costs between any two selected brokers. For each position:
marginDelta = marginReq_B - marginReq_A
dailyCostDelta = marginDelta * costOfCapitalRate / 365
- Green rows indicate the position is cheaper at Broker B
- Red rows indicate the position costs more at Broker B
- The summary banner shows the total daily and annual savings/cost of moving the entire book
The default selection is the two brokers with the lowest total margin requirements.
Editable Portfolio Grid
The portfolio grid supports full editing after generation or upload:
- Ticker: clickable link to Yahoo Finance quote page
- MV ($M): editable — changes flag the portfolio as dirty, showing "Re-run with Changes"
- Tier: dropdown selector (T1-T4) — changes affect carry cost instantly (no re-run needed)
- Add Row: adds a new position to the bottom of the grid
- Delete (x): removes a position from the grid
MV and row changes require a re-run because they affect margin calculations (API call). Tier changes only affect carry cost (client-side computation) and update instantly.
Rate Inputs
| Input | Range | Default | Description |
|---|---|---|---|
| Cost of Capital | 5% - 35% | 8% | Fund's opportunity cost for posting margin |
| Debit Spread | FFE + 0bp to FFE + 250bp | FFE + 150bp | Prime broker financing rate on longs |
| Short Rebate Spread | FFE - 250bp to FFE + 0bp | FFE - 50bp | Rebate on short sale proceeds |
Per-broker overrides are available for debit rate and short rebate via the "Show Per-Broker Overrides" toggle.
Data Sources
- Market data: Yahoo Finance (price, 200-day MA, market cap, avg volume, beta)
- Implied volatility: Cached vol surface with Python fallback pipeline
- Margin methodologies: OCC TIMS regulatory baseline plus broker-specific house add-ons
- Fed Funds Effective: 4.33% (updated periodically)
Limitations
- Estimated broker margin requirements are illustrative. Actual requirements are negotiated per client agreement and are not publicly disclosed.
- Funding tier schedules are illustrative defaults. Real broker schedules depend on the client relationship, portfolio size, and specific securities.
- The carry cost model assumes a simplified financing structure. Real prime brokerage agreements include additional fees (ticket charges, custody, technology) not modeled here.
- Position-level margin attribution is approximate — concentration and netting effects are portfolio-level phenomena allocated per-position by the individual methodologies.