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_stageswith 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
loantoloan_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:
| Type | RM Trade Type Family | Key Fields |
|---|---|---|
| Loan | — | Loan product definitions |
| MBS | mbs | Coupon rate, security class, guarantor |
| Whole Loan | wl | Cash grid type, servicing fee |
| Futures | fc | Contract size, expiration date |
| Treasury | ts | Bond/note pricing |
| Eurodollar | euro | Contract size |
Business Rules
- Pipeline table is configurable -- The system reads
is_pipeline_tableandis_pipeline_modifications_tablefrom configuration, defaulting toloanandloan_modifications - Underwriting stages execute in sequence -- A loan must pass each stage before advancing
- Fallout is irreversible in normal flow -- Once moved to
loan_history, a loan does not automatically return (manual reimport is required) - Best efforts tolerance -- BE commitments have separate tolerance rules from mandatory trades
- Master agreement hierarchy -- Limits cascade: MA amount caps MC totals, MC amount caps program totals
- Instrument type determines downstream behavior -- The
rm_trade_type_familyfield drives trading, pooling, pricing, and risk behavior for any entity using that instrument
Data Model
| Table | Purpose |
|---|---|
loan | Active pipeline loans |
loan_history | Fallen-out loans |
loan_shipped | Settled/delivered loans |
loan_modifications | Loan modification tracking |
pscat_master_agreements | Master agreement definitions |
pscat_master_commitments | Master commitment definitions |
pscat_master_agr_comm_rel | Agreement-to-commitment junction |
pscat_master_comm_prog_rel | Commitment-to-program junction |
pscat_programs | Marketing program definitions |
pscat_programs_instruments_rel | Program-to-instrument junction |
pscat_instruments | Instrument master |
pscat_reservations | Reservation definitions |
pscat_reserv_roll_rel | Reservation roll relationships |
pscat_reserv_merge_rel | Reservation merge relationships |
pscat_pipeline_underwriting_stages | Underwriting stage definitions |
pscat_pipeline_loan_status_codes | Fallout reason codes |
pscat_pipeline_proc_profiles | Pipeline process profiles |
pscat_trades_best_efforts | Best efforts commitment data |
pscat_securitization_rules | Securitization rule definitions |
pscat_guarantors | Guarantor definitions |
rmcat_cost_basis_names | Cost basis name definitions |