rerunBacktest
Re-runs a backtest (#4782). With no changes it is an exact replay: the
same strategy version row (not the latest version), the run's own config
diff, start and end dates, runner and kind. A leg of a split replays the
whole split with the same out-of-sample percentage; a consistency-check
window replays all three windows. The returned run is the one in the same
place as id (the out-of-sample leg for an out-of-sample leg).
changes is merged over the run's config diff, key by key at the top
level: a named key replaces the run's value, a key set to null removes the
override so the strategy's own value applies, other keys are kept. The
result is then normalised as every create is. The window, runner and mode
are always the run's.
It spends credits exactly as runBacktest does, through the same refusals (free allowance, daily cap, credits and spending policy, job governor, data). A runner that is deleted or no longer usable is refused with BACKTEST_RERUN_RUNNER_UNAVAILABLE and a fix CTA on the runner. Authorized with runBacktest's scope on the run's strategy.
rerunBacktest(
id: ID!
changes: Map
): Backtest!