Skip to content

Commit

Permalink
Merge pull request quantopian#354 from jimportico/flexible_binning_is…
Browse files Browse the repository at this point in the history
…sue336

Addressing issue quantopian#336
  • Loading branch information
twiecki authored Jan 15, 2020
2 parents 76f4f0e + a462213 commit 6f9b1ff
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 range(1, int(quantile_factor.max()) + 1)],
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 6f9b1ff

Please sign in to comment.