Table of Contents


File

housing_refinance.m

Name

housing_refinance

Synopsis

housing_refinance - calculates the total_value of houses (new and cash-out refinanced), the total value of mortgage lender guarantees, and the aggregate sensitivity.

Introduction

NOTE: PART OF A SET OF 8 RELATED FILES:

Khandani, Lo, and Merton (2009) posit that rising home prices, declining interest rates, and near-frictionless refinancing opportunities led to vastly increased systemic risk in the financial system. A simultaneous occurrence of these factors imposes an unintentional synchronization of homeowner leverage. This synchronization, coupled with the indivisibility of residential real estate that prevents homeowners from deleveraging when property values decline and homeowner equity deteriorates, conspire to create a ratchet effect in which homeowner leverage is maintained or increased during good times without the ability to decrease leverage during bad times. To measure the systemic impact of this ratchet effect, the U.S. housing market is simulated with and without equity extractions, and the losses absorbed by mortgage lenders is estimated by valuing the embedded put option in non-recourse mortgages. The proposed systemic risk indicator for the housing market is the dollar-delta of this embedded put option.

License

=============================================================================

Copyright 2011, Dimitrios Bisias, Andrew W. Lo, and Stavros Valavanis

COPYRIGHT STATUS: This work was funded in whole or in part by the Office of Financial Research under U.S. Government contract TOSOFR-11-C-0001, and is, therefore, subject to the following license: The Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license to reproduce, prepare derivative works, distribute copies to the public, perform and display the work.
All other rights are reserved by the copyright owner.

THIS SOFTWARE IS PROVIDED "AS IS". YOU ARE USING THIS SOFTWARE AT YOUR OWN RISK. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS, OR THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=============================================================================

Inputs

new_homes
Name:
new_homes
Description:

A monthly timeseries indicating number of new homes.

Type:
integer
Range:
(0,+inf)
Dimensions:

Tx1 matrix

  1. Rows represent Months.

new_house_prices
Name:
new_house_prices
Description:

Monthly timeseries showing new house prices.

Type:
float
Range:
(0,+inf)
Dimensions:

Tx1 matrix

  1. Rows represent Months.

hpi
Name:
hpi
Description:

The Home Price Index monthly timeseries indicates increases in the value of existing homes.

Type:
float
Range:
(0,+inf)
Dimensions:

Tx1 matrix

  1. Rows represent Months.

mortgage_rates
Name:
mortgage_rates
Description:

A monthly timeseries of mortgage rates.

Type:
float
Range:
(0,+inf)
Dimensions:

Tx1 matrix

  1. Rows represent Months.

risk_free
Name:
risk_free
Description:

The risk-free rate monthly timeseries. Rate is annualized.

Type:
float
Range:
(0,1)
Dimensions:

Tx1 matrix

  1. Rows represent Months.

time_structural_shift
Name:
time_structural_shift
Description:

The time at which the probability of refinancing shifts from .003 to .009 for houses with ltv < .85.

Type:
integer
Range:
[1,+inf)
Dimensions:

scalar


Outputs

total_value
Name:
total_value
Description:

The total value of houses (new and cash-out refinanced) at time t.

Type:
float
Range:
(0,+inf)
Dimensions:

Tx1 matrix

  1. Rows represent Months.

total_guarantee
Name:
total_guarantee
Description:

The total value of mortgage lender guarantees (put options).

Type:
integer
Range:
(0,+inf)
Dimensions:

Tx1 matrix

  1. Rows represent Months.

total_delta
Name:
total_delta
Description:

The aggregate sensitivity of the guarantees.

Type:
integer
Range:
(-inf,0)
Dimensions:

Tx1 matrix

  1. Rows represent Months.

Code

% Run warning message
warning('OFRwp0001:UntestedCode', ...
    ['This version of the source code is very preliminary, ' ...
     'and has not been thoroughly tested. Users should not rely on ' ...
     'these calculations.']);





loan_to_value_ratio = 0.85; % this is set to 0.85 in the simulation
rent_yield = 0.04;
house_volatility = 0.08;


n = length(new_homes);
total_value=zeros(n,1);
for t=1:n
    total_value(t) = new_homes(t)*new_house_prices(t);
    for i=1:t-1
        mortgage_rate = mortgage_rates(i);% This is in annualized terms
        value_house = new_house_prices(i);
        % This is the current loan to value ratio for a loan started at i
        current_ltv = loan_to_value(i,t, mortgage_rate, loan_to_value_ratio, ...
        value_house, hpi);
        p_surv = prob_survival(i,t-1, mortgage_rate, loan_to_value_ratio, ...
        value_house, hpi,time_structural_shift);
        p_ref = prob_refinance(t,current_ltv,time_structural_shift);
        total_value(t) = total_value(t) + total_value(i)*p_surv*p_ref ...
        *calc_value_house(i,t,hpi,new_house_prices)/value_house;
    end
end

% Total guarantees and total_delta
total_guarantee = zeros(n,1);
total_delta = zeros(n,1);
for t=1:n
    for i=1:t
        mortgage_rate = mortgage_rates(i);% This is in annualized terms
        value_house = new_house_prices(i);
        p_surv = prob_survival(i,t, mortgage_rate, loan_to_value_ratio, ...
        value_house, hpi,time_structural_shift);
        current_value_house = calc_value_house(i,t,hpi,new_house_prices);
        current_ltv = loan_to_value(i,t, mortgage_rate, ...
        loan_to_value_ratio, value_house, hpi);
        rates = risk_free(t);
        time_left = 360-(t-i);% Months left (it is a 30-year loan)

        [put_delta, put_gamma, put_vega, put_value] = getOptionPrice( ...
        current_value_house,current_ltv,house_volatility,rent_yield,rates, ...
        mortgage_rate,time_left);%guarantee(i,t);

        total_guarantee(t) = total_guarantee(t)+total_value(t)*p_surv ...
        *put_value/value_house;
        total_delta(t) = total_delta(t)+total_value(t)*p_surv*put_delta ...
        /value_house;
    end
end

Examples

NOTE: Numbers used in the examples are arbitrary valid values.
They do not necessarily represent a realistic or plausible scenario.

  new_homes = [7, 13, 14, 7, 17, 4, 16, 14, 1, 15]';
  new_house_prices = [1, 1.7, 2.6, 2.1, 3.2, 2.3, 1.6, 2.2, 2.6, 3.3]';
  hpi = ...
  [0.3, 0.9, 1, 1.1, 0.8, 1, 0.6, 0.7, 0.5, 0.9, 1.2, 1, 1.3, 1.1, 1.0];
  mortgage_rates = ...
  [0.05, 0.06, 0.06, 0.04, 0.05, 0.05, 0.04, 0.05, 0.04, 0.04]';
  risk_free = ...
  [0.03, 0.05, 0.04, 0.03, 0.04, 0.03, 0.03, 0.04, 0.03, 0.03]';
  time_structural_shift = 5;

  [total_value total_guarantee total_delta]=housing_refinance( ...
  new_homes,new_house_prices,hpi, mortgage_rates, risk_free,... 
  time_structural_shift);

References

Khandani, A. E., Lo, A. W., & Merton, R. C. (2012). Systemic risk and the refinancing ratchet effect. Journal of Financial Economics.

Bisias et al. (2012). A survey of systemic risk analytics (Working paper #0001). Washington, DC: Office of Financial Research, 89-94.