code: def get_benchmark_returns(symbol):
      
      r = requests.get(
          'https://api.iextrading.com/1.0/stock/{}/chart/5y'.format(symbol)
      )
      data = r.json()
  
      df = pd.DataFrame(data)
  
      df.index = pd.DatetimeIndex(df['date'])
      df = df['close']
  
      return df.sort_index().tz_localize('UTC').pct_change(1).iloc[1:]
docs: Get a Series of benchmark returns from IEX associated with `symbol`.
      Default is `SPY`.
  
      Parameters
      ----------
      symbol : str
          Benchmark symbol for which we're getting the returns.
  
      The data is provided by IEX (https://iextrading.com/), and we can
      get up to 5 years worth of data.