run_rolling_xi_analysis: Rolling Xi-ACF Analysis

View source: R/xi_rolling_acf.R

run_rolling_xi_analysisR Documentation

Rolling Xi-ACF Analysis

Description

Performs a rolling window analysis using Chatterjee's Xi coefficient to assess the time-varying non-linear dependence structure of a time series.

Usage

run_rolling_xi_analysis(
  x,
  time_index = NULL,
  window_size,
  step_size = 1,
  max_lag = 20,
  n_surr = 100,
  sig_level = 0.95,
  n_cores = NULL,
  save_dir = NULL
)

Arguments

x

A numeric vector representing the time series (e.g., log-returns).

time_index

Optional vector of timestamps (e.g., Date, POSIXct) corresponding to x.

window_size

An integer specifying the size of the rolling window.

step_size

An integer specifying the step size by which the window is shifted. Default is 1.

max_lag

An integer specifying the maximum lag to compute Chatterjee's Xi for.

n_surr

An integer specifying the number of surrogate datasets for the null hypothesis test.

sig_level

A numeric value specifying the significance level for the confidence intervals. Default is 0.95.

n_cores

An integer specifying the number of cores for parallel execution. If NULL, runs sequentially.

save_dir

A character string specifying the directory path to save intermediate window results as RDS files. If NULL (default), results are not saved to disk.

Value

A data.frame containing the rolling window results, including timestamps if provided.


xiacf documentation built on April 16, 2026, 5:08 p.m.