Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ranaroussi/quantstats
Browse files Browse the repository at this point in the history
  • Loading branch information
ranaroussi committed Jun 22, 2023
2 parents 52173e2 + a66a22e commit ee9c101
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions quantstats/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ def _prepare_returns(data, rf=0., nperiods=None):
return data


def download_returns(ticker, period="max"):
def download_returns(ticker, period="max",proxy=None):
if isinstance(period, _pd.DatetimeIndex):
p = {"start": period[0]}
p = {"start": period[0], "proxy": proxy}
else:
p = {"period": period}
p = {"period": period, "proxy": proxy}
return _yf.Ticker(ticker).history(**p)['Close'].pct_change()


Expand Down

0 comments on commit ee9c101

Please sign in to comment.