diff --git a/pyfolio/plotting.py b/pyfolio/plotting.py index 92e40a0c..ef21a3bc 100644 --- a/pyfolio/plotting.py +++ b/pyfolio/plotting.py @@ -600,6 +600,11 @@ def draw_cone(returns, num_stdev, live_start_date, ax): '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: + # (returns / returns.std()) * bmark_vol if we want to plot + # the cone on this later on. + # Will we need a temp variable to do this? Or can we just re-assign as + # returns = (returns / returns.std()) * bmark_vol df_cum_rets = timeseries.cum_returns( (returns / returns.std()) * bmark_vol, 1.0