Skip to content

Commit

Permalink
Change create_returns_tear_sheet to use Quandl API
Browse files Browse the repository at this point in the history
Also updated the single stock example to reflect the new update.
  • Loading branch information
jaycode committed Mar 26, 2018
1 parent 6fa3a30 commit 7ef8d27
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 126 deletions.
177 changes: 53 additions & 124 deletions pyfolio/examples/single_stock_example.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyfolio/tears.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def create_returns_tear_sheet(returns, positions=None,
"""

if benchmark_rets is None:
benchmark_rets = utils.get_symbol_rets('SPY')
benchmark_rets = utils.get_symbol_rets('SPY', start=returns.index[0], end=returns.index[-1])

returns = returns[returns.index > benchmark_rets.index[0]]

Expand Down
2 changes: 1 addition & 1 deletion pyfolio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def default_returns_func(symbol, start=None, end=None):
Daily returns for the symbol.
- See full explanation in tears.create_full_tear_sheet (returns).
"""
return empyrical.utils.default_returns_func(symbol, start=None, end=None)
return empyrical.utils.default_returns_func(symbol, start=start, end=end)


@deprecated(msg=DEPRECATION_WARNING)
Expand Down

0 comments on commit 7ef8d27

Please sign in to comment.