Runs rolling IS/OOS optimization, reselects params each window, and backtests OOS performance (optionally with warmup tails).
run_walk_forward(
prices,
grid,
builder,
metric = NULL,
is_periods = 52,
oos_periods = 13,
step = NULL,
warmup_periods = 0,
verbose = FALSE,
light_mode = TRUE,
precompute_all = TRUE,
builder_args = list(),
n_cores = 1
)An object of class wf_optimization_result.
Data frame with Date column and symbol columns
Data frame OR named list; each row/combination is a parameter set
Function(prices, params, ...) -> weights data.frame (Date + assets)
Function(backtest_result) -> scalar score (higher is better).
Defaults to metric_sharpe if omitted/NULL.
Integer, number of in-sample periods
Integer, number of out-of-sample periods
Integer, step size for rolling windows (default = oos_periods)
Integer, warmup periods appended before each OOS
Logical, print progress
Logical, passed to run_param_grid (kept for compatibility)
Logical, precompute indicators once and slice per window
List, extra args passed to builder (e.g., indicator_cache)
Integer (kept for API compatibility; ignored here)