From cd12bd3cca11ec6d103ca4010c4c64e55c9a93ad Mon Sep 17 00:00:00 2001 From: hrosspet Date: Tue, 29 Oct 2019 16:37:48 +0100 Subject: [PATCH] fix outdated api --- empyrical/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/empyrical/utils.py b/empyrical/utils.py index 395d5b0..780c108 100644 --- a/empyrical/utils.py +++ b/empyrical/utils.py @@ -433,9 +433,7 @@ def get_symbol_returns_from_yahoo(symbol, start=None, end=None): try: px = web.get_data_yahoo(symbol, start=start, end=end) - px['date'] = pd.to_datetime(px['date']) - px.set_index('date', drop=False, inplace=True) - rets = px[['adjclose']].pct_change().dropna() + rets = px[['Adj Close']].pct_change().dropna() except Exception as e: warnings.warn( 'Yahoo Finance read failed: {}, falling back to Google'.format(e),