title: Event Study in Pandas
body: <p>Suppose I have a time series as so:</p>
  
  <pre><code>pd.Series(np.random.rand(20), index=pd.date_range("1990-01-01",periods=20))
  </code></pre>
  
  <p>Which gives,</p>
  
  <pre><code>1990-01-01    0.018363
  1990-01-02    0.288625
  1990-01-03    0.460708
  1990-01-04    0.663063
  1990-01-05    0.434250
  1990-01-06    0.504893
  1990-01-07    0.587743
  1990-01-08    0.412223
  1990-01-09    0.604656
  1990-01-10    0.960338
  1990-01-11    0.606765
  1990-01-12    0.110480
  1990-01-13    0.671683
  1990-01-14    0.178488
  1990-01-15    0.458074
  1990-01-16    0.219303
  1990-01-17    0.172665
  1990-01-18    0.429534
  1990-01-19    0.505891
  1990-01-20    0.242567
  Freq: D, dtype: float64
  </code></pre>
  
  <p>Suppose the event date is on 1990-01-05 and 1990-01-15. I want to subset the data down to a window of length (-2,+2) around the event like this:</p>
  
  <pre><code>1990-01-03    0.460708
  1990-01-04    0.663063
  1990-01-05    0.434250
  1990-01-06    0.504893
  1990-01-07    0.587743
  1990-01-13    0.671683
  1990-01-14    0.178488
  1990-01-15    0.458074
  1990-01-16    0.219303
  1990-01-17    0.172665
  Freq: D, dtype: float64
  </code></pre>
  
  <p>How should I go about doing this?</p>