Skip to main content

Deep Dive: Pipeline Module (pwrpipe + fallout)

Narrative

The Pipeline module manages the lifecycle of mortgage loans from origination through closing and delivery. It is the foundational module -- every loan enters the system through the pipeline and flows downstream to pricing, pooling, trading, and settlement.

The module handles: loan intake and editing, master agreements and commitments, marketing programs, instrument configuration, reservations, underwriting stages, fallout processing, best efforts commitments, and cost basis definitions.


Loan Lifecycle State Machine


Process Pipeline Flow

The Process Pipeline operation runs underwriting stages and fallout processing on pipeline loans.

Underwriting Stages

  • Stages are defined in pscat_pipeline_underwriting_stages with a sequence number
  • Each stage has criteria (SQL syntax) that loans must meet to pass
  • Stages execute in sequence order; failure at any stage triggers fallout

Fallout Processing

  • Fallout reasons are defined in pscat_pipeline_loan_status_codes
  • Each code has a function (action) associated with it
  • When a loan falls out, it moves from loan to loan_history
  • The fallout reason code and date are recorded

Key Workflows

Edit (Loans)

Opens w_pipeline_edit for direct loan record maintenance. Uses configurable pipeline table name (loan by default) and modifications table (loan_modifications).

Best Efforts

Manages individual loan-level commitments to investors. A best-efforts trade links a loan to an investor instrument with a locked price. Workflows include:

  • Maintain Commitment -- Edit the BE commitment details
  • Process -- Run pricing and allocation for BE loans
  • Settle/Unsettle -- Complete or reverse delivery
  • Reconcile Prices -- Compare locked vs current pricing

Master Agreements

Hierarchical agreements: Master Agreement → Master Commitments → Marketing Programs → Instruments. Each level can have its own:

  • Dollar amount and limit type (hard/soft)
  • Securitization rules (SQL syntax for loan eligibility)
  • Loan feature sublimits

Reservations

Capacity reservations with guarantors for future pool delivery. Supports:

  • GFee grids (guarantee fee schedules)
  • Loan assignment tracking
  • Cancellation management
  • Roll operations (extending reservation dates)
  • Merge operations (combining reservations)

Instruments

Instrument maintenance by type:

TypeRM Trade Type FamilyKey Fields
LoanLoan product definitions
MBSmbsCoupon rate, security class, guarantor
Whole LoanwlCash grid type, servicing fee
FuturesfcContract size, expiration date
TreasurytsBond/note pricing
EurodollareuroContract size

Business Rules

  1. Pipeline table is configurable -- The system reads is_pipeline_table and is_pipeline_modifications_table from configuration, defaulting to loan and loan_modifications
  2. Underwriting stages execute in sequence -- A loan must pass each stage before advancing
  3. Fallout is irreversible in normal flow -- Once moved to loan_history, a loan does not automatically return (manual reimport is required)
  4. Best efforts tolerance -- BE commitments have separate tolerance rules from mandatory trades
  5. Master agreement hierarchy -- Limits cascade: MA amount caps MC totals, MC amount caps program totals
  6. Instrument type determines downstream behavior -- The rm_trade_type_family field drives trading, pooling, pricing, and risk behavior for any entity using that instrument

Data Model

TablePurpose
loanActive pipeline loans
loan_historyFallen-out loans
loan_shippedSettled/delivered loans
loan_modificationsLoan modification tracking
pscat_master_agreementsMaster agreement definitions
pscat_master_commitmentsMaster commitment definitions
pscat_master_agr_comm_relAgreement-to-commitment junction
pscat_master_comm_prog_relCommitment-to-program junction
pscat_programsMarketing program definitions
pscat_programs_instruments_relProgram-to-instrument junction
pscat_instrumentsInstrument master
pscat_reservationsReservation definitions
pscat_reserv_roll_relReservation roll relationships
pscat_reserv_merge_relReservation merge relationships
pscat_pipeline_underwriting_stagesUnderwriting stage definitions
pscat_pipeline_loan_status_codesFallout reason codes
pscat_pipeline_proc_profilesPipeline process profiles
pscat_trades_best_effortsBest efforts commitment data
pscat_securitization_rulesSecuritization rule definitions
pscat_guarantorsGuarantor definitions
rmcat_cost_basis_namesCost basis name definitions