title: How to write a custom rolling function for python dask?
body: <p>Searching on google, I found that dask have a wrapper for pandas rolling functions. But I need a simple example of a custom rolling function that use the <code>n</code> previous values to compute the current in dask.</p>
  
  <p>Let's say I need the <code>3</code> previous values of the <code>X</code> column of my dataframe to compute the current value of the <code>Y</code> column with this formula:</p>
  
  <pre><code>y(i)= x(i-1) + 2*x(i-2) - 3*x(i-3)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/yeWvN.png" alt="equation example"></p>