docstr: Returns the daily returns for the given period.
  
  Parameters
  ----------
  start : datetime
      The inclusive starting session label.
  end : datetime, optional
      The inclusive ending session label. If not provided, treat
      ``start`` as a scalar key.
  
  Returns
  -------
  returns : pd.Series or float
      The returns in the given period. The index will be the trading
      calendar in the range [start, end]. If just ``start`` is provided,
      return the scalar value on that day.
docstr_tok: ["Returns","the","daily","returns","for","the","given","period",".","Parameters","--","--","--","--","--","start",":","datetime","The","inclusive","starting","session","label",".","end",":","datetime",",","optional","The","inclusive","ending","session","label",".","If","not","provided",",","treat","``","start","``","as","a","scalar","key",".","Returns","--","--","--","-","returns",":","pd.Series","or","float","The","returns","in","the","given","period",".","The","index","will","be","the","trading","calendar","in","the","range","[","start",",","end","]",".","If","just","``","start","``","is","provided",",","return","the","scalar","value","on","that","day","."]
code: def daily_returns(self, start, end=None):
      """Returns the daily returns for the given period.
  
      Parameters
      ----------
      start : datetime
          The inclusive starting session label.
      end : datetime, optional
          The inclusive ending session label. If not provided, treat
          ``start`` as a scalar key.
  
      Returns
      -------
      returns : pd.Series or float
          The returns in the given period. The index will be the trading
          calendar in the range [start, end]. If just ``start`` is provided,
          return the scalar value on that day.
      """
      if end is None:
          return self._daily_returns[start]
  
      return self._daily_returns[start:end]
  
file_path: zipline/zipline/sources/benchmark_source.py
imports: import pandas
  from zipline.errors import InvalidBenchmarkAsset, BenchmarkAssetNotAvailableTooEarly, BenchmarkAssetNotAvailableTooLate
label_desc: Use image node_id 4 for calling the BenchmarkSource obj's underlying member method code with example usage: obj.daily_returns(start, end) and returns: self, self