empyrical
empyrical copied to clipboard
Just installed Pyfolio getting AttributeError: module 'empyrical' has no attribute 'information_ratio'
I'm getting this on a number of the example notebooks.. I did update the utils py file in order to get Google data instead of yahoo,, and I do have some portions of the notebooks working but can't get a "full" tear sheet due to this error! Any hints/workarounds appreciated..
Same error, but in my case this occurs in a call from zipline
Can you guys try to install pyfolio master: pip install -U git@https://github.com/quantopian/pyfolio
Somebody renamed information_ratio
to excess_sharpe
. Make changes by yourselves or wait for miracle.
@iamraa I could be mistaken, but I believe that excess_sharpe
was added and information_ratio
removed - but that they are functions with different behavior, as opposed to one function that was renamed.
actually it was just renamed.
Oh ok! I stand corrected.
Under an Anaconda virtual env for python 3.6 FYI, guess I'll try a manual install.. pip install -U git@https://github.com/quantopian/pyfolio Collecting git@ https://github.com/quantopian/pyfolio Could not find a version that satisfies the requirement git@ https://github.com/quantopian/pyfolio (from versions: ) No matching distribution found for git@ https://github.com/quantopian/pyfolio (py36n) tom@tomServal:~$
Welp a simple
(py36n) tom@tomServal:~$ cd Documents//pyfolio/
(py36n) tom@tomServal:~/Documents/pyfolio$ python setup.py install
/home/tom/anaconda3/envs/py36n/lib/python3.6/site-packages/setuptools/dist.py:336: UserWarning: Normalizing 'v0.7.0+18.ga34222e' to '0.7.0+18.ga34222e'
normalized_version ```
did not work as hoped..
```%matplotlib inline
import pyfolio as pf ```
gave me:
```RuntimeError Traceback (most recent call last)
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa ```
Guess I'll try a new env...
@dartdog pyfolio does not fix it. You have to fix it manualy in zipline scripts.
%env%/lib/python#.#/site-packages/zipline/finance/risk/
period.py & cumulative.py
Replace information_ratio
by excess_sharpe
.
@iamraa it actually at least got pyfolio up and going,, as follows... zipline is yet another exercise... Well I did create a new env in conda, is just did a conda py 3 env,, then ran the setup.py in pyfolio.. it could not find or install numpy itself so I conda installed it then re-ran the setup.py for pyfolio, it kicked off recompiling just about everything..conda installed matplotlib.. then I replaced the utils.py in the egg.. with the modified one for Google data. Also had to install the right kernel modules in the new env for jupyter,, and low and behold, I can now run the single stock notebook!! also had to install a few other packages request-files and requests-ftp (for others who follow)
@twiecki if pyfolio
and empyrical
are going to be so intertwined, I believe better testing and deployment needs to be made. Maybe synchronize version numbers / releases when there are reverse compatibility.
These headaches are making pyfolio
and all of these other libraries more trouble then they are worth.