How to update the deprecated python zipline.transforms module? : <p>I wrote a python program using the quantopian zipline package <a href="http://www.zipline.io/beginner-tutorial.html" rel="noreferrer">http://www.zipline.io/beginner-tutorial.html</a>. I recently updated the package and have encountered that the zipline.transforms package is deprecated. I was using two functions from the zipline.transforms package, <code>batch_transform()</code> and <code>MovingAverage</code>. </p>

<p>I haven't been able to find a good post demonstrating how to fix this, other than saying to replace <code>batch_transform</code> with the <code>history()</code> function. However, I am unaware how exactly to replace it. I haven't found a post telling how to fix the MovingAverage deprecation.</p>

<p>Here is my code I am using.</p>

<pre><code>from zipline.algorithm import TradingAlgorithm
from zipline.transforms import batch_transform
from zipline.transforms import MovingAverage


class TradingStrategy(TradingAlgorithm):

    def initialize(self, window_length=6):
        self.add_transform(
            MovingAverage, 'kernel', ['price'], window_length=self.window_length)

    @batch_transform
    def get_data(data, context):
        '''
        Collector for some days of historical prices.
        '''
        daily_prices = data.price[STOCKS + [BENCHMARK]]
        return daily_prices

strategy = TradingStrategy()
</code></pre>

<p>Could someone provide an example of how to update the code above? I assume there are many people dealing with the issues given how popular quantopian is.</p>
