title: Dummy Variable Regression in Python
body: <p>I would like to run create a dummy variable regression in Python. So, I have a list of rates from 2000 to 2020 and I want to estimate the non-crisis (NC) and crisis (C) period alphas and betas from the following model incorporating dummy variables with respect to alphas and the coefficients of the risk factors:</p>
  <p><a href="https://i.stack.imgur.com/kKd40.png" rel="nofollow noreferrer">Model</a></p>
  <p>where Dnc,t is a dummy variable that takes a value of 1 for non-crisis periods and 0
  otherwise and Dc,t is a dummy variable that takes a value of 1 for crisis periods and 0
  otherwise. Now, I would like to run this regression in python.</p>