robertmartin8 / PyPortfolioOpt

Financial portfolio optimisation in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity
https://pyportfolioopt.readthedocs.io/
MIT License
4.51k stars 956 forks source link

Binder yfinance #303

Closed robertmartin8 closed 3 years ago

robertmartin8 commented 3 years ago

yfinance is not available in the binder notebooks. I added it to the pyproject.toml as a dev dependency, and also added pip install in the Dockerfile, but I keep getting ModuleNotFoundError.

It seems that binder is only looking at requirements.txt when it sets up the environment, so I may have to add yfinance to the requirements (either that or make all of the notebooks read from local data).

@phschiele any thoughts?

phschiele commented 3 years ago

First of all, it is correct that binder only looks at the requirements.txt file. Sadly, one cannot set different priorities such that it would read from a more robust format.

So I see three solutions:

Personally, I would go for the first one. I guess for the time being, requirements.txt will always be a subset of main, dev, and optional dependencies, which is fine for this "fallback" file.