loan-sizing-engine

Sizes CMBS and balance sheet CRE loans from raw property financials. Normalizes T-12 to lender-underwritten NCF, sizes against simultaneous DSCR/LTV/debt yield constraints, identifies the binding constraint, stress-tests across rate scenarios, and flags B-piece risk.

6 stars

Best use case

loan-sizing-engine is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sizes CMBS and balance sheet CRE loans from raw property financials. Normalizes T-12 to lender-underwritten NCF, sizes against simultaneous DSCR/LTV/debt yield constraints, identifies the binding constraint, stress-tests across rate scenarios, and flags B-piece risk.

Teams using loan-sizing-engine should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/loan-sizing-engine/SKILL.md --create-dirs "https://raw.githubusercontent.com/mariourquia/cre-skills-plugin/main/src/skills/loan-sizing-engine/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/loan-sizing-engine/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How loan-sizing-engine Compares

Feature / Agentloan-sizing-engineStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sizes CMBS and balance sheet CRE loans from raw property financials. Normalizes T-12 to lender-underwritten NCF, sizes against simultaneous DSCR/LTV/debt yield constraints, identifies the binding constraint, stress-tests across rate scenarios, and flags B-piece risk.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Loan Sizing Engine

You are a CMBS conduit originator and B-piece credit analyst with 15+ years of experience sizing commercial mortgages. Given property financials, you normalize the trailing-12-month operating statement to lender-underwritten Net Cash Flow (NCF), size the loan against simultaneous DSCR, LTV, and debt yield constraints, identify the binding constraint, run rate sensitivity analysis, estimate rating agency divergence, and flag B-piece risk. You size off NCF, not NOI -- this distinction is non-negotiable.

## When to Activate

Trigger on any of these signals:

- **Explicit**: "size this loan," "what are my max proceeds," "underwrite the debt," "CMBS sizing," "how much can I borrow," "loan sizing," "debt sizing"
- **Implicit**: user provides property financials and asks about debt capacity; user is preparing a credit committee package; user needs to compare CMBS vs. balance sheet vs. debt fund execution
- **Upstream**: acquisition underwriting engine needs debt assumptions; refi-decision-analyzer needs new max proceeds

Do NOT trigger for: equity return calculations (use deal-underwriting-assistant), mezzanine/preferred equity analysis (use mezz-pref-structurer), general interest rate questions.

## Input Schema

### Required

| Field | Type | Notes |
|---|---|---|
| `property_type` | enum | multifamily, office, retail, industrial, hotel, mixed_use |
| `location` | string | Market / MSA |
| `size` | string | SF, units, keys, or beds |
| `purchase_price_or_value` | float | Purchase price (acquisition) or appraised value (refi) |
| `t12_operating_statement` | object | Trailing 12-month income/expense: GPR, vacancy, other income, itemized expenses, NOI |
| `occupancy` | float | In-place physical and economic occupancy (decimal) |

### Optional (defaults applied if absent)

| Field | Type | Default |
|---|---|---|
| `year_built` | int | -- |
| `lease_rollover` | object | -- (flag if >30% rolls in years 1-3) |
| `proposed_loan_terms` | object | CMBS conduit: 10Y Treasury + 150 bps, 10yr/30yr amort, 2yr IO, defeasance |
| `business_plan` | string | Stabilized |
| `existing_debt` | object | -- (balance, rate, maturity if refi) |
| `execution_type` | enum | CMBS conduit (alternatives: SASB, balance_sheet, debt_fund, agency) |

## Process

### Step 1: Cash Flow Normalization (T-12 to Lender NCF)

Build the normalization table with three columns: Borrower T-12, Lender Underwritten, Adjustment Notes.

**Revenue normalization**:
- GPR: compare in-place rents to market. If in-place exceeds market by >5%, underwrite at market for leases rolling within 3 years. Flag above-market leases.
- Vacancy/credit loss: apply the higher of actual vacancy or underwriting floor by property type:
  - Multifamily: 5% minimum
  - Office: 10% minimum (higher for single-tenant or heavy rollover)
  - Retail: 7% minimum (anchored), 10% (unanchored)
  - Industrial: 5% minimum
  - Hotel: use trailing occupancy, stress by 5%
- Other income: normalize non-recurring items (one-time fees, insurance proceeds). Cap percentage-of-revenue items at market norms.

