You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem?
When it was just EfficientFrontier and EfficientSemivariance, it was fine to have it all in one monolithic efficient_frontier.py file. However, with the addition of EfficientCVaR and now CDaR (#283), we need to make it more scalable.
Constraints:
Must be backwards compatible
Since all of these methods are logically related to efficient frontier, I want them to be importable as from pypfopt.efficient_frontier import x, but also from pypfopt import x.
Proposed solution
This should be quite an easy fix. We create a new pypfopt/efficient_frontier folder with its own __init__.py. Directory will look something like:
I think the structure makes sense. I guess when starting from scratch, one would change the efficient_frontier.py name to something like efficient_variance, but given that this is one of the core modules, I see why you would not want to change that.
Edit: had a comment about the import being more cumbersome in that structure, but that can of course be fixed with the __init__ file.
Activity
phschiele commentedon Feb 18, 2021
I think the structure makes sense. I guess when starting from scratch, one would change the
efficient_frontier.pyname to something likeefficient_variance, but given that this is one of the core modules, I see why you would not want to change that.Edit: had a comment about the import being more cumbersome in that structure, but that can of course be fixed with the
__init__file.restructured module (fixes #290)
restructured submodule (fixes #290)