Need help with agency-loan-level?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

toddwschneider
212 Stars 66 Forks 5 Commits 0 Opened issues

Description

Loan-level analysis of Fannie Mae and Freddie Mac data

Services available

!
?

Need anything else?

Contributors list

# 47,057
R
Ruby
Shell
unicode
4 commits

Create a PostgreSQL database with loan-level data from Fannie Mae and Freddie Mac

Scripts used in support of this post: Mortgages Are About Math: Open-Source Loan-Level Analysis of Fannie and Freddie

Usage

  1. Make sure you have PostgreSQL installed locally. If you want to use R, install it too
  2. Download data from Fannie Mae and/or Freddie Mac and unzip all files into the
    data/fannie/
    and
    data/freddie/
    subdirectories
  3. ./initialize_database.sh
    creates a Postgres database called
    agency-loan-level
    , creates some tables, and imports supporting data including FHFA home price data and Freddie Mac mortgage rate data
  4. ./load_fannie_loans.sh
    and
    ./load_freddie_loans.sh
    import data for Fannie and Freddie, respectively. This might take a very long time (~2 days), so you could consider loading the data in chunks

Analysis

The

analysis/
folder has additional SQL and R scripts used to analyze the data, see more in the full post

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.