title: Slow Stochastic Implementation in Python Pandas
body: <p>I am new to pandas and I need a function for calculating slow stochastic. I think it should be possible without much difficulty but I am not familiar with advanced APIs in pandas.</p>
  
  <p>My data frame contains, 'open', 'high', 'low' and 'close' prices and it is indexed on dates. This much information should be enough to calculate slow stochastic.</p>
  
  <pre><code>Following is the formula for calculating Slow Stochastic:
  %K = 100[(C - L14)/(H14 - L14)] 
  
  C = the most recent closing price 
  L14 = the low of the 14 previous trading sessions 
  H14 = the highest price traded during the same 14-day period.
  
  %D = 3-period moving average of %K 
  </code></pre>