ml_plot_ic_roll: Rolling rank-IC plot (rebalance dates; leakage-safe)

View source: R/ml_helper.R

ml_plot_ic_rollR Documentation

Rolling rank-IC plot (rebalance dates; leakage-safe)

Description

Computes the IC time series via ml_ic_series_on_scores() and plots the rolling mean IC over a specified window. Returns the rolling statistics invisibly for further inspection.

Usage

ml_plot_ic_roll(scores_dt, labels_dt, window = 26L, method = "spearman")

Arguments

scores_dt

Scores (wide).

labels_dt

Labels (wide).

window

Integer window length (default 26).

method

Correlation method; "spearman" (default) or "pearson".

Value

(Invisibly) a data frame with Date, roll_mean, roll_sd, roll_ICIR.

Examples

## Not run: 
ris <- ml_plot_ic_roll(res_xgb$scores, Y, window = 8L)

## End(Not run)

PortfolioTesteR documentation built on Nov. 5, 2025, 5:23 p.m.