# Case Study: Mortgage Pipeline Hedging

Back to main page

** Case study background and problem formulations**

**PROBLEM 1: 10-fold Cross-validation (10 in-sample data and 10 out-of-sample data) for CVaR Deviation minimization**

10-fold crossvalidation

Minimize Cvar_dev (minimizing 90%-CvaR deviation)

Value:

L_num(matrix_fact_out)

L_num(matrix_fact_in)

Cvar_dev(0.9, matrix_fact_in)

Meanabs_dev(matrix_fact_in)

St_dev(matrix_fact_in)

Var_risk(0.75, matrix_fact_in)

Var_risk_g(0.75, matrix_fact_in)

Var_risk(0.9, matrix_fact_in)

Var_risk_g(0.9, matrix_fact_in)

——————————————————————–

crossvalidation(N,Matrix) = matrix operation splits input Matrix into N pairs of complementary sub-matrices

Cvar_dev = CVaR Deviation for Loss

Meanabs_dev = Mean Absolute Deviation

St_dev = Standard Deviation

Var_risk = VaR Risk for Loss

Var_risk_g = VaR Risk for Gain

——————————————————————–

Data and solution in Run-File Environment

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.14GHz (sec) |

problem 1 |
Cycle Statement |
Data |
Solution |
3 |
900 |
0.4125034 |
<0.01 |

Data and solution in MATLAB Environment for problem 1

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.50GHz (sec) |

Dataset1 |
Matlab code |
Data |
Solution |
3 |
900 |
0.469855 |
<0.01 |

**PROBLEM 2: 10-fold Cross-validation (10 in-sample data and 10 out-of-sample data) for Mean Absolute Deviation minimization**

10-fold crossvalidation

Minimize Meanabs_dev (minimizing Mean Absolute Deviation)

Value:

L_num(matrix_fact_out)

L_num(matrix_fact_in)

Cvar_dev(0.9, matrix_fact_in)

Meanabs_dev(matrix_fact_in)

St_dev(matrix_fact_in)

Var_risk(0.75, matrix_fact_in)

Var_risk_g(0.75, matrix_fact_in)

Var_risk(0.9, matrix_fact_in)

Var_risk_g(0.9, matrix_fact_in)

——————————————————————–

crossvalidation(N,Matrix) = matrix operation splits input Matrix into N pairs of complementary sub-matrices

Cvar_dev = CVaR Deviation for Loss

Meanabs_dev = Mean Absolute Deviation

St_dev = Standard Deviation

Var_risk = VaR Risk for Loss

Var_risk_g = VaR Risk for Gain

——————————————————————–

Data and solution in Run-File Environment

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.14GHz (sec) |

problem 2 |
Cycle Statement |
Data |
Solution |
3 |
900 |
0.362483 |
<0.01 |

Data and solution in MATLAB Environment for problem 2

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 2.66GHz (sec) |

Dataset1 |
Matlab code |
Data |
Solution |
3 |
900 |
0.434015 |
<0.01 |

**PROBLEM 3: 10-fold Cross-validation (10 in-sample data and 10 out-of-sample data) for Standard Deviation minimization**

10-fold crossvalidation

Minimize St_dev (minimizing Standard Deviation)

Value:

L_num(matrix_fact_out)

L_num(matrix_fact_in)

Cvar_dev(0.9, matrix_fact_in)

Meanabs_dev(matrix_fact_in)

St_dev(matrix_fact_in)

Var_risk(0.75, matrix_fact_in)

Var_risk_g(0.75, matrix_fact_in)

Var_risk(0.9, matrix_fact_in)

Var_risk_g(0.9, matrix_fact_in)

——————————————————————–

crossvalidation(N,Matrix) = matrix operation splits input Matrix into N pairs of complementary sub-matrices

Cvar_dev = CVaR Deviation for Loss

Meanabs_dev = Mean Absolute Deviation

St_dev = Standard Deviation

Var_risk = VaR Risk for Loss

Var_risk_g = VaR Risk for Gain

——————————————————————–

Data and solution in Run-File Environment

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.14GHz (sec) |

problem 3 |
Cycle Statement |
Data |
Solution |
3 |
900 |
0.896692 |
<0.01 |

Data and solution in MATLAB Environment for problem 3

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 2.66GHz (sec) |

Dataset1 |
Matlab code |
Data |
Solution |
3 |
900 |
0.996590 |
<0.01 |

**PROBLEM 4: 10-fold Cross-validation (10 in-sample data and 10 out-of-sample data) for Two-Tailed VaR75 minimization**

10-fold crossvalidation

Minimize Var_risk + Var_risk_g (minimizing Two-Tail 75% – VaR Deviation)

Value:

L_num(matrix_fact_out)

L_num(matrix_fact_in)

Cvar_dev(0.9, matrix_fact_in)

Meanabs_dev(matrix_fact_in)

St_dev(matrix_fact_in)

Var_risk(0.75, matrix_fact_in)

Var_risk_g(0.75, matrix_fact_in)

Var_risk(0.9, matrix_fact_in)

Var_risk_g(0.9, matrix_fact_in)

——————————————————————–

crossvalidation(N,Matrix) = matrix operation splits input Matrix into N pairs of complementary sub-matrices

Cvar_dev = CVaR Deviation for Loss

Meanabs_dev = Mean Absolute Deviation

St_dev = Standard Deviation

Var_risk = VaR Risk for Loss

Var_risk_g = VaR Risk for Gain

——————————————————————–

Data and solution in Run-File Environment

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.14GHz (sec) |