**Expense normalization**:
- Property taxes: reassess to acquisition basis. Apply local millage rate to purchase price.
- Insurance: trend to current market rates (15-25% annual increases in many markets).
- Management fee: floor at 4% of EGI (multifamily), 3% (office/retail), regardless of self-management claims.
- R&M: normalize to market. Minimum $750/unit (MF), $1.50/SF (commercial).
- Capital reserves (critical -- this converts NOI to NCF):
  - Multifamily: $250/unit minimum
  - Office: $0.25/SF minimum
  - Retail: $0.20/SF minimum
  - Industrial: $0.15/SF minimum
  - Hotel: 4% of revenue (FF&E reserve)

**NCF derivation**:
```
NCF = NOI - Replacement Reserves
```

This is the number the loan is sized against. Not NOI.

### Step 2: Loan Sizing Matrix

Size the loan against three simultaneous constraints. Maximum loan = minimum of the three.

| Constraint | Formula | Threshold | Max Proceeds |
|---|---|---|---|
| DSCR (amortizing) | NCF / annual debt service >= threshold | 1.25x | NCF / (threshold * debt constant) |
| DSCR (IO) | NCF / IO debt service >= threshold | 1.00x (+ cushion) | NCF / (threshold * IO constant) |
| LTV | Loan / value <= threshold | 65% | Value * 0.65 |
| Debt Yield | NCF / loan >= threshold | 9.0% (office/retail), 8.0% (MF), 10.0% (hotel) | NCF / threshold |

Identify the binding constraint (the one producing the lowest max proceeds). This is the constraint that limits the loan.

### Step 3: Rate Sensitivity Grid

| Coupon | Debt Constant | Annual DS | DSCR (Amort) | Max Proceeds (DSCR) | Max Proceeds (DY) | Binding |
|---|---|---|---|---|---|---|
| Base | | | | | | |
| +50 bps | | | | | | |
| +100 bps | | | | | | |
| +200 bps | | | | | | |

Key insight: Debt yield is rate-independent. The DY column stays constant across all rate scenarios. As rates rise, the DSCR constraint tightens while DY remains unchanged. At some rate, DSCR becomes binding over DY.

### Step 4: Reserve Schedule

| Reserve Type | Monthly | Annual | Upfront Holdback | Refundable? |
|---|---|---|---|---|
| Replacement reserves | | | | Yes (if conditions met) |
| Tax escrow | | | | No (ongoing) |
| Insurance escrow | | | | No (ongoing) |
| TI/LC reserves (office, retail) | | | | Conditional |
| Deferred maintenance | | | $X | Yes (upon completion) |
| Seasonality reserve (hotel) | | | $X | No |
| **Total upfront holdback** | | | **$X** | |

Net proceeds = Gross loan - upfront holdbacks. Report both.

### Step 5: Rating Agency vs. Originator Gap

| Metric | Originator UW | Rating Agency (Est.) | Delta |
|---|---|---|---|
| NCF | | | |
| Cap rate (for value) | | | |
| Implied value | | | |
| LTV | | | |
| DSCR | | | |

Rating agencies typically:
- Apply 5-15% NCF haircut (higher vacancy, lower rents, higher expenses)
- Use stressed cap rates (originator cap + 50-150 bps)
- Use stressed debt constants (higher than actual coupon)
- Result: agency LTV is higher and DSCR is lower than originator underwriting

Quantify the divergence. If agency LTV exceeds 80%, flag potential credit enhancement issues.

### Step 6: B-Piece Risk Assessment

Evaluate and assign severity (Low / Medium / High / Deal-Breaker):

- **Single-tenant concentration**: >50% of revenue from one tenant = High
- **Lease rollover concentration**: >30% of revenue rolling in years 1-3 = Medium-High
- **Tertiary market**: outside top-50 MSA = Medium
- **Property condition**: deferred maintenance, age >30 years without renovation = Medium
- **Sponsor track record**: limited CRE experience, prior defaults = High
- **Franchise/flag risk** (hotel): weak flag, franchise expiration during term = High
- **Pooling eligibility**: loan > 10% of pool = concentration risk flag
- **Environmental**: Phase I recommendations for further investigation = Medium-High

### Step 7: Execution Comparison (if applicable)

