1. Learn
  2. /
  3. Courses
  4. /
  5. Quantitative Risk Management in Python

Exercise

Crisis structural break: III

Now you can put everything together to perform the Chow test.

The 2005 - 2010 data have been split into two available DataFrames, before and after, using June 30, 2008 as the structural break point (identified in the first exercise in this series). The columns of both DataFrames are mort_del and returns for mortgage delinquency data and returns data, respectively.

You'll run two OLS regressions on before and after, regressing the returns column against the mort_del column in each DataFrame, and derive the sum-of-squared residuals.

Then you'll compute the Chow test statistic as in the video, using ssr_total (provided from the second exercise) and the derived residuals. The critical F-value at 99% confidence is around 5.85. What value do you find for your test statistic?

Instructions

100 XP
  • Add an OLS intercept term to mort_del for before and after.
  • Fit an OLS regression of the returns column against the mort_del column, for before and after.
  • Place the sum-of-squared residuals into ssr_before and ssr_after, for before and after, respectively.
  • Create and display the Chow test statistic.