Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 14 16:33
    CapitalZe opened #620
  • Oct 14 15:10
    kkumawat25 opened #619
  • Oct 10 08:18
    phoebebullman commented #578
  • Oct 10 08:10
    phoebebullman commented #578
  • Sep 30 16:17
    twiecki commented #618
  • Sep 30 16:17

    twiecki on master

    Merge pull request #3 from quan… del useless params in full tear… add turnover_denom para in txn … and 2 more (compare)

  • Sep 30 16:17
    twiecki closed #618
  • Sep 30 02:30
    huaiweicheng commented #608
  • Sep 27 11:59
    twiecki commented #608
  • Sep 27 03:08
    huaiweicheng opened #618
  • Sep 23 01:22
    huaiweicheng commented #608
  • Sep 22 11:36
    jean-derivas opened #617
  • Sep 20 15:20
    twiecki commented #608
  • Sep 20 15:20

    twiecki on master

    Do not round to first digit. (compare)

  • Sep 20 15:12
    twiecki commented #608
  • Sep 20 15:12
    twiecki commented #608
  • Sep 20 15:10
    twiecki commented #608
  • Sep 20 15:10

    twiecki on master

    Fix a bunch of deprecations and… Remove all bayesian analysis. Also drop tilt and timing retur… and 49 more (compare)

  • Sep 20 15:10
    twiecki closed #608
  • Sep 20 14:51
    twiecki synchronize #608
Andrew King
@aking1012
I don't know if it would help, but the guys over on pandas-datareader.io have a travis setup that autofires on PRs against 4 versions of python and 3 yersions of pandas. Might be useful to run pyfolio against a similar CI test set. They're generally helpful guys, and might share their configs so you can tell if it's python, pandas, some dependency, or your installation.
@gabegm
Thomas Wiecki
@twiecki
we run various versions too, not all of those, but 0.18.1 should be supported
so I'm a bit stumped
@gabegm can you open an issue?
Andrew King
@aking1012
huh. i'ld guess it's something weird with a dependency of pandas then. i had an issue at one point where a dependency install wasn't working right through whatever avenue, and my problem was pip/python2x got called from some script instead of pip3. when i manually reinstalled pip specifically for 3.x instead of 2.x and all my problems were solved. I was on 0.19.2, so it might be some environment issue.
Thomas Wiecki
@twiecki
0.19.2 is known not to work
Andrew King
@aking1012
oh i don't have pyfolio running in that environment at all.
alexanderarcha95
@alexanderarcha95
Hi, Thomas I've got a problem connected with pandas_datareader. I'm using pandas 0.19.2 but It says File "pandas_libs\parsers.pyx", line 712, in pandas._libs.parsers.TextReader._setup_parser_source (pandas_libs\parsers.c:8895) OSError: Initializing from file failed
Thomas Wiecki
@twiecki
@alexanderarcha95 thanks for the report, can you open an issue?
alexanderarcha95
@alexanderarcha95
I'm running this command pf.create_returns_tear_sheet(stock_rets, live_start_date='2015-12-1') and then get this error File "pandas_libs\parsers.pyx", line 712, in pandas._libs.parsers.TextReader._setup_parser_source (pandas_libs\parsers.c:8895) OSError: Initializing from file failed
What do you think where the problem is?
I tried on python 3.4, the same. Now I have 3.6
Andrew King
@aking1012
OSError usually means the file doesn't exist. If it has a special character in the ticker name/filename that could throw things off if it's not escaped.
Calle Scharffenorth
@wateenbonkie_twitter
Hi all, how can I fetch/access the elements that are generated for a create_returns_tear_sheet tear sheet?
George Ho
@eigenfoo
@wateenbonkie_twitter do you mean how do you get the figure produced by create_returns_tear_sheet?
if you pass in return_fig=True, it will give you the matplotlib figure
hope I understood your question correctly
IA-UoK
@IA-UoK
hello guys,
im trying to run pyfolio on results form zipline
when i try running
returns, positions, transactions, gross_lev = pf.utils.extract_rets_pos_txn_from_zipline(results)
i get an error
AttributeError: 'RangeIndex' object has no attribute 'normalize'
any ideas?
and wouldn't pyfolio work on python 2.7?
George Ho
@eigenfoo
Hi @IA-UoK, could you please post a full stack trace?
pyfolio and zipline are experiencing some compatibility issues right now, which we're trying to fix. However, this problem doesn't sound like its happening because of that
IA-UoK
@IA-UoK

