class_docstr: Calculates a linear regression using ``statsmodel.OLS`` (Ordinary least
  squares) of data1 on data0
  
  Uses ``pandas`` and ``statsmodels``
class_docstr_tok: ["Calculates","a","linear","regression","using","``","statsmodel.OLS","``","(","Ordinary","least","squares",")","of","data1","on","data0","Uses","``","pandas","``","and","``","statsmodels","``"]
code: def next(self):
      p0 = pd.Series(self.data0.get(size=self.p.period))
      p1 = pd.Series(self.data1.get(size=self.p.period))
      p1 = sm.add_constant(p1)
      intercept, slope = sm.OLS(p0, p1).fit().params
  
      self.lines.slope[0] = slope
      self.lines.intercept[0] = intercept
  
file_path: backtrader/backtrader/indicators/ols.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import backtrader
  from .None import PeriodN
label_desc: Use image node_id 1 for calling the OLS_Slope_InterceptN obj's underlying member method code with example usage: obj.next() without return types