Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vanilla Attribute Error #3

Closed
rafaelcesar7 opened this issue Nov 7, 2019 · 10 comments
Closed

Vanilla Attribute Error #3

rafaelcesar7 opened this issue Nov 7, 2019 · 10 comments

Comments

@rafaelcesar7
Copy link

Problem description

I have been trying to use your package to make risk parity portfolios with ease. Although, I have been facing some issues running the first tutorial. At first I've tried running it with a local installation, then I've moved to Colab environment. Faced the same issue on both situations.

Example

!pip check
!pip install pybind11
!pip install riskparityportfolio

import riskparityportfolio as rp

b = df_portfolio_prices_parity

optimum_weights = rp.vanilla.design(cov, b)

Behavior

Since it was a simple example provided on the documentation, I thought it would be straight-forward execution, but I'm facing the error below:

AttributeError                            Traceback (most recent call last)
<ipython-input-12-0745d4c9a058> in <module>()
      8 b = df_portfolio_prices_parity
      9 
---> 10 optimum_weights = rp.vanilla.design(cov, b)

AttributeError: module 'riskparityportfolio' has no attribute 'vanilla'

Environment:

  • Colab environment: running Ubuntu 18.04.3 LTS
  • installation method: pip
@mirca
Copy link
Member

mirca commented Nov 7, 2019

Hi @ralphscoz: thanks for reporting this.

Could you try installing the dev version as follows:

$ git clone https://github.com/dppalomar/riskparity.py.git
$ cd riskparity.py
$ python setup.py install

Let me know if the issue still remains.

@DanielPNewman
Copy link
Contributor

Hi @mirca, I installed the dev version as you say above, but still get the error reported here:
AttributeError: module 'riskparityportfolio' has no attribute 'vanilla'

Love the work that you and Daniel Palomar are doing with risk parity by the way, I appreciate it, so thanks!

@mirca
Copy link
Member

mirca commented Nov 8, 2019

Hi @DanielPNewman, could you show the version of riskparityportfolio in the output of
$ pip list?
Thanks!

@DanielPNewman
Copy link
Contributor

Hi @mirca, yes it's: riskparityportfolio 0.1.2

@mirca
Copy link
Member

mirca commented Nov 8, 2019

@DanielPNewman thanks! I can't seem to be able to reproduce the issue right now, but I will find some time to investigate it soon!

@mirca
Copy link
Member

mirca commented Nov 8, 2019

@DanielPNewman @ralphscoz in the meantime

from riskparityportfolio import vanilla

should work!

@mirca
Copy link
Member

mirca commented Nov 8, 2019

@DanielPNewman @ralphscoz I was able to reproduce the issue. Thanks again for reporting!
It should be solved via

$ git clone https://github.com/dppalomar/riskparity.py.git
$ cd riskparity.py
$ pip install -e .

Let me know! :)

@rafaelcesar7
Copy link
Author

Hey guys! Thank you so much for your help! It actually worked.

@DanielPNewman
Copy link
Contributor

Nice one @mirca, this works for me too now, thanks :)

@mirca
Copy link
Member

mirca commented Nov 9, 2019

Thank you for reporting this issue @DanielPNewman @ralphscoz!

@mirca mirca closed this as completed Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants