> ## Documentation Index
> Fetch the complete documentation index at: https://calendar-effects.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Results

Everything the report, the slides and the video need, in one place. This file is written by `scripts/export_results.py` from a full run, so every number here comes from the run itself. Re-run that script after a new run; do not edit this file by hand.

* **Results from commit:** `d690489` (batch study), `d690489` (model); exported 2026-11-25.
* **Links:** [Dashboard (live and replay)](https://calendar-effects.streamlit.app) · [Docs site (tour of the code)](https://calendar-effects.mintlify.app) · [Dataset](https://huggingface.co/datasets/calendar-effects/calendar-effects) · [Model](https://huggingface.co/calendar-effects/big-move-model) · [GitHub](https://github.com/Calendar-Effects) · [Hugging Face](https://huggingface.co/calendar-effects)
* **Significance marks below:** \*\* p \< 0.05, \* p \< 0.10, from the test clustered by event date (each event date counts once), at 95% confidence.

## 1. The data

* **38 US-listed retailers** (7 online, 31 store), plus SPY as the market, daily from 2016 to 2025: **98,046 stock-days** in `clean/master.parquet` (2,514 trading days).
* **Events:** US Thanksgiving, Black Friday, Cyber Monday, Amazon Prime Day, Halloween, Chinese New Year. **2,242 event windows** with a CAR (one per retailer and event occurrence; 59 occurrences).
* **The stream scored 95,190 stock-days** (the first 120 trading days of each stock only build its baseline).
* **Attention:** daily Wikipedia pageviews of each company (real users, no bots). GDELT news and the Census retail sales are out of scope (decision 0012).

## 2. Is the stream right?

Three independent computations of the same numbers must agree: the streaming job (day by day, with state, late data), a direct numpy recomputation (`scripts/check_streaming.py`), and the batch event study (`src/eventstudy/car.py`, the answer key; `scripts/compare_stream_batch.py`).

| Run | Stream vs direct computation | Stream vs batch answer key |
| - | - | - |
| Laptop, local files, 2% of messages 3 days late | **OK** · daily: 95190 rows in both, 342 only in batch (last trading day the stream processed: 2025-12-17); event CAR: 2280 windows in both, 0 only in batch, 0 only in stream | **OK** · joined on ticker, event\_type, event\_date: 2280 in both, 0 only in the stream, 0 only in the batch (0 still open in the stream) |
| SFU cluster, course Kafka, YARN · 38 retailers, own topic, 2% of messages 3 days late, 390 messages per micro-batch, Spark 3.5.8 | **OK** · daily: 95190 rows in both, 342 only in batch (last trading day the stream processed: 2025-12-17); event CAR: 2280 windows in both, 0 only in batch, 0 only in stream | **OK** · joined on ticker, event\_type, event\_date: 2280 in both, 0 only in the stream, 0 only in the batch (0 still open in the stream) |

The full output of each check is in [`checks/`](https://github.sfu.ca/aba395/Calendar-Effects/tree/main/docs/results/checks).

## 3. Do retail stocks move abnormally around events?

Mean cumulative abnormal return (CAR) over trading days -5 to +5, with its 95% confidence interval and the clustered p-value.

| Event | All retailers | Online | Store | Online − store |
| - | - | - | - | - |
| US Thanksgiving | +2.1% \[-0.7%, +4.8%] p=0.125 | 0.0% \[-4.0%, +4.0%] p=0.993 | +2.5%\* \[-0.5%, +5.6%] p=0.094 | -2.5% \[-7.0%, +1.9%] p=0.226 |
| Black Friday | +2.1% \[-0.7%, +4.8%] p=0.125 | 0.0% \[-4.0%, +4.0%] p=0.993 | +2.5%\* \[-0.5%, +5.6%] p=0.094 | -2.5% \[-7.0%, +1.9%] p=0.226 |
| Cyber Monday | +2.0% \[-1.3%, +5.2%] p=0.200 | +0.2% \[-4.6%, +5.0%] p=0.931 | +2.4% \[-1.0%, +5.7%] p=0.143 | -2.2% \[-6.6%, +2.3%] p=0.296 |
| Amazon Prime Day | +0.7% \[-0.9%, +2.3%] p=0.380 | +1.2% \[-1.3%, +3.7%] p=0.311 | +0.5% \[-1.3%, +2.3%] p=0.523 | +0.7% \[-2.2%, +3.6%] p=0.611 |
| Halloween | 0.0% \[-1.8%, +1.8%] p=0.971 | -3.6%\*\* \[-7.1%, -0.1%] p=0.044 | +0.9% \[-1.1%, +2.8%] p=0.340 | -4.5%\*\* \[-8.1%, -0.8%] p=0.022 |
| Chinese New Year | -0.5% \[-1.9%, +1.0%] p=0.467 | +1.7% \[-1.0%, +4.4%] p=0.175 | -1.0% \[-2.5%, +0.6%] p=0.184 | +2.7%\* \[-0.1%, +5.6%] p=0.059 |
| All events (each window once) | +0.9%\* \[-0.1%, +1.8%] p=0.063 | -0.1% \[-1.6%, +1.4%] p=0.857 | +1.1%\*\* \[+0.1%, +2.1%] p=0.033 | -1.2% \[-2.8%, +0.4%] p=0.127 |

**What stands out** (p \< 0.10):

* Halloween, online minus store: -4.5% (p = 0.022, 10 event dates, 380 windows)
* all events, store: +1.1% (p = 0.033, 49 event dates, 1519 windows)
* Halloween, online: -3.6% (p = 0.044, 10 event dates, 70 windows)
* Chinese New Year, online minus store: +2.7% (p = 0.059, 9 event dates, 342 windows)
* all events, all retailers: +0.9% (p = 0.063, 49 event dates, 1862 windows)
* Black Friday, store: +2.5% (p = 0.094, 10 event dates, 310 windows)
* US Thanksgiving, store: +2.5% (p = 0.094, 10 event dates, 310 windows)

Note: US Thanksgiving's market is closed, so its window is Black Friday's; the two rows are the same windows.

## 4. Is the effect changing? Trends and a 2026 forecast

Each year's average CAR regressed on the year; the forecast extends that line to 2026 with a 95% prediction interval (where one year's value should fall).

| Event | Change per year | p | 2026 forecast | Prediction interval |
| - | - | - | - | - |
| Black Friday | +0.51% | 0.248 | +4.9% | -5.6% to +15.3% |
| Cyber Monday | +0.38% | 0.475 | +4.1% | -8.9% to +17.0% |
| Amazon Prime Day | +0.36% | 0.158 | +2.6% | -3.2% to +8.4% |
| Halloween | +0.21% | 0.489 | +1.2% | -6.0% to +8.4% |
| Chinese New Year | +0.48% | 0.038\*\* | +1.9% | -2.3% to +6.1% |

The intervals are wide: ten yearly values cannot pin down next year's CAR. Read the forecast as the trend, not a prediction of the market.

## 5. Attention: does Wikipedia move with the events?

| Stock-days | How many | With an abnormal return | With an attention spike |
| - | - | - | - |
| Outside event windows | 74,290 | 5.2% | 5.0% |
| Inside event windows | 16,682 | 5.6% | 7.3% |

Inside event windows, attention spikes (views ≥ 3.0 sd above their recent level) are 1.5× as common, and abnormal returns (|z| ≥ 1.96) 1.1× as common.

## 6. The big-move model (Spark MLlib)

Predicts whether tomorrow's |abnormal return| will be at least 1.96 times its usual size. Fitted on 2016–2023, chosen on the validation year, tested once on 2024–2025 (a purged time split). Model: gbt (maxDepth=3).

| Model (test years) | ROC-AUC | PR-AUC | Big moves among the top 5% flags | Lift over the base rate | | |
| - | - | - | - | - | - | - |
| Gradient-boosted trees, all features | 0.688 | 0.135 | 21.5% | 4.1× | | |
| Same, without the Wikipedia features | 0.689 | 0.133 | 21.6% | 4.2× | | |
| Baseline: today's | z\_ar | alone | 0.582 | 0.082 | 12.6% | 2.4× |

Base rate: 5.2% of test stock-days are big moves. Top inputs: month, log\_vol\_ratio, abs\_mkt\_ret, ar\_sd, days\_to\_event.

Around Black Friday in the test years, big moves peak on day -3 (28% of retailers, against 5.2% on an ordinary day), and the model flags most on day -2. It mostly reacts to a burst of big moves rather than anticipating the first one.

## 7. Charts

**Average cumulative abnormal return from day −5 to +5, per event, with its 95% confidence band (clustered by event date).**

![Average cumulative abnormal return from day −5 to +5, per event, with its 95% confidence band (clustered by event date).](https://mintcdn.com/calendar-effects/hMT5TuaDA8mVsM60/images/results/car_path.png?fit=max\&auto=format\&n=hMT5TuaDA8mVsM60\&q=85\&s=6cac873696089f2bb0e9b4e32e59ad06)

**Mean CAR per event with its 95% confidence interval.**

![Mean CAR per event with its 95% confidence interval.](https://mintcdn.com/calendar-effects/hMT5TuaDA8mVsM60/images/results/car_by_event.png?fit=max\&auto=format\&n=hMT5TuaDA8mVsM60\&q=85\&s=0addef194539ac2ebf4ae1494be0711c)

**Mean CAR per event for online and store retailers.**

![Mean CAR per event for online and store retailers.](https://mintcdn.com/calendar-effects/hMT5TuaDA8mVsM60/images/results/online_vs_store.png?fit=max\&auto=format\&n=hMT5TuaDA8mVsM60\&q=85\&s=51ff98611e70aec2f65d1671932b15c1)

**Mean CAR of each year's occurrence, per event type, with the trend.**

![Mean CAR of each year's occurrence, per event type, with the trend.](https://mintcdn.com/calendar-effects/hMT5TuaDA8mVsM60/images/results/car_over_years.png?fit=max\&auto=format\&n=hMT5TuaDA8mVsM60\&q=85\&s=902191d5c2cca36f6b3aafee2c0b512a)

**Wikipedia attention spikes against CAR, one dot per window.**

![Wikipedia attention spikes against CAR, one dot per window.](https://mintcdn.com/calendar-effects/hMT5TuaDA8mVsM60/images/results/attention_vs_returns.png?fit=max\&auto=format\&n=hMT5TuaDA8mVsM60\&q=85\&s=ccc0a742849a34170501910356a55ac4)

**The big-move model on the test years: ROC and precision-recall curves against the baseline.**

![The big-move model on the test years: ROC and precision-recall curves against the baseline.](https://mintcdn.com/calendar-effects/hMT5TuaDA8mVsM60/images/results/ml_roc_pr.png?fit=max\&auto=format\&n=hMT5TuaDA8mVsM60\&q=85\&s=8964bdfeb4e651b0d4503e639c0528f6)

**Which inputs the big-move model relies on (gradient-boosted trees).**

![Which inputs the big-move model relies on (gradient-boosted trees).](https://mintcdn.com/calendar-effects/hMT5TuaDA8mVsM60/images/results/ml_feature_importance.png?fit=max\&auto=format\&n=hMT5TuaDA8mVsM60\&q=85\&s=d275844c18b320523050ef082c60a06e)

## 8. Limitations

* One-factor market model (S\&P 500 only); a Fama-French model could change individual CARs.
* About ten occurrences per event: the trends and the 2026 forecasts have wide intervals.
* The retailers share each event date, so the evidence is the number of event dates, not windows; the clustered test accounts for this, and some p-values are near 0.05–0.10.
* Many tests at once (events × groups): a few p \< 0.05 results are expected by chance alone.
* The big-move model ranks days (ROC-AUC \~0.69) but is not calibrated and is not a trading strategy.
* Wikipedia is the only attention measure; GDELT and retail sales are future work (decision 0012).

## 9. How to reproduce

```bash theme={null}
./run_everything.sh --skip-etl --late-test     # stream, checks, batch study, comparison, model
python3 src/hosting/snapshot.py                # the dashboard's recording and forecasts
python3 scripts/export_results.py              # this folder
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.