Skip to content
RateStack
Capability · Comp & margin

Comp, margin, and overlays — layered for how your org actually works.

Org → Entity (BRANCH·REGION·TEAM·DIVISION·CORPORATE) → Loan Officer hierarchy with typed org roles (ORIGINATOR / INVESTOR / CORRESPONDENT / SUBSERVICER). Layered margin rules with effective dating. Per-org pricing and guideline overlays with merge priority and sign-policy enforcement. Compensation plans with tier logic.

Overview

What it is, in one paragraph

Margin rules attach at any level of the hierarchy: PLATFORM, ORG, ENTITY (BRANCH / REGION / TEAM / DIVISION / CORPORATE), or OFFICER. Each rule carries an effective range (start + optional end). At pricing time, the engine resolves the applicable stack from broadest (platform default) to narrowest (officer override) and layers them onto the base price. Beyond margin, the platform supports per-org pricing overlays and guideline overlays — subscription-gated, with merge priority and sign-policy enforcement, so wholesale lenders can ship investor-specific overlays without code changes. Compensation plans handle the LO comp side with tiered logic over loan amount, product, or volume.

  • Typed Org hierarchy

    ORIGINATOR / INVESTOR / CORRESPONDENT / SUBSERVICER. Each org type carries default OrgRoles and a capability set.

  • Five-type Entity tree

    BRANCH / REGION / TEAM / DIVISION / CORPORATE. Entities nest naturally; resolution respects the path.

  • Effective dating

    Every rule carries a start (and optional end) date. Pricing as-of 2025-11 uses the rules effective then — useful for audit and replay.

  • Pricing + guideline overlays

    Per-org overlays with merge priority and sign-policy enforcement. Subscription-gated activation; backfill endpoints for admin.

  • Compensation plans

    Per-officer plans with tiered logic (basis points by loan amount, product, volume). Plans bind to officers via assignment with their own effective range.

  • Applicable-margin API

    Inspect the resolved stack for any (org, entity, officer, asOf) tuple. Returns rules in resolution order with each rule's contribution.

  • Audit trail

    Every margin / comp / hierarchy / overlay change writes a row to the platform audit chain with actingAsOrgId. Who, when, from-state → to-state, why.

How it works

The pipeline, end to end.

Numbered steps from input to output. Each step maps to a specific subsystem you can inspect via OpenTelemetry.

  1. 1

    Define your hierarchy

    Create orgs and assign type. Build entities under the org (BRANCH, REGION, TEAM, etc.). Assign officers to entities. Moves write audit rows.

  2. 2

    Attach margin rules

    Add a rule at any level with an effective start (and optional end). Rules are versioned — editing replaces, never mutates.

  3. 3

    Configure overlays

    Per-org pricing or guideline overlays with merge priority. Sign-policy enforcement gates activation; backfill endpoints help admins migrate historical loans.

  4. 4

    Bind comp plans

    Define plans with tier logic; bind plans to officers with their own effective range. An officer can have a sequence of plans over their tenure.

  5. 5

    Engine resolves at pricing time

    On every quote, the engine resolves the applicable margin stack + overlay set for the borrower's officer + entity + org as of now (or as-of any timestamp for replay).

  6. 6

    Layer onto base price

    Each rule fires in resolution order with its declared combine strategy. The trace shows which level contributed how much, in what order, and which overlays merged.

Hands on

Inspect applicable margin as-of a timestamp

Live cURL sample — copy, paste, ship.

# Inspect applicable margin at a point in time
curl 'https://api.ratestack.com/v1/admin/comp/margins/applicable?\
orgId=org_X&entityId=ent_Y&loanOfficerId=lo_Z&asOf=2026-04-01T00:00:00Z' \
  -H "X-API-Key: $RATESTACK_KEY"

# Returns the rules that applied on 2026-04-01, in resolution order:
# [{ "level":"PLATFORM",  "value": 0.250, ... },
#  { "level":"ORG",       "value": 0.125, "orgType":"ORIGINATOR", ... },
#  { "level":"ENTITY",    "value": 0.250, "entityType":"BRANCH", ... },
#  { "level":"OFFICER",   "value": 0.000, ... }]

Why this matters

The pain it removes.

Comp changes don't break audits

Effective dating means historical pricing replays correctly. A comp change today does not retroactively rewrite last quarter's quotes.

Branches stop arguing with HQ

When an entity sees their margin and overlays in the trace, they can audit it themselves. No more 'what number did corporate use'.

Wholesale ships overlays without code

Investor-specific pricing and guideline overlays land via admin endpoints with sign-policy enforcement. New investor onboarding is configuration, not a release.

M&A is survivable

Move entities between orgs; the resolution path updates and the audit chain captures the move. Re-org of corp structure does not require a re-import.

Frequently asked

Direct answers, no marketing spin.

What happened to 'branch'?

BRANCH is still a first-class Entity type. The concept generalized: entities now also include REGION, TEAM, DIVISION, and CORPORATE so multi-state and multi-layer orgs can model their structure without contortions.

Can rules combine across levels?

Yes. The combine strategy is per-rule. Most platforms use SUM at platform/org and OVERRIDE at entity/officer; the engine supports any combination.

How do overlays differ from margin rules?

Margin rules are price additions/subtractions. Overlays modify entire rule sets — investor-specific guideline tightening (e.g., 'this investor adds 20bps for cash-out >70 LTV'). Overlays are sign-policy gated and subscription-aware.

How do you handle an officer who works across entities?

Assignments carry effective ranges. An officer can have overlapping entity assignments; the engine picks the one effective for the loan's transaction date and falls back to the rest of the hierarchy from there.

Are comp plan changes retroactive?

Never automatically. Comp plans bind via effective ranges; changing today does not affect a loan that priced yesterday. If you need a retroactive correction, do it explicitly with a journal entry.

Ready to see it on your data?

Wire comp, margin, and overlays — layered for how your org actually works. up to your real workflow.

We'll spin you a sandbox, load your actual ratesheets, and walk you through this capability against your top scenarios.

Comp & margin — Org/Entity/LO with overlays + sign policy | RateStack