Skip to content

Commit d604210

Browse files
committed
BUG Explicitly check for factor_returns being None.
1 parent 2ef2622 commit d604210

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyfolio/timeseries.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ def perf_stats(returns, factor_returns=None):
742742
return pd.Series(OrderedDict(
743743
(stats_func.__name__, stats_func(returns))
744744
for stats_func in SIMPLE_STAT_FUNCS +
745-
(FACTOR_STAT_FUNCS if factor_returns else [])
745+
(FACTOR_STAT_FUNCS if factor_returns is not None else [])
746746
))
747747

748748

0 commit comments

Comments
 (0)