Deep Dive: Risk Management Module (rmrisk + rmsfas)
Narrative
The Risk Management module measures and manages the interest rate risk of the mortgage pipeline and hedge positions. It supports full risk analysis with rate shift scenarios, What-If analysis with phantom trades, position reconciliation, fallout and correlation analysis, and SFAS 133 (ASC 815) hedge effectiveness testing.
The module uses a directive-driven step system where each analysis step can be augmented with custom stored procedures, data pipelines, or external processes. Risk analysis models three scenarios (lower rate, current rate, higher rate) with beta-weighted rate shifts and DPC-based price sensitivity.
Risk Analysis Process Flow
Detailed Steps (55+ orchestrated steps)
- Clear Analysis Tables -- Truncate prior results
- Load Prices -- Ingest prices from DDE/modified sources into
rmtmp_prices, validate, write tormcat_todays_prices - Calculate Par Rates -- Interpolate par rates from price grids
- Calculate DPCs -- Compute raw and continuum Dollar Price Changes
- Import Loans -- Load qualifying loans from
loantable intormcat_loan - Analyze Loan Eligibility -- Determine which instruments each loan qualifies for
- Calculate Loan Values -- For each rate shift in the rate cone, calculate loan position values using closing ratios and DPCs
- Import Trades -- Load active trades from
pscat_tradesintormcat_trades - Analyze Trade Values -- For each rate shift, calculate trade values using DPCs and beta values
- Calculate Gains/Losses -- Net loan positions against trade positions to determine hedged/unhedged exposure
- Position Reconciliation -- Aggregate by segment to produce position summary (
rmcat_risk_pos_recon) - Archive Results -- Store analysis snapshot in
rmcat_risk_analysis_history
Each step can trigger directive actions (stored procedures, data pipelines, external processes) for customer-specific customization.
Three-Scenario Model
Risk analysis evaluates three interest rate scenarios:
| Scenario | Description |
|---|---|
| Lower Rate | Rates decline by rate cone amount; pipeline value increases, hedge value decreases |
| Current Rate | Current market rates; baseline position |
| Higher Rate | Rates increase by rate cone amount; pipeline value decreases, hedge value increases |
Rate shifts are configured in Rate Cones (rmcat_rate_cones + rmcat_rate_cone_values), defining the magnitude of rate change per time horizon.
Beta-Weighted Rate Shifts
Each instrument can have a beta value (rmcat_inv_instr_beta_values) that adjusts the rate shift sensitivity. For example, a 15-year instrument might have a beta of 0.8 relative to the 30-year benchmark, meaning a 100bp shift in 30-year rates translates to an 80bp shift for that instrument.
Position Reconciliation
Position reconciliation summarizes the risk exposure by:
- Profile -- Named risk analysis configuration
- Segment -- Grouping of instruments (e.g., by term or type)
- Position Summary Group -- Further grouping for reporting
- Security Class -- MBS class designation
For each combination, the system calculates:
- Loan position (pipeline exposure)
- Trade position (hedge exposure)
- Net position (gap)
- Dollar change per rate shift
- Percentage change per rate shift
Results stored in rmcat_risk_pos_recon (current), rmcat_risk_pos_recon_prior (prior day), and rmcat_risk_pos_recon_arc (archived).
What-If Analysis
What-If analysis allows users to model hypothetical hedging strategies without affecting the base analysis:
- User opens
w_what_if_analysis - Creates phantom trades (
phantom_indicator = 'y') representing potential hedges - System runs a limited risk analysis including the phantom trades
- Target Coach (
n_cst_hedge_coach) helps size trades to reach a target hedge ratio - Results show how the phantom trades would change the position summary
Phantom trades are flagged and excluded from actual settlement but included in risk calculations.
SFAS 133 (ASC 815) Hedge Effectiveness
The SFAS module (rmsfas) tests hedge accounting compliance:
Similar Asset Groups (SAGs)
Loans with similar characteristics are grouped into SAGs (rmcat_sfas_sim_asset_groups). Each SAG has:
- Associated instruments (
rmcat_sfas_group_inst_rel) - Note rate ranges (
rmcat_sfas_group_rate_rel) - Effectiveness thresholds
Hedge Effectiveness Testing
Key tables:
rmcat_sfas_loans/rmcat_sfas_trades-- Loaded positionsrmcat_sfas_loans_curr_gains/rmcat_sfas_trades_curr_gains-- Current period MTMrmcat_sfas_loans_prior_gains/rmcat_sfas_trades_prior_gains-- Prior period MTMrmcat_sfas_curr_sa_mtm_chg-- Current SAG-level MTM changermcat_sfas_sa_mtm_change-- Historical MTM changesrmcat_sfas_mtm_change_control-- Control records for MTM tracking
Effectiveness Ratio
The standard SFAS 133 effectiveness test requires that the ratio of hedge MTM change to hedged item MTM change falls within 80% to 125%.
Fallout Analysis
Analyzes historical loan fallout patterns to predict future closing ratios:
- Loads loan history data from
loan_historyand historical rate data - Applies exponential smoothing (
smoothing_factor) to rate history - Calculates fallout rates by loan category and rate environment
- Produces closing ratio curves used in risk analysis
Correlation Analysis
Analyzes statistical relationships between interest rate movements and pipeline behavior:
- Loads rate history into
rmtmp_ca_rate_history - Computes correlation coefficients between rate series
- Results stored in
rmcat_correlation_analysis - Used to validate hedging assumptions
Business Rules
- Profile hierarchy -- Profiles can have parent profiles (
parent_profile_name); child profiles inherit parameters - Rate cone configuration -- Each profile specifies which rate cone to use for its rate shift scenarios
- Closing ratios -- Applied to loan positions to adjust for expected fallout; reduces the effective pipeline exposure
- Segment isolation -- Each segment is analyzed independently; cross-segment netting is not automatic
- Archive flag -- Profiles with
archive_results = 'y'save analysis snapshots to history - Active instruments only -- Only instruments with
rm_authorized_hedging_instr = 'y'are included - Phantom trade exclusion -- Phantom trades are included in What-If but excluded from regular analysis
- SFAS 80-125 rule -- Hedge effectiveness ratio must be between 0.80 and 1.25 for hedge accounting qualification
Data Model
Configuration Tables
| Table | Purpose |
|---|---|
rmcat_profile_names | Risk profile definitions (hierarchy, archive flag) |
rmcat_setup_profile_parameters | Per-profile parameters |
rmcat_setup_risk_parameters | Global risk parameters |
rmcat_segment_names | Segment definitions |
rmcat_setup_segment_names | Segment-to-profile mapping |
rmcat_setup_instruments | Instruments per profile |
rmcat_rate_cones | Rate cone definitions |
rmcat_rate_cone_values | Rate shift values per cone |
rmcat_risk_directives | Directive definitions |
rmcat_closing_ratio_codes | Closing ratio code definitions |
rmcat_closing_ratios | Closing ratio values |
Analysis Tables
| Table | Purpose |
|---|---|
rmcat_loan | Loans loaded for analysis |
rmcat_trades | Trades loaded for analysis |
rmcat_risk_pos_recon | Position reconciliation results |
rmcat_risk_analytics_values | Analytics calculation results |
rmcat_benchmark_values | Benchmark comparison values |
rmcat_what_if_graph | What-If analysis results |
History/Archive Tables
| Table | Purpose |
|---|---|
rmcat_risk_analysis_history | Analysis run history |
rmcat_risk_analysis_hist_prof | Profiles included in each analysis |
rmcat_ra_history_loans | Archived loan positions |
rmcat_ra_history_trades | Archived trade positions |
rmcat_risk_pos_recon_prior | Prior day's position recon |
rmcat_risk_pos_recon_arc | Archived position recon |
SFAS Tables
| Table | Purpose |
|---|---|
rmcat_sfas_sim_asset_groups | Similar asset group definitions |
rmcat_sfas_group_inst_rel | SAG-to-instrument mapping |
rmcat_sfas_group_rate_rel | SAG note rate ranges |
rmcat_sfas_parameters | SFAS analysis parameters |
rmcat_sfas_loans / rmcat_sfas_trades | SFAS positions |
rmcat_sfas_*_gains | MTM gain/loss tracking (current, prior, day-old) |
rmcat_sfas_sa_mtm_change | SAG-level MTM changes |