View source: R/task_intraday.R
| nonparametric_intraday_test | R Documentation |
Implements the non-parametric intraday event study methodology of Rinaudo & Saha (2014). For each event time, cumulative abnormal returns (CARs) on the event day are compared to the empirical distribution of CARs from estimation-period days. Significance is assessed without distributional assumptions.
nonparametric_intraday_test(
estimation_window,
event_window,
event_times,
p = 0.05,
init_window = 5L,
upper = FALSE
)
estimation_window |
Data frame with columns |
event_window |
Data frame with columns |
event_times |
Character vector of intraday times at which events
occurred (e.g., |
p |
Numeric; significance level in (0, 1). Default 0.05. |
init_window |
Integer; number of initial observations to accumulate before testing significance. Default 5. |
upper |
Logical; if |
A named list of tibbles, one per event time. Each tibble contains:
Observation index within the significant window.
Cumulative abnormal return on the event day.
Empirical confidence interval boundary from estimation days.
Polynomial-smoothed CI (degree-4 polynomial fit).
When an event time is not significant, returns a single-row tibble with all values equal to zero.
Rinaudo, J.B. & Saha, A. (2014). Non-parametric intraday event studies.
Other eventstudy-tasks:
IntradayEventStudyTask,
PanelEventStudyTask,
SyntheticControlTask,
estimate_panel_event_study(),
estimate_synthetic_control(),
plot_panel_event_study(),
plot_synthetic_control(),
prepare_intraday_event_study(),
sc_placebo_test()
# Build a small intraday grid: estimation window (multiple days) and a
# single event-day window sharing the same intraday time stamps.
set.seed(1)
times <- sprintf("%02d:%02d", 10L + seq_len(30L) %/% 60L, seq_len(30L) %% 60L)
est_data <- data.frame(
day = rep(seq_len(10L), each = 30L),
time = rep(times, 10L),
abnormalReturn = rnorm(300L, 0, 0.001)
)
event_data <- data.frame(
time = times,
abnormalReturn = rnorm(30L, 0, 0.001)
)
results <- nonparametric_intraday_test(
estimation_window = est_data,
event_window = event_data,
event_times = times[c(5L, 20L)],
p = 0.05,
init_window = 5
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.