fix: IC chart cumulative mean + forward return horizon matching + multi-horizon eval

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Yuxuan Yan
2026-06-07 09:54:31 +08:00
parent bd0605072f
commit aedc019d23
5 changed files with 51 additions and 30 deletions
+3 -1
View File
@@ -107,7 +107,9 @@ def plot_ic(signal_eval: dict, output_path: str = "reports/ic.png") -> str:
fig, ax = plt.subplots(figsize=(10, 5))
if len(rank_ic):
ax.bar(rank_ic.index, rank_ic.values, width=1.0, color="C1", alpha=0.6, label="Rank IC")
ax.axhline(rank_ic.mean(), color="C3", linestyle="--", label=f"mean={rank_ic.mean():.3f}")
ax.axhline(rank_ic.mean(), color="C7", linestyle="--", label=f"mean={rank_ic.mean():.3f}")
cum_mean = rank_ic.expanding().mean()
ax.plot(cum_mean.index, cum_mean.values, color="red", linewidth=1.5, label="Cumulative mean IC")
ax.legend()
ax.set_title("Cross-Sectional Rank IC")
ax.set_xlabel("Date")