Skip to content

Commit

Permalink
Addressing issue quantopian#336
Browse files Browse the repository at this point in the history
Added code to address issue quantopian#336 

Link: quantopian#336
  • Loading branch information
jimportico authored Jan 10, 2020
1 parent a13233b commit a462213
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions alphalens/tears.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,16 @@ def create_turnover_tear_sheet(factor_data, turnover_periods=None):

quantile_factor = factor_data['factor_quantile']

quantile_turnover = \
{p: pd.concat([perf.quantile_turnover(quantile_factor, q, p)
for q in quantile_factor.sort_values().unique().tolist()],
axis=1)
for p in turnover_periods}
quantile_turnover = {
p: pd.concat(
[
perf.quantile_turnover(quantile_factor, q, p)
for q in quantile_factor.sort_values().unique().tolist()
],
axis=1,
)
for p in turnover_periods
}

autocorrelation = pd.concat(
[perf.factor_rank_autocorrelation(factor_data, period) for period in
Expand Down

0 comments on commit a462213

Please sign in to comment.