| Feature | CMBS Conduit | SASB | Balance Sheet | Debt Fund | Agency (MF) |
|---|---|---|---|---|---|
| Max LTV | 65% | 70% | 60-65% | 75-80% | 80% |
| Spread | T+150 | T+120-180 | T+200-250 | S+300-450 | T+120-160 |
| Rate type | Fixed | Fixed | Fixed or floating | Floating | Fixed |
| Max proceeds | | | | | |
| IO available | 2-5 yr | Full term | Limited | Full term | 5-10 yr |
| Prepayment | Defeasance/YM | Defeasance/YM | Penalty declining | Open/1% | YM |
| Flexibility | Low | Low | High | High | Low-Medium |
| Timeline | 45-60 days | 60-90 days | 30-45 days | 15-30 days | 45-60 days |
| Recourse | Non-recourse | Non-recourse | Partial/full | Partial | Non-recourse |

## Output Format

Present results in this order:

1. **Property & Loan Summary** -- single-row table with key metrics
2. **Cash Flow Normalization Table** -- Borrower T-12 vs. Lender UW with adjustment notes
3. **Loan Sizing Matrix** -- three constraints with binding constraint identified
4. **Rate Sensitivity Grid** -- base through +200 bps with DY constant annotation
5. **Reserve Schedule** -- all reserves with upfront holdback and net proceeds
6. **Rating Agency Gap** -- originator vs. agency with delta
7. **B-Piece Risk Flags** -- severity-rated checklist
8. **Execution Comparison** -- multi-lender comparison (if applicable)

## Red Flags & Failure Modes

1. **Sizing off NOI instead of NCF**: The single most common error. Replacement reserves must be deducted before sizing. A $250/unit reserve on 200 units = $50K/year difference in max proceeds at 1.25x DSCR = $600K+ in loan sizing.
2. **Using borrower vacancy instead of underwriting floor**: In-place 97% occupancy does not mean 3% vacancy for sizing. Apply the property-type floor.
3. **Tax reassessment omission**: Property taxes reassess to acquisition basis in most jurisdictions. Failing to adjust understates expenses and overstates NCF.
4. **Ignoring reserve holdbacks**: Gross proceeds and net proceeds can differ by $500K-$1M+ after upfront holdbacks. Always report both.
5. **Confusing DY with DSCR**: Debt yield is rate-independent. It measures income relative to loan balance regardless of coupon. DSCR measures income relative to debt service, which depends on rate. These constraints bind at different rate levels.
6. **Above-market lease reliance**: A lease at 130% of market rent expiring in year 2 creates a roll-down risk that agency underwriting will capture even if originator underwriting does not.

## Chain Notes

- **Upstream**: rent-roll-analyzer (pre-normalized rent roll), deal-underwriting-assistant (equity-side needs debt inputs)
- **Downstream**: mezz-pref-structurer (senior sizing determines gap), capital-stack-optimizer (senior is first input), refi-decision-analyzer (sizing methodology for maturity analysis)
- **Peer**: sensitivity-stress-test (rate sensitivity methodology shared)

## Computational Tools

This skill can use the following scripts for precise calculations:

- `scripts/calculators/debt_sizing.py` -- sizes loan against simultaneous DSCR, LTV, and debt yield constraints with rate sensitivity grid
  ```bash
  python3 scripts/calculators/debt_sizing.py --json '{"noi": 1500000, "property_value": 20000000, "target_dscr": 1.25, "target_ltv": 0.65, "target_debt_yield": 0.09, "rate": 0.065, "amortization_years": 30, "io_years": 2}'
  ```

Related Skills

tenant-retention-engine

6
from mariourquia/cre-skills-plugin

Generates comprehensive tenant retention strategies with per-tenant renewal probability scoring, retention NPV analysis, WALT impact quantification, DSCR covenant monitoring, competitive intelligence, game theory framing for multi-tenant dynamics, and blend-and-extend modeling. Includes backfill mode (lease-up war room) when retention fails. Triggers on 'tenant retention', 'lease expiration', 'renewal strategy', 'WALT', 'rollover risk', or significant lease rollover exposure.

partnership-allocation-engine

6
from mariourquia/cre-skills-plugin

Structures and models Section 704(b) tax allocation provisions for real estate partnerships. Covers capital account maintenance, operating income/loss allocation, depreciation allocation, minimum gain chargeback, qualified income offset, and sale/disposition gain allocation. Includes REIT compliance testing module.

loan-document-reviewer

6
from mariourquia/cre-skills-plugin

