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

MAINT: add NOT_PASSED_SENTINEL #543

Merged
merged 7 commits into from
Aug 1, 2018
Merged

MAINT: add NOT_PASSED_SENTINEL #543

merged 7 commits into from
Aug 1, 2018

Conversation

eigenfoo
Copy link
Contributor

@eigenfoo eigenfoo commented Jun 14, 2018

As @ssanderson pointed out, #536 introduces a breaking change to the pyfolio API. Currently, most users are not passing a benchmark and expecting analyses to run with benchmarks. The hope is to slowly wean them off this expectation.

The solution is to introduce a separate sentinel value (in utils.py), which is just some sufficiently unlikely string (in this particular instance, '__not_passed_by_user'). If users don't pass anything, we warn them. If users pass None or a pd.Series, the analysis will run with the current behavior silently.

cc @twiecki

@eigenfoo eigenfoo closed this Jun 15, 2018
@eigenfoo eigenfoo reopened this Jun 15, 2018
@twiecki twiecki merged commit 7d37dc5 into quantopian:master Aug 1, 2018
@eigenfoo
Copy link
Contributor Author

eigenfoo commented Aug 1, 2018

I'm not actually done with this PR!

@twiecki
Copy link
Contributor

twiecki commented Aug 1, 2018

Oops, what needs to be done?

@eigenfoo
Copy link
Contributor Author

eigenfoo commented Aug 1, 2018

Currently Travis fails with some indexing error, I was going to debug that and then submit for review. We should either merge #553, or wait until I finish patching this PR before releasing 0.9.0 in #552

twiecki pushed a commit that referenced this pull request Aug 1, 2018
brian-from-quantrocket pushed a commit to quantrocket-llc/pyfolio that referenced this pull request Aug 7, 2018
* MAINT: add not passed sentinel

* STY: pep8

* BUG: change benchmark_rets back to None after warning

* BUG: added extra check to avoid invalid type comp

* BUG: bufixes

* MAINT: refactored vertical sections

* BUG: fixed plotting order
brian-from-quantrocket pushed a commit to quantrocket-llc/pyfolio that referenced this pull request Aug 7, 2018
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

Successfully merging this pull request may close these issues.

2 participants