problem 4 |
Cycle Statement |
Data |
Solution |
3 |
900 |
0.023143 |
0.16 |

Data and solution in MATLAB Environment for problem 4

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.50GHz (sec) |

Dataset1 |
Matlab code |
Data |
Solution |
3 |
900 |
0.032429 |
0.07 |

**PROBLEM 5: 10-fold Cross-validation (10 in-sample data and 10 out-of-sample data) for Two-Tailed VaR90 minimization**

10-fold crossvalidation

Minimize Var_risk + Var_risk_g (minimizing Two-Tail 90% – VaR Deviation)

Value:

L_num(matrix_fact_out)

L_num(matrix_fact_in)

Cvar_dev(0.9, matrix_fact_in)

Meanabs_dev(matrix_fact_in)

St_dev(matrix_fact_in)

Var_risk(0.75, matrix_fact_in)

Var_risk_g(0.75, matrix_fact_in)

Var_risk(0.9, matrix_fact_in)

Var_risk_g(0.9, matrix_fact_in)

——————————————————————–

crossvalidation(N,Matrix) = matrix operation splits input Matrix into N pairs of complementary sub-matrices

Cvar_dev = CVaR Deviation for Loss

Meanabs_dev = Mean Absolute Deviation

St_dev = Standard Deviation

Var_risk = VaR Risk for Loss

Var_risk_g = VaR Risk for Gain

——————————————————————–

Data and solution in Run-File Environment

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.14GHz (sec) |

problem 5 |
Cycle Statement |
Data |
Solution |
3 |
900 |
0.247712 |
0.11 |

Data and solution in MATLAB Environment for problem 5

Problem Datasets |
# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.50GHz (sec) |

Dataset1 |
Matlab code |
Data |
Solution |
3 |
900 |
0.27479 |
0.11 |

**CASE STUDY SUMMARY**

This case study investigates the optimal pipeline hedging strategy with five different deviation measures: Standard Deviation, Mean Absolute Deviation, CVaR Deviation, two-tailed VaR75, and two-tailed VaR90. We test in-sample and out-of-sample performance of these five deviation measures.

Mortgage lenders usually originate mortgages by selling them in the secondary market. Alternatively, the funding can be obtained by mortgage lenders through securitizing the mortgages in exchange for mortgage backed securities (MBS) and then selling MBS to investors in the secondary market. This case study considers hedging the risk- in the mortgage underwriting process known as “pipeline”. Mortgage lenders commit to a mortgage interest rate while the loan is in process, typically for a period of 30-60 days. If the rate rises before the loan goes to closing, the value of the loan declines and the lender sells the loan at a lower price. The risk that mortgages in process will fall in value prior to their sale is known as mortgage pipeline risk. Lenders often hedge this exposure by selling forward their expected closing volume or by shorting U.S. Treasury notes, or futures contracts. Fallout refers to the percentage of loan commitments that do not go to closing. The mortgage pipeline risk is affected by fallout. As interest rates fall, the fallout rises because borrowers locked in a mortgage rate are more likely to find better rates with another lender. Conversely, as rates rise the percentage of loans that close increases. The fallout affects the required size of the hedging instrument because it affects the size of the pipeline position to be hedged. At lower rates, fewer rate loans will close and a smaller position in the hedging instrument is needed. Lenders often use options on U.S. Treasury note futures to hedge against the fallout risk (Cusatis and Thomas, 2005).

This case study uses three hedging instruments for hedging the pipeline risk: 5% MBS forward, 5.5% MBS forward, and call options on 10-year Treasury note futures. We ignore transaction costs and allow short sales. To investigate the impact of different risk measurement practices on the optimal hedging strategies, we consider five deviation measures: standard deviation, mean absolute deviation, CVaR deviation, two-tailed VaR75, and two-tailed VaR90 as the objective function in the minimum risk hedging model. For the out-of-sample testing, we partition the 1,000 scenarios into 10 groups with 100 scenarios in each group. Each time we select one group for the out-of-sample test and we calculate optimal hedging positions based on the remaining 9 groups containing 900 scenarios. For each group of 100 scenarios we calculate the ex-ante losses (i.e., underperformances of hedging portfolio versus target) with the optimal hedging positions obtained from 900 scenarios. To estimate the out-of-sample performance, we aggregate the out-of-sample losses from the 10 runs to obtain a combined set including 1,000 out-of-sample losses. Then, we calculated five deviation measures on the out-of-sample 1,000 losses: Standard Deviation, Mean Absolute Deviation, CVaR Deviation, Two-Tail 75%-VaR Deviation, and Two-Tail 90%-VaR Deviation. In addition, we calculated three downside risk measures: 90%-CVaR, 90%-VaR, and Max Loss on the out-of-sample losses. By minimizing the Two-Tail 90%-VaR Deviation, we obtained the best values for all three considered downside risk measures. Minimization of CVaR deviation leads to good results, whereas minimization of standard deviation gives the worst level for three downside risk measures.

**References **

• Cusatis, P.J. and M.R. Thomas (2005): Hedging Instruments and Risk Management, McGraw-Hill.

• Taglia, P. (2003): Risk Management Case Study: How Mortgage Lenders Use Futures to Hedge Pipeline Risk. Futures Industry Magazine, September/October.

• Lederman, J. (1997): Handbook of Secondary Marketing, Mortgage Bankers Association of America.

• Hakim, S., Rashidian, M., and E. Rosenblatt (1999): Measuring the Fallout Risk in the Mortgage Pipeline. The Journal of Fixed Income, 9, 62–75.