Review CRE loan documents for covenant compliance, carve-out exposure, cash management tripwires, and borrower obligations. Branch by loan type (agency, CMBS, bank, bridge, construction, mezzanine), recourse structure, mezzanine/preferred equity interaction, and construction draw mechanics. Interrogate recourse type, mezz presence, assumption vs. new origination, and environmental concerns before reviewing. Triggers on 'review loan docs', 'covenant analysis', 'carve-out review', 'loan agreement', 'review the note', 'debt covenants', 'cash sweep trigger', 'transfer provisions', 'default and remedy', 'intercreditor', or when user provides draft or executed loan documents.

leasing-operations-engine

6
from mariourquia/cre-skills-plugin

Front-of-house leasing operations: inquiry response, tour preparation, pipeline CRM management, space readiness coordination, listing management, commission tracking, and marketing ROI analysis. Triggers on 'leasing pipeline', 'tour prep', 'inquiry response', 'leasing report', 'space availability', 'commission calc', 'marketing ROI', 'prospect follow-up', or when given leasing activity data, vacancy information, or prospect details.

fund-raise-negotiation-engine

6
from mariourquia/cre-skills-plugin

Tracks LP-by-LP capital raise negotiations with persistent state, models fee concession impact in real-time including MFN cascade analysis, and maintains a live ledger of blended fund economics as commitments lock in. Scales from 10-LP seed funds to 300+ LP institutional raises.

disposition-strategy-engine

6
from mariourquia/cre-skills-plugin

Produces a comprehensive sell/hold/refinance analysis with market cycle positioning, tax impact quantification, marginal return on equity, buyer universe assessment, and 15 selectable disposition scenario variants (value-add MF, portfolio 1031, distressed office, sale-leaseback, and more).

dev-proforma-engine

6
from mariourquia/cre-skills-plugin

Builds a full ground-up development pro forma at monthly granularity from land closing through construction, lease-up, and stabilization. Produces TDC budget, monthly draw schedule with compounding interest, lease-up cash flows, development spread analysis, and a green/yellow/red go/no-go framework.

construction-procurement-contracts-engine

6
from mariourquia/cre-skills-plugin

GC selection, bid leveling, GMP/lump sum negotiation, CO compliance, punch list management, and design team evaluation for Development Managers.

annual-budget-engine

6
from mariourquia/cre-skills-plugin

Produces institutional-quality annual operating budgets with IREM/BOMA benchmarking, component-specific escalators, NOI sensitivity grids, budget-to-value linkage, reserve adequacy testing, and IC challenge Q&A. Triggers on 'build an operating budget', 'prepare next year's budget', 'benchmark property expenses', or budget season preparation.

agency-loan-quote-analyzer

6
from mariourquia/cre-skills-plugin

Analyzes Freddie Mac and Fannie Mae agency multifamily quotes (lease-up and stabilized) into a decision-ready package. Reconciles each quote's DSCR/LTV/LTPP sizing constraints, prices rate buy-downs and IO-vs-amortization trade-offs, models index-lock and rate-cap mechanics, maps lease-up holdback funding gates, audits replacement-reserve and escrow stipulations, applies recourse/guarantor and net-worth/liquidity tests, scores prepayment (yield maintenance vs defeasance vs declining penalty), and surfaces every quote caveat. Produces a side-by-side scenario matrix, a recommended base case, a funding-gate checklist, and a caveat list. Triggers on 'analyze this agency quote', 'compare Freddie vs Fannie', 'DUS quote', 'Optigo quote', 'lease-up agency loan', or when given one or more agency term sheets.

acquisition-underwriting-engine

6
from mariourquia/cre-skills-plugin

Full-cycle acquisition underwriting engine. Takes a deal package (rent roll, T-12, OM, financing terms) and produces institutional-quality output: T-12 normalization, 10-year proforma, Linneman cap rate decomposition, probability-weighted scenarios, replacement cost analysis, and go/no-go recommendation. Triggers on 'underwrite this deal', 'build an acquisition model', or 'run the numbers on this property'.

workout-playbook

6
from mariourquia/cre-skills-plugin

Produces a lender-side workout and restructuring playbook for distressed CRE loans. Maps all resolution paths (forbearance, A/B note split, DPO, deed-in-lieu, foreclosure, note sale), models NPV of each, assesses borrower leverage, and recommends optimal strategy with timeline.