Chapter 1 Mortgage Market Ecosystem

Approach

The US mortgage market is a network of lenders, borrowers, vendors, and investors - demotic and international, private and government-sponsored. On the regulatory, multiple agencies oversee the mortgage market. It is very fragmented.

Out of this mortgage ecosystem, most people would experience purchasing a home and applying for a loan from a bank at some point in time. Therefore we will start our introduction from there.

1.1 Homeownership - American Dream

That is the heart and soul of the American dream, homeownership, the idea of being able to buy a house and start to build your family. — Wendell Pierce

Most of people would have to borrow some money in order to buy a house. The borrower’s experience usually goes like the following:

  • Walk into a bank, talk to a loan officer and ask for a loan
  • Provide some documents and fill out the application form.
  • The loan officer will give you a loan estimate, which includes the amount of the loan, the interest rate, and the term of the loan.
  • The applicant agrees, signs and pays some money to proceed. Please note that the loan has not been approved at this point.
  • Both parties wait. Behind the scenes, the bank will order appraisal, flood certificate and other documents regard to the applicant and the property.
  • When all documents are ready, the underwriter will review the documents and hopefully approve the loan.
  • Finally close the loan at the closing agent’s location.
  • Applicant gets the loan and starts paying monthly mortgage.

This chapter will take a deeper look into the above flow, use that to launch into into the secondary market.

1.1.1 Follow the Money

The very first question may be so obvious and we often to ignore, where do the banks got their money from? Banks will have to sell your loan to downstream buyers, or invertors, for money. to keep the money flow in. The banks make profit by charging applicants reasonable fees and selling loans to the investors.

The downstream investors will also sell the purchased loans to another investors. But at this level, there are a few choices of tools (financial vehicles).

** Originators ** - The institutions, not necessary banks, which loan money to applicants, are called (loan) originators. The act and process they go through are often called manufacturing loans.

The primary market is where securities are created, while the secondary market is where those securities are traded by investors. https://www.investopedia.com/investing/primary-and-secondary-markets

You typically have to install a package once before you can load it. In case you have not done this yet, call install.packages("tidyquant"). If you have trouble using tidyquant, check out the corresponding documentation.

We first download daily prices for one stock market ticker, e.g., the Apple stock, AAPL, directly from the data provider Yahoo!Finance. To download the data, you can use the command tq_get. If you do not know how to use it, make sure you read the help file by calling ?tq_get. We especially recommend taking a look at the examples section of the documentation. We request daily data for a period of more than 20 year. variance portfolio. However, mean-variance investors are not interested in any portfolio that achieves the required return but rather in the efficient portfolio, i.e., the portfolio with the lowest standard deviation. If you wonder where the solution \(\omega_\text{eff}\) comes from: The efficient portfolio is chosen by an investor who aims to achieve minimum variance given a minimum acceptable expected return \(\bar{\mu}\). Hence, their objective function is to choose \(\omega_\text{eff}\) as the solution to \[\omega_\text{eff}(\bar{\mu}) = \arg\min w'\Sigma w \text{ s.t. } w'\iota = 1 \text{ and } \omega'\mu \geq \bar{\mu}.\] The code below implements the analytic solution to this optimization problem for a benchmark return \(\bar\mu\) which we set to 3 times the expected return of the minimum variance portfolio. We encourage you to verify that it is correct.

1.2 The efficient frontier

1.3 Exercises

  1. Download daily prices for another stock market ticker of your choice from Yahoo!Finance with tq_get() from the tidyquant package. Plot two time series of the ticker’s un-adjusted and adjusted closing prices. Explain the differences.
  2. Compute daily net returns for the asset and visualize the distribution of daily returns in a histogram. Also, use geom_vline() to add a dashed red line that indicates the 5% quantile of the daily returns within the histogram. Compute summary statistics (mean, standard deviation, minimum and maximum) for the daily returns
  3. Take your code from before and generalize it such that you can perform all the computations for an arbitrary vector of tickers (e.g., ticker <- c("AAPL", "MMM", "BA")). Automate the download, the plot of the price time series, and create a table of return summary statistics for this arbitrary number of assets.
  4. Consider the research question: Are days with high aggregate trading volume often also days with large absolute price changes? Find an appropriate visualization to analyze the question.
  5. Compute monthly returns from the downloaded stock market prices. Compute the vector of historical average returns and the sample variance-covariance matrix. Compute the minimum variance portfolio weights and the portfolio volatility and average returns, visualize the mean-variance efficient frontier. Choose one of your assets and identify the portfolio which yields the same historical volatility but achieves the highest possible average return.
  6. In the portfolio choice analysis, we restricted our sample to all assets that were trading on every single day since 2000. How is such a decision a problem when you want to infer future expected portfolio performance from the results?
  7. The efficient frontier characterizes the portfolios with the highest expected return for different levels of risk, i.e., standard deviation. Identify the portfolio with the highest expected return per standard deviation. Hint: the ratio of expected return to standard deviation is an important concept in Finance.