@georgh0021 here you go...

AttributeError Traceback (most recent call last)

<ipython-input-7-dbdebde5f2a4> in <module>()
----> 1 returns, positions, transactions, gross_lev = pf.utils.extract_rets_pos_txn_from_zipline(results)

/Users/im572/anaconda/envs/zl36/lib/python3.6/site-packages/pyfolio/utils.py in extract_rets_pos_txn_from_zipline(backtest)
427 """
428
--> 429 backtest.index = backtest.index.normalize()
430 if backtest.index.tzinfo is None:
431 backtest.index = backtest.index.tz_localize('UTC')

AttributeError: 'RangeIndex' object has no attribute 'normalize'

i have tried it on both python 2.7 and 3.6
same results
George Ho
@eigenfoo
hi @IA-UoK, are you using the latest version of pyfolio? Could you also open a github issue and describe how you're using zipline and pyfolio? I can't seem to recreate the bug you have
Neil
@torablien
hi there! i'm a total beginner and am looking for a portfolio analysis tool and was wondering if pyfolio is right for me. I have a portfolio of various sp500 equities and I would love to see analysis on the entire portfolio as a whole (e.g. have 2 shares FB, 6 shares GOOG, 3 shares IBM, etc.). Would pyfolio be able to help me do this?
Arash Gol-Mohammadi
@arashgmn

I guess there is a problem in tears.py (pyfolio 0.9), line 641.

change (bootstrap is not None) to (bootstrap is not False) saved my life :)

Tim Paine
@timkpaine
@twiecki et al, noticed some name squatting on cufflinks and it led us to quantopian/empyrical#105 and quantopian/pyfolio#576, we contacted pypa to get the cufflinks3 clone removed/transferred as it could be a security risk in the future, I recommend doing the same for these two
Tim Paine
@timkpaine
nyc_tinker
@nyc-tinker
I've been trying to generate a create_returns_tear_sheet and am running into 'truth value of a Series is ambiguous' errors on a single security - is this a known issue? Can't seem to find anything on the github page...
nyc_tinker
@nyc-tinker
@nyc-tinker Figured it out: looks like returns parameter I used was a dataframe object instead of a pandas series...
oksanaustenko
@oksanaustenko
I have an error when using some functions in pyfolio: pyfolio.timeseries.get_top_drawdowns(returns, top=10)
AttributeError: 'DataFrame' object has no attribute 'argmin'
ValueError: Must pass 2-d input
Schermata 2019-02-01 alle 13.08.42.png
There are returns i'm using
Do ypu know why i'm having this error?
peanutice
@peanutice
i installed the pyfolio package and the rest of packages with python, however how do i use them?
MarkWh1te
@MarkWh1te
Hi
Victor
@victortangggg
@peanutice https://www.youtube.com/watch?v=BCLgXjxYONg seems like good intro
prabuinet
@prabuinet
can someone help me with this error, when i run the function pf.create_returns_tear_sheet(returns) ...
std = var.dtype.type(np.sqrt(var))
AttributeError: 'float' object has no attribute 'dtype'
prabuinet
@prabuinet
got it, my returns column was object instead of float
MiniGeek
@LuisFRoch
Hi all!, is this tool a blackbox where one runs a command and gets output or is there actual documentation to modify the code? I'd appreciate some feedback; thanks!