title: Calculating Drawdown in Pandas
body: <p>I have the following DataFrame:</p>
  <pre><code>              Profit       Cumulative
  Date                            
  1/6/2005    248.8500      248.85
  1/12/2005    48.3500      297.20
  1/13/2005    29.2900      326.49
  1/13/2005  -500.0000     -173.51
  1/13/2005  -250.9500     -424.46
  1/14/2005   126.6600     -297.80
  1/16/2005    58.7400     -239.06
  1/19/2005    68.3500     -170.71
  1/21/2005   140.0000      -30.71
  1/23/2005   200.0000      169.29
  1/26/2005  -250.6800      -81.39
  1/27/2005   162.5000       81.11
  1/27/2005   135.5100      216.62
  1/27/2005  -650.0000     -433.38
  1/28/2005    96.8800     -336.50
  1/28/2005 -1000.0000    -1336.50
  1/31/2005   140.0000    -1196.50
  2/1/2005    140.0000    -1056.50
  </code></pre>
  <p>The first column are the dollar profits of my portfolio. I have calculated the second column with the following formula:</p>
  <pre><code>df['Cumulative'] = df.Profit.cumsum().round(2)
  </code></pre>
  <p>So, is there a formula where I can calculate the dollar (not %) drawdowns of my portfolio?
  The column should look like this:</p>
  <pre><code>Drawdown
  
   0.00
   0.00
   0.00
  -500.00
  -750.95
  -624.29
  -565.55
  -497.20
  -357.20
  -157.20
  -407.88
  -245.38
  -109.87
  -759.87
  -662.99
  -1,662.99
  -1,522.99
  -1,382.99
  -1,382.99
  </code></pre>