@@ -1077,10 +1077,12 @@ def construct_strategy(self, br=None, run_in_parallel=False):
1077
1077
1078
1078
self ._strategy_group_benchmark_pnl_ret_stats = ret_stats_results
1079
1079
1080
- if hasattr ( self , '_benchmark_ret_stats' ) :
1080
+ try :
1081
1081
ret_stats_list = ret_stats_results
1082
1082
ret_stats_list ['Benchmark' ] = (self ._strategy_benchmark_pnl_ret_stats )
1083
1083
self ._strategy_group_benchmark_pnl_ret_stats = ret_stats_list
1084
+ except :
1085
+ pass
1084
1086
1085
1087
# Individual parts (all after individually applying portfolio level vol adjustment)
1086
1088
self ._strategy_group_pnl = cum_results
@@ -1687,10 +1689,12 @@ def _plot_ret_stats_helper(self, ret_stats, metric, title, file_tag, strip=None,
1687
1689
return self ._chart_return_with_df (ret_stats , style , silent_plot , chart_type = 'bar' , ret_with_df = ret_with_df ,
1688
1690
split_on_char = split_on_char )
1689
1691
1690
- def plot_strategy_group_benchmark_pnl_yoy (self , strip = None , silent_plot = False , split_on_char = None ):
1692
+ def plot_strategy_group_benchmark_pnl_yoy (self , strip = None , silent_plot = False , ret_with_df = False , split_on_char = None ):
1691
1693
1692
1694
return self .plot_yoy_helper (self ._strategy_group_benchmark_pnl_ret_stats , "" , "Group Benchmark PnL YoY" ,
1693
- strip = strip , silent_plot = silent_plot )
1695
+ strip = strip ,
1696
+ silent_plot = silent_plot , ret_with_df = ret_with_df ,
1697
+ split_on_char = split_on_char )
1694
1698
1695
1699
def plot_yoy_helper (self , ret_stats , title , file_tag , strip = None , silent_plot = False , ret_with_df = False ,
1696
1700
split_on_char = None ):
0 commit comments