quantopian / empyrical

Common financial risk and performance metrics. Used by zipline and pyfolio.
https://quantopian.github.io/empyrical
Apache License 2.0
1.32k stars 411 forks source link

Remove yahoo finance #65

Open twiecki opened 7 years ago

twiecki commented 7 years ago

Yahoo finance has been discontinued for good. Google is a fallback (albeit a bad one) but there's no reason to display a warning and confuse users: https://github.com/quantopian/pyfolio/issues/478#event-1345024064

eigenfoo commented 7 years ago

Would it be correct to say that all that needs rewriting is this function in utils.py (and any other docstrings here and there)?

That sounds straightforward; would you like me to put together a PR?

twiecki commented 7 years ago

@eigenfoo Correct.

twiecki commented 7 years ago

It would be great to have an alternative that goes back further in time. We can probably use the yahoo SPY returns for the past, and then forward-fill with the ones from google.

appletonwebb commented 6 years ago

There's the IEX exchange API if it helps, and it requires no registration:

https://iextrading.com/developer/docs/#stocks

jaycode commented 6 years ago

@twiecki I replaced Yahoo Finance with Quandl as shown here. Would you like me to update the default to use Quandl instead?

twiecki commented 6 years ago

@jaycode Yes, that seems like a more stable source!

jaycode commented 6 years ago

@twiecki Done, please resolve conflicts here: https://github.com/quantopian/empyrical/pull/89

jaycode commented 6 years ago

There is also some minimal updates for Pyfolio module for this to work. See here: https://github.com/jaycode/pyfolio/commit/7ef8d27c4926f7cde2abcf6a15d0950450791633

A working example can be seen here: https://github.com/jaycode/pyfolio/blob/master/pyfolio/examples/single_stock_example.ipynb