def get_benchmark_returns(symbol, start_date, end_date):
 return pd.read_csv(format_yahoo_index_url(symbol, start_date, end_date), parse_dates=['Date'], index_col='Date', usecols=['Adj Close', 'Date'], squeeze=True).sort_index().tz_localize('UTC').pct_change(1).iloc[1:]

def get_benchmark_returns ( symbol , start_date , end_date ) : return pd . read_csv ( format_yahoo_index_url ( symbol , start_date , end_date ) , parse_dates = [ 'Date' ] , index_col = 'Date' , usecols = [ 'Adj Close' , 'Date' ] , squeeze = True ) . sort_index ( ) . tz_localize ( 'UTC' ) . pct_change ( 1 ) . iloc [ 1 : ]
get a series of benchmark returns from yahoo .