title: Regression of a timeseries delta in pandas
body: <p>Lets say I have a timeseries like this</p>
  
  <pre><code>    A   B
  0   a   b
  1   c   d
  2   e   f 
  3   g   h
  </code></pre>
  
  <p>0,1,2,3 are times,  a, c, e, g is one time series and b, d, f, h is another time series.</p>
  
  <p>What i need is a regression of deltas, meaning</p>
  
  <pre><code>       dA     dB
  0    (a-c)  (b-d)
  1    (c-e)  (d-f)
  2    (e-g)  (f-h)
  </code></pre>
  
  <p>I was to do regress as  <code>dB = X dA + Y</code></p>
  
  <p>Now whats the best way to do this if i have a pandas dataframe like above to start with.
  Also, next I would like to do a moving window regression.</p>