diff --git a/quantstats/stats.py b/quantstats/stats.py index e544f373..c7eb9a5e 100644 --- a/quantstats/stats.py +++ b/quantstats/stats.py @@ -512,7 +512,7 @@ def gain_to_pain_ratio(returns, rf=0, resolution="D"): return returns.sum() / downside -def cagr(returns, rf=0.0, compounded=True, periods=252): +def cagr(returns, rf=0.0, compounded=True, periods=365): """ Calculates the communicative annualized growth return (CAGR%) of access returns diff --git a/quantstats/utils.py b/quantstats/utils.py index 51eff8db..65a3540f 100644 --- a/quantstats/utils.py +++ b/quantstats/utils.py @@ -239,7 +239,7 @@ def download_returns(ticker, period="max", proxy=None): params["start"] = period[0] else: params["period"] = period - return _yf.download(**params)["Close"].pct_change() + return _yf.download(**params, progress=False, threads=False)["Close"].rename(ticker).pct_change() def _prepare_benchmark(benchmark=None, period="max", rf=0.0, prepare_returns=True):