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

ENH Ability to make cones with multiple shades stdev regions #168

Closed
wants to merge 11 commits into from

Conversation

justinlent
Copy link
Contributor

No description provided.

Justin Lent added 3 commits October 12, 2015 16:05
…otting.plot_rolling_returns. Update calling functions to use default of plotting these multiple regions: 1.0, 1.5, 2.0 stdevs
cone_fit_end_date=live_start_date)
# check to see if we're just rendering a single cone, or multiple
# cones at various stddevs, defined as elements of cone_std
if type(cone_std) is list:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having separate logic for list and float case. I would convert every float to a list, then have one loop.

Justin Lent added 2 commits October 13, 2015 18:06
…cal function. Turn off cones completely if plotting volatility match
@justinlent
Copy link
Contributor Author

I committed the update that factors out the cone rendering into a local draw_cone. definitely cleaner! by cleaning it up it also let me easily turn off the cone in the volatility match case -- was only a 3 "word" change so I snuck it in here instead of its own PR--yeah I know not great practice ;)

cone_fit_end_date=live_start_date)

cone_df_fit = cone_df[cone_df.index < live_start_date]
if cone_std is not None and not volatility_match:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't prohibit a user from drawing a cone if they set volatility_match to true. Instead, we should pass cone_std=None in the create_returns_tearsheet() function.

Justin Lent added 4 commits October 14, 2015 10:34
@@ -582,6 +600,11 @@ def plot_rolling_returns(
'factor_returns.')
elif volatility_match and factor_returns is not None:
bmark_vol = factor_returns.loc[returns.index].std()
# TO-DO: @tweicki 'returns' probably needs to get updated to:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, if volatility_match is True, returns need to be changed/re-assigned as you proposed. That will fix the vol match plot.

@twiecki twiecki added this to the 0.3 release milestone Oct 16, 2015
@justinlent
Copy link
Contributor Author

@twiecki Do you think this is good to merge soon? Looks like merge conflicts are cropping up unfortunately. I'm out this upcoming Friday and Monday so I can try address anything else you see necessary

@twiecki
Copy link
Contributor

twiecki commented Oct 21, 2015

Merged with 0040047. Sorry this took a while.

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