Skip to main content

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)

  1. Clear Analysis Tables -- Truncate prior results
  2. Load Prices -- Ingest prices from DDE/modified sources into rmtmp_prices, validate, write to rmcat_todays_prices
  3. Calculate Par Rates -- Interpolate par rates from price grids
  4. Calculate DPCs -- Compute raw and continuum Dollar Price Changes
  5. Import Loans -- Load qualifying loans from loan table into rmcat_loan
  6. Analyze Loan Eligibility -- Determine which instruments each loan qualifies for
  7. Calculate Loan Values -- For each rate shift in the rate cone, calculate loan position values using closing ratios and DPCs
  8. Import Trades -- Load active trades from pscat_trades into rmcat_trades
  9. Analyze Trade Values -- For each rate shift, calculate trade values using DPCs and beta values
  10. Calculate Gains/Losses -- Net loan positions against trade positions to determine hedged/unhedged exposure
  11. Position Reconciliation -- Aggregate by segment to produce position summary (rmcat_risk_pos_recon)
  12. 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:

ScenarioDescription
Lower RateRates decline by rate cone amount; pipeline value increases, hedge value decreases
Current RateCurrent market rates; baseline position
Higher RateRates 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:

  1. User opens w_what_if_analysis
  2. Creates phantom trades (phantom_indicator = 'y') representing potential hedges
  3. System runs a limited risk analysis including the phantom trades
  4. Target Coach (n_cst_hedge_coach) helps size trades to reach a target hedge ratio
  5. 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 positions
  • rmcat_sfas_loans_curr_gains / rmcat_sfas_trades_curr_gains -- Current period MTM
  • rmcat_sfas_loans_prior_gains / rmcat_sfas_trades_prior_gains -- Prior period MTM
  • rmcat_sfas_curr_sa_mtm_chg -- Current SAG-level MTM change
  • rmcat_sfas_sa_mtm_change -- Historical MTM changes
  • rmcat_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_history and 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

  1. Profile hierarchy -- Profiles can have parent profiles (parent_profile_name); child profiles inherit parameters
  2. Rate cone configuration -- Each profile specifies which rate cone to use for its rate shift scenarios
  3. Closing ratios -- Applied to loan positions to adjust for expected fallout; reduces the effective pipeline exposure
  4. Segment isolation -- Each segment is analyzed independently; cross-segment netting is not automatic
  5. Archive flag -- Profiles with archive_results = 'y' save analysis snapshots to history
  6. Active instruments only -- Only instruments with rm_authorized_hedging_instr = 'y' are included
  7. Phantom trade exclusion -- Phantom trades are included in What-If but excluded from regular analysis
  8. SFAS 80-125 rule -- Hedge effectiveness ratio must be between 0.80 and 1.25 for hedge accounting qualification

Data Model

Configuration Tables

TablePurpose
rmcat_profile_namesRisk profile definitions (hierarchy, archive flag)
rmcat_setup_profile_parametersPer-profile parameters
rmcat_setup_risk_parametersGlobal risk parameters
rmcat_segment_namesSegment definitions
rmcat_setup_segment_namesSegment-to-profile mapping
rmcat_setup_instrumentsInstruments per profile
rmcat_rate_conesRate cone definitions
rmcat_rate_cone_valuesRate shift values per cone
rmcat_risk_directivesDirective definitions
rmcat_closing_ratio_codesClosing ratio code definitions
rmcat_closing_ratiosClosing ratio values

Analysis Tables

TablePurpose
rmcat_loanLoans loaded for analysis
rmcat_tradesTrades loaded for analysis
rmcat_risk_pos_reconPosition reconciliation results
rmcat_risk_analytics_valuesAnalytics calculation results
rmcat_benchmark_valuesBenchmark comparison values
rmcat_what_if_graphWhat-If analysis results

History/Archive Tables

TablePurpose
rmcat_risk_analysis_historyAnalysis run history
rmcat_risk_analysis_hist_profProfiles included in each analysis
rmcat_ra_history_loansArchived loan positions
rmcat_ra_history_tradesArchived trade positions
rmcat_risk_pos_recon_priorPrior day's position recon
rmcat_risk_pos_recon_arcArchived position recon

SFAS Tables

TablePurpose
rmcat_sfas_sim_asset_groupsSimilar asset group definitions
rmcat_sfas_group_inst_relSAG-to-instrument mapping
rmcat_sfas_group_rate_relSAG note rate ranges
rmcat_sfas_parametersSFAS analysis parameters
rmcat_sfas_loans / rmcat_sfas_tradesSFAS positions
rmcat_sfas_*_gainsMTM gain/loss tracking (current, prior, day-old)
rmcat_sfas_sa_mtm_changeSAG-level MTM changes