code: def pearsonr(self, target, correlation_length, mask=NotSpecified):
          
          from .statistical import RollingPearson
          return RollingPearson(
              base_factor=self,
              target=target,
              correlation_length=correlation_length,
              mask=mask,
          )
docs: Construct a new Factor that computes rolling pearson correlation
          coefficients between `target` and the columns of `self`.
  
          This method can only be called on factors which are deemed safe for use
          as inputs to other factors. This includes `Returns` and any factors
          created from `Factor.rank` or `Factor.zscore`.
  
          Parameters
          ----------
          target : zipline.pipeline.Term with a numeric dtype
              The term used to compute correlations against each column of data
              produced by `self`. This may be a Factor, a BoundColumn or a Slice.
              If `target` is two-dimensional, correlations are computed
              asset-wise.
          correlation_length : int
              Length of the lookback window over which to compute each
              correlation coefficient.
          mask : zipline.pipeline.Filter, optional
              A Filter describing which assets should have their correlation with
              the target slice computed each day.
  
          Returns
          -------
          correlations : zipline.pipeline.factors.RollingPearson
              A new Factor that will compute correlations between `target` and
              the columns of `self`.
  
          Examples
          --------
          Suppose we want to create a factor that computes the correlation
          between AAPL's 10-day returns and the 10-day returns of all other
          assets, computing each correlation over 30 days. This can be achieved
          by doing the following::
  
              returns = Returns(window_length=10)
              returns_slice = returns[sid(24)]
              aapl_correlations = returns.pearsonr(
                  target=returns_slice, correlation_length=30,
              )
  
          This is equivalent to doing::
  
              aapl_correlations = RollingPearsonOfReturns(
                  target=sid(24), returns_length=10, correlation_length=30,
              )
  
          See Also
          --------
          :func:`scipy.stats.pearsonr`
          :class:`zipline.pipeline.factors.RollingPearsonOfReturns`
          :meth:`Factor.spearmanr`