title: Pandas rolling standard deviation
body: <p>Is anyone else having trouble with the new <code>rolling.std()</code> in pandas?  The deprecated method was <code>rolling_std()</code>.  The new method runs fine but produces a constant number that does not roll with the time series.</p>
  
  <p>Sample code is below.  If you trade stocks, you may recognize the formula for Bollinger bands.  The output I get from <code>rolling.std()</code> tracks the stock day by day and is obviously not rolling.</p>
  
  <p>This in in pandas 0.19.1.  Any help would be appreciated. </p>
  
  <pre><code>import datetime
  import pandas as pd
  import pandas_datareader.data as web
  
  start = datetime.datetime(2012,1,1)
  end = datetime.datetime(2012,12,31)
  g = web.DataReader(['AAPL'], 'yahoo', start, end)
  stocks = g['Close']
  stocks['Date'] = pd.to_datetime(stocks.index)
  stocks['AAPL_LO'] = stocks['AAPL'] - stocks['AAPL'].rolling(20).std() * 2
  stocks['AAPL_HI'] = stocks['AAPL'] + stocks['AAPL'].rolling(20).std() * 2
  stocks.dropna(axis=0, how='any', inplace=True)
  </code